A robust RESTful API for managing tasks and subtasks with user authentication, built with Node.js and Express. This backend service provides comprehensive task organization features and is deployed as serverless functions on Netlify.
- User Authentication: Register, login, and Google OAuth integration
- Task Management: Create, read, update, and delete tasks
- Task Organization: Status tracking, priority levels, and tagging system
- Subtask Management: Create and manage subtasks with progress tracking
- User Profile Management: Update profile information and change password
- Time Tracking: Track time spent on tasks
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT, Google OAuth
- Deployment: Netlify Functions (Serverless)
- Security: Helmet, CORS, Express Rate Limit
- Validation: Express Validator
POST /api/auth/register
- Register a new userPOST /api/auth/login
- Login with email and passwordPOST /api/auth/google
- Login with Google
GET /api/users/me
- Get current user profilePUT /api/users/me
- Update user profilePUT /api/users/password
- Change password
GET /api/tasks
- Get all tasksGET /api/tasks/:id
- Get a specific taskPOST /api/tasks
- Create a new taskPUT /api/tasks/:id
- Update a taskDELETE /api/tasks/:id
- Delete a task
POST /api/tasks/:id/subtasks
- Add a subtaskPUT /api/tasks/:id/subtasks/:subtaskId
- Update a subtaskDELETE /api/tasks/:id/subtasks/:subtaskId
- Delete a subtask
Tasks include the following properties:
- Title and description
- Status (Draft, In Progress, Editing, Done)
- Type (Main Task, Secondary Task, Tertiary Task)
- Priority (Low, Medium, High, Urgent)
- Progress tracking (0-100%)
- Tags and categories
- Due dates
- Time tracking
This API is deployed on Netlify as serverless functions.
- API URL: https://taskms.greenhacker.tech
- Frontend URL: https://task.greenhacker.tech
-
Clone the repository
git clone https://github.com/yourusername/task-manager-api.git cd task-manager-api
-
Install dependencies
npm install
-
Create a
.env
file with the following variables:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret JWT_EXPIRATION=7d GOOGLE_CLIENT_ID=your_google_client_id FRONTEND_URL=http://localhost:8080
-
Start the development server
npm run dev
-
Install Netlify CLI
npm install -g netlify-cli
-
Login to Netlify
netlify login
-
Deploy to Netlify
netlify deploy --prod
-
Set environment variables in Netlify dashboard
Frontend GitHub Repository: Task Manager Frontend
The frontend for this application is built with React and is deployed separately on Netlify at https://task.greenhacker.tech.
MIT