The Task Management API is a robust backend service for managing tasks within teams and users. It provides functionalities for user authentication, team management, task creation, and real-time task updates using WebSockets (Socket.IO). This API is designed to support both individual and team-based task management with real-time notifications and updates.
- User Authentication: Secure user registration, login, and JWT-based authentication.
- Team Management: Create, update, and delete teams. Assign users to teams.
- Task Management: Create, update, and delete tasks. Assign tasks to users or teams.
- Real-Time Updates: Receive real-time events on task creation, updates, and deletions using Socket.IO.
- Role-Based Access: Different functionalities based on user roles (e.g., admin, user).
- Node.js (>=14.x)
- MongoDB
dotenvfor environment variable management
-
Clone the repository:
git clone https://github.com/ShabinMuhammedKK/Task-Management-API.git cd task-management-api -
Install dependencies:
npm install
-
Create a
.envfile in the root directory and add your environment variables:PORT=3000 DB_CONNECTION_STRING=mongodb://localhost:27017/task-management JWT_SECRET_KEY=your_jwt_secret_key
-
Run the server:
npm start
- POST /api/user/register: Register a new user.
- POST /api/user/login: Login and obtain a JWT token.
- POST /api/teams/all-users: Login and obtain a JWT token.
- POST /api/teams/create: Create a new team.
- GET /api/teams/:id: Fetch a specific team by ID.
- POST /api/tasks/create: Create a new task.
- GET /api/tasks/: Fetch all tasks.
- GET /api/tasks/:id: Fetch a specific task by ID.
- PUT /api/tasks/update-status/:id: Update a task by ID.
- DELETE /api/tasks/delete/:id: Delete a task by ID.
/socket.io/: WebSocket configured.