Before submitting
Problem statement
The server/modules/tasks/ module is scaffolded (per the README roadmap) but currently empty. There's no Task model or API to create, read, update, or delete tasks, which blocks any task management functionality on the frontend.
Proposed solution
Implement the foundational layer only, following the existing module pattern (see server/modules/user/ or server/modules/codeforces/):
Task Mongoose model with core fields: title, description, category, priority, status, deadline, createdAt, updatedAt, linked to User by userId
routes.js, controller.js, service.js, repository.js, validation.js for the module
Endpoints:
POST /api/tasks — create a task
GET /api/tasks — list current user's tasks
GET /api/tasks/:id — get single task
PUT /api/tasks/:id — update task
DELETE /api/tasks/:id — delete task
Zod validation schemas for request bodies
Protected by existing authMiddleware
Alternative solutions considered
Building the full task system (AI suggestions, Kanban, calendar, streaks) in one PR — rejected as too large for a single reviewable PR; better delivered incrementally.
Use case or motivation
Unblocks the Tasks Module roadmap item and gives the frontend a real API to build the Tasks UI against, incrementally.
References or mockups
Existing pattern: server/modules/user/ (routes → controller → service → repository → validation)
Additional context
Happy to follow up with status/statistics endpoints and frontend TasksPage as separate issues once this lands, to keep each PR reviewable.
Before submitting
Problem statement
The server/modules/tasks/ module is scaffolded (per the README roadmap) but currently empty. There's no Task model or API to create, read, update, or delete tasks, which blocks any task management functionality on the frontend.
Proposed solution
Implement the foundational layer only, following the existing module pattern (see server/modules/user/ or server/modules/codeforces/):
Task Mongoose model with core fields: title, description, category, priority, status, deadline, createdAt, updatedAt, linked to User by userId
routes.js, controller.js, service.js, repository.js, validation.js for the module
Endpoints:
POST /api/tasks — create a task
GET /api/tasks — list current user's tasks
GET /api/tasks/:id — get single task
PUT /api/tasks/:id — update task
DELETE /api/tasks/:id — delete task
Zod validation schemas for request bodies
Protected by existing authMiddleware
Alternative solutions considered
Building the full task system (AI suggestions, Kanban, calendar, streaks) in one PR — rejected as too large for a single reviewable PR; better delivered incrementally.
Use case or motivation
Unblocks the Tasks Module roadmap item and gives the frontend a real API to build the Tasks UI against, incrementally.
References or mockups
Existing pattern: server/modules/user/ (routes → controller → service → repository → validation)
Additional context
Happy to follow up with status/statistics endpoints and frontend TasksPage as separate issues once this lands, to keep each PR reviewable.