https://github.com/nightdevilpt/task-management
https://github.com/nightdevilpt/task-management
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nightdevilpt/task-management
- Owner: NightDevilPT
- Created: 2025-08-27T01:34:00.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T01:32:08.000Z (10 months ago)
- Last Synced: 2025-08-28T02:15:31.404Z (10 months ago)
- Language: TypeScript
- Size: 284 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task Management System
Of course. This is a crucial planning step. Here's a comprehensive list of API routes you'll need to build for your Task Management System, organized by module.
# Task Management System
This document lists all planned API routes for the Task Management System, organized by module. Each route includes its implementation status.
---
## Authentication Routes (`/api/auth/[...]`)
| Method | Endpoint | Description | Status |
| :----- | :-------------------------- | :----------------------------- | :------------------------------------------------- |
| `POST` | `/api/auth/register` | Create a new user account |
DONE
|
| `POST` | `/api/auth/login` | Login user & return JWT token | DONE
|
| `POST` | `/api/auth/logout` | Logout user (invalidate token) | DONE
|
| `PUT` | `/api/auth/verify` | Verify User | DONE
|
| `GET` | `/api/auth/me` | Get current user's profile | DONE
|
| `PUT` | `/api/auth/me` | Update current user's profile | DONE
|
| `POST` | `/api/auth/forgot-password` | Request password reset email | DONE
|
| `POST` | `/api/auth/reset-password` | Reset password with token | DONE
|
---
## User Routes (`/api/users/[...]`)
| Method | Endpoint | Description | Status |
| :----- | :--------------------------------- | :----------------------------------- | :------------------------------------------------ |
| `GET` | `/api/users` | Get all users (for mentions/search) |
TODO
|
| `GET` | `/api/users/:userId` | Get a specific user's public profile | TODO
|
| `GET` | `/api/users/me/teams` | Get current user's teams & roles | TODO
|
| `GET` | `/api/users/me/tasks` | Get current user's assigned tasks | TODO
|
| `GET` | `/api/users/me/notifications` | Get current user's notifications | TODO
|
| `PUT` | `/api/users/me/notifications/read` | Mark notifications as read | TODO
|
---
## Project Routes (`/api/projects/[...]`)
| Method | Endpoint | Description | Status |
| :------- | :---------------------------------- | :---------------------------------------------------------- | :------------------------------------------------- |
| `POST` | `/api/projects` | Create a new project |
DONE
|
| `GET` | `/api/projects` | Get all projects owned or member-associated by current user | DONE
|
| `GET` | `/api/projects/:projectId` | Get details of a specific project | DONE
|
| `PUT` | `/api/projects/:projectId` | Update project details (Owner only) | DONE
|
| `DELETE` | `/api/projects/:projectId` | Delete/archive a project (Owner only) | TODO
|
| `GET` | `/api/projects/:projectId/teams` | Get all teams under a project | TODO
|
| `GET` | `/api/projects/:projectId/tasks` | Get all tasks under a project (aggregate from teams) | TODO
|
| `GET` | `/api/projects/:projectId/activity` | Get activity feed for a project | TODO
|
---
## Team Routes (`/api/teams/[...]`)
| Method | Endpoint | Description | Status |
| :----- | :--------------------------------------- | :-------------------------------------- | :------------------------------------------------- |
| `POST` | `/api/teams/create-team` | Create a new team |
DONE
|
| `GET` | `/api/teams/get-teams` | Get all teams current user is member of | DONE
|
| `GET` | `/api/teams/get-team-by-id/:[teamId]` | Get a specific team's details | DONE
|
| `PUT` | `/api/teams/update-team-by-id/:[teamId]` | Update team details (Admin only) | DONE
|
---
## Task Routes (`/api/teams/:teamId/tasks/[...]`)
| Method | Endpoint | Description | Status |
| :------- | :---------------------------------------- | :---------------------------------------- | :------------------------------------------------ |
| `POST` | `/api/teams/:teamId/tasks` | Create a new task in a team |
TODO
|
| `GET` | `/api/teams/:teamId/tasks` | Get all tasks for a team (with filters) | TODO
|
| `GET` | `/api/teams/:teamId/tasks/:taskId` | Get a specific task's details | TODO
|
| `PUT` | `/api/teams/:teamId/tasks/:taskId` | Update a task | TODO
|
| `DELETE` | `/api/teams/:teamId/tasks/:taskId` | Delete a task | TODO
|
| `PUT` | `/api/teams/:teamId/tasks/:taskId/status` | Update task status (e.g., move on Kanban) | TODO
|
| `PUT` | `/api/teams/:teamId/tasks/:taskId/assign` | Assign/unassign a task to a user | TODO
|
---
## Comment Routes (`/api/teams/:teamId/tasks/:taskId/comments/[...]`)
| Method | Endpoint | Description | Status |
| :------- | :------------------------ | :-------------------------- | :------------------------------------------------ |
| `POST` | `.../comments` | Add a comment to a task |
TODO
|
| `GET` | `.../comments` | Get all comments for a task | TODO
|
| `PUT` | `.../comments/:commentId` | Edit a comment | TODO
|
| `DELETE` | `.../comments/:commentId` | Delete a comment | TODO
|
---
## Attachment Routes (`/api/teams/:teamId/tasks/:taskId/attachments/[...]`)
| Method | Endpoint | Description | Status |
| :------- | :------------------------------ | :----------------------------- | :------------------------------------------------ |
| `POST` | `.../attachments` | Upload a file to a task |
TODO
|
| `GET` | `.../attachments` | Get all attachments for a task | TODO
|
| `DELETE` | `.../attachments/:attachmentId` | Delete an attachment | TODO
|
---
## Activity & Notification Routes (`/api/[...]`)
| Method | Endpoint | Description | Status |
| :----- | :---------------------------- | :-------------------------------------- | :------------------------------------------------ |
| `GET` | `/api/teams/:teamId/activity` | Get recent activity for a team |
TODO
|
| `GET` | `/api/me/activity` | Get current user's global activity feed | TODO
|
---
## Summary of Route Structure
Your API structure will look like this in the `app/api/` directory:
```
app/api/
├── auth/
│ ├── register/route.ts
│ ├── login/route.ts
│ ├── logout/route.ts
│ ├── me/route.ts
│ └── ...
├── users/
│ ├── route.ts # GET /api/users
│ ├── [userId]/route.ts # GET /api/users/:userId
│ └── me/
│ ├── teams/route.ts
│ ├── tasks/route.ts
│ └── notifications/route.ts
├── teams/
│ ├── route.ts # GET, POST /api/teams
│ ├── [teamId]/
│ │ ├── route.ts # GET, PUT, DELETE /api/teams/:teamId
│ │ ├── members/
│ │ │ ├── route.ts # GET /api/teams/:teamId/members
│ │ │ └── [userId]/route.ts # PUT, DELETE /api/teams/:teamId/members/:userId
│ │ ├── invites/
│ │ │ ├── route.ts # GET, POST /api/teams/:teamId/invites
│ │ │ └── [inviteId]/route.ts # DELETE /api/teams/:teamId/invites/:inviteId
│ │ └── tasks/
│ │ ├── route.ts # GET, POST /api/teams/:teamId/tasks
│ │ └── [taskId]/
│ │ ├── route.ts # GET, PUT, DELETE /api/teams/:teamId/tasks/:taskId
│ │ ├── comments/
│ │ │ ├── route.ts
│ │ │ └── [commentId]/route.ts
│ │ └── attachments/
│ │ ├── route.ts
│ │ └── [attachmentId]/route.ts
│ └── invites/
│ └── [token]/
│ ├── accept/route.ts
│ └── decline/route.ts
└── me/
├── notifications/route.ts
└── activity/route.ts
```
**Priority Order for Implementation (MVP First):**
1. Auth Routes (`/api/auth/*`)
2. Team Routes (`/api/teams`, `/api/teams/[teamId]`)
3. Task Routes (`/api/teams/[teamId]/tasks`)
4. Comment Routes
5. Invite & Member Routes
6. The rest (Attachments, Activity, etc.)
```mermaid
flowchart TD
User
User -->|teamMemberships| TeamMember
User -->|createdTeams| Team
User -->|createdTasks| Task
User -->|assignedTasks| Task
User -->|teamInvites| TeamInvite
User -->|comments| Comment
User -->|attachments| Attachment
User -->|notifications| Notification
User -->|activities| Activity
subgraph TeamContext [Team & Membership]
TeamMember -->|defines role in| Team
end
subgraph TaskContext [Task & Collaboration]
Comment
Attachment
end
subgraph System [System & Logging]
Notification
Activity
end
```