TASK MANAGER
Technologies: MERN Stack (Next.js is a bonus) or React Natvie application
Objective:
Build a “Task Manager” application to demonstrate API development, database design, frontend optimizations, state management, and clean coding skills.
Task Requirements:
-
User Authentication:
- Implement JWT-based login and signup.
- Protect API routes using JWT.
-
Task Management:
- Create, update, delete, and mark tasks as completed.
- Attributes: Title, Description, Due Date, Priority, Completion Status, Date Created.
-
Sorting & Filtering:
- Sort tasks by title, due date, or priority.
- Filter by completion status or due date range.
-
State Management:
- Manage app-wide state using React Context or Redux.
-
Database Design (MongoDB):
- Design schemas for users and tasks with relationships.
Frontend Requirements:
- Responsive design (mobile-first).
- Debounced search to filter tasks by title.
- Form validation with user-friendly error messages.
Frontend Optimizations:
- Code splitting and lazy loading.
- Minimize re-renders using memoization.
- Efficient API handling with debouncing and throttling.
Submission:
- Upload the project to a GitHub repository.
- Include setup instructions and documentation.
- Ensure modular, clean, and maintainable code.
Bonus Features:
- Dark/light mode toggle.
- Pagination for task lists.
- Multi-filtering support.
Estimated Time: 2-3 Days
We look forward to seeing your solution!
API ENDPOINTS
Authentication Endpoints
-
POST
/api/signup
- Description: Create a new user account.
- Request Body:
{ "email": "user@example.com", "password": "password123" }
- Response:
{ "message": "User registered successfully" }
-
POST
/api/login
- Description: Authenticate user and return a JWT token.
- Request Body:
{ "email": "user@example.com", "password": "password123" }
- Response:
{ "token": "your-jwt-token" }
-
GET
/api/me
- Description: Retrieve details of the logged-in user using the JWT.
- Authorization: Bearer token required.
- Response:
{ "id": "user-id", "email": "user@example.com" }
Task Management Endpoints
-
GET
/api/tasks
-
Description: Retrieve the list of tasks for the logged-in user.
-
Authorization: Bearer token required.
-
Query Params (Optional):
sort
(e.g., “title”, “dueDate”)filter
(e.g., “completed”, “pending”)
-
Response:
[ { "id": "task-id", "title": "Buy groceries", "description": "Milk, eggs, and bread", "dueDate": "2025-02-15", "priority": "High", "completed": false } ]
-
-
POST
/api/tasks
- Description: Create a new task.
- Request Body:
{ "title": "Complete project", "description": "Finalize the Task Manager project", "dueDate": "2025-02-20", "priority": "Medium" }
- Response:
{ "message": "Task created successfully", "task": { "id": "task-id" } }
-
PUT
/api/tasks/:id
- Description: Update task details or mark it as completed.
- Request Body (Example – Mark Completed):
{ "completed": true }
- Response:
{ "message": "Task updated successfully" }
-
DELETE
/api/tasks/:id
- Description: Delete a task by its ID.
- Response:
{ "message": "Task deleted successfully" }
SUBMISSION
Note
Please make sure you have completed all required features and optimizations before submitting the form. Once submitted, your work will be reviewed, and further changes may not be possible