This is a full-stack serverless application built with Nuxt.js for the frontend and AWS Lambda with the Serverless Framework for the backend. It's designed as a learning project to explore full-stack development with a focus on serverless architecture.
- Task Management: Create, view, update, and delete tasks.
- AI-Powered Analysis: Leverage Google's Gemini API to analyze tasks and provide insights on urgency, importance, and estimated completion time.
- Serverless Backend: The backend is built with AWS Lambda and API Gateway, managed by the Serverless Framework.
- Supabase Database: Uses Supabase for a managed PostgreSQL database.
- Modern Frontend: The frontend is a reactive and responsive application built with Nuxt.js and Tailwind CSS.
- Frontend:
- Backend:
- Database:
- Supabase (PostgreSQL)
- AI:
The project is organized into two main directories:
frontend/: Contains the Nuxt.js frontend application.backend/: Contains the serverless backend application.
.
├── backend
│ ├── src
│ │ ├── handlers
│ │ │ ├── aiAnalysis.ts
│ │ │ ├── options.ts
│ │ │ └── tasks.ts
│ ├── serverless.yml
│ └── ...
├── frontend
│ ├── app
│ │ ├── components
│ │ ├── composables
│ │ ├── pages
│ │ └── ...
│ ├── nuxt.config.ts
│ └── ...
└── README.md
The following API endpoints are available:
GET /tasks: Fetches all tasks.POST /tasks: Creates a new task.PUT /tasks/{id}: Updates an existing task.DELETE /tasks/{id}: Deletes a task.GET /tasks/view/{task_id}: Fetches a single task by itstask_id.POST /tasks/analyze/{task_id}: Triggers an AI analysis of a task using Gemini.
- Node.js (v20 or higher)
- AWS CLI configured with your credentials
- Serverless Framework
- A Supabase account
- A Google AI API key for Gemini
-
Clone the repository:
git clone https://github.com/mimmydev/smart-task-manager.git cd smart-task-manager/backend -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in thebackenddirectory and add the following:SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_key GEMINI_API_KEY=your_gemini_api_key -
Deploy the backend:
serverless deploy
-
Navigate to the frontend directory:
cd ../frontend -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in thefrontenddirectory and add the following, using the API Gateway URL from the backend deployment:VITE_API_BASE_URL=your_api_gateway_url -
Run the development server:
npm run dev
The application should now be running at http://localhost:3000.