A full-stack Task Management application that allows users to create, view, update, and delete tasks. Tasks can be filtered based on their status (All, Todo, In Progress, Completed) and each task has details like Title, Description, Due Date, Created At, and Updated At.
-
Add, Edit, and Delete Tasks:
- Users can create tasks with a title, description, and due date.
- Tasks can be edited to update their details or status.
- Users can delete tasks they no longer need.
-
Filter Tasks:
- Filter tasks based on their status: All, Todo, In Progress, Completed.
- Active filter highlights to indicate the selected filter.
-
Task Details:
- Clicking on a task card redirects to a detailed page that displays:
- Title
- Description
- Due Date
- Created At
- Updated At
- Clicking on a task card redirects to a detailed page that displays:
-
Task Persistence:
- Tasks are saved to a file (
tasks.json) for persistence.
- Tasks are saved to a file (
-
CRUD Operations:
- API endpoints for creating, reading, updating, and deleting tasks.
-
Filter and Search:
- Filter tasks by status.
- Search for a task by its unique ID.
-
Automatic Timestamps:
- Each task has
createdOnandlastEditedOnfields, which are automatically updated.
- Each task has
-
React:
- Functional components with hooks (
useState,useEffect, and custom context). - Tailwind CSS for styling.
- Functional components with hooks (
-
React Router:
- Handles navigation between the Task List and Task Details pages.
-
Node.js:
- Backend logic using
expressfor handling routes.
- Backend logic using
-
File System:
fsmodule for reading/writing tasks totasks.json.
-
Utility Functions:
fileUtils.jsfor managing task file operations (e.g., loading, saving).taskUtils.jsfor task-specific logic (e.g., validation, filtering).
- Navigate to the
frontenddirectory:cd frontend - Install dependencies:
npm install - Start the development server:
npm start - The app will be available at http://localhost:3000.
- Navigate to the
backenddirectory:cd backend - Install dependencies:
npm install - Start the server:
node index.js - The backend will be running at http://localhost:5000.
- Endpoint:
GET /tasks - Query Parameters:
status(optional, e.g.,todo,completed,in-progress) - Response:
[ { "_id": "qedp1d8as", "title": "Study", "description": "DSA", "status": "todo", "dueDate": "2024-11-19T00:00:00.000Z", "createdOn": "2024-11-18T18:13:15.272Z", "lastEditedOn": "2024-11-18T18:13:15.272Z" } ]
- Endpoint:
GET /tasks/:id - Response:
{ "_id": "qedp1d8as", "title": "Study", "description": "DSA", "status": "todo", "dueDate": "2024-11-19T00:00:00.000Z", "createdOn": "2024-11-18T18:13:15.272Z", "lastEditedOn": "2024-11-18T18:13:15.272Z" }
- Endpoint:
POST /tasks - Request Body:
{ "title": "New Task", "description": "New Description", "status": "todo", "dueDate": "2024-11-20" } - Response:
{ "_id": "xyz123", "title": "New Task", "description": "New Description", "status": "todo", "dueDate": "2024-11-20T00:00:00.000Z", "createdOn": "2024-11-17T13:00:00.000Z", "lastEditedOn": "2024-11-17T13:00:00.000Z" }
- Endpoint:
PUT /tasks/:id - Request Body:
{ "title": "Updated Title", "description": "Updated Description", "dueDate": "2024-11-21" } - Response:
{ "_id": "xyz123", "title": "Updated Title", "description": "Updated Description", "status": "todo", "dueDate": "2024-11-21T00:00:00.000Z", "createdOn": "2024-11-17T13:00:00.000Z", "lastEditedOn": "2024-11-17T14:00:00.000Z" }
- Endpoint:
DELETE /tasks/:id - Response:
{ "message": "Task deleted" }
