A full-stack Task Manager with a REST API backend and React frontend. Built as a practical exercise covering CRUD operations, API integration, validation, and clean code structure.
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite |
| Backend | Node.js + Express |
| Storage | In-memory (array) |
| HTTP | Axios |
- Node.js 18+
- npm 9+
Both servers need to run simultaneously. Open two terminals.
cd backend
npm install
npm run devAPI is available at http://localhost:3001.
Use npm start instead of npm run dev to run without nodemon.
cd frontend
npm install
npm run devOpen http://localhost:5173 in your browser.
Custom API URL: create
frontend/.envand setVITE_API_URL=http://your-api-host
| Method | Endpoint | Body / Params | Description |
|---|---|---|---|
| GET | /tasks |
?status=completed|incomplete |
Return all (or filtered) tasks |
| POST | /tasks |
{ "title": "string" } |
Create a new task |
| PATCH | /tasks/:id |
{ "completed": bool, "title"?: string } |
Update a task |
| DELETE | /tasks/:id |
— | Delete a task |
All responses are JSON. Errors return { "error": "message" } with an appropriate HTTP status code.
{
"id": "uuid",
"title": "string",
"completed": false,
"createdAt": "ISO 8601 timestamp"
}Core requirements
- List all tasks
- Add a new task (with validation)
- Mark a task as complete / incomplete
- Delete a task
- Loading skeletons and inline error messages throughout
Bonus
- Filter tasks by All / Active / Done (routed to API via
?status=) - Edit task title inline (double-click the title or click the pencil icon)
- Progress bar showing completion ratio
task-manager/
├── backend/
│ ├── index.js # Entry point
│ └── src/
│ ├── app.js # Express setup, middleware, routes
│ ├── store.js # In-memory task array
│ ├── controllers/
│ │ └── taskController.js # CRUD handlers + validation
│ ├── routes/
│ │ └── tasks.js # Route definitions
│ └── middleware/
│ └── errorHandler.js # 404 + central error handler
│
├── frontend/
│ └── src/
│ ├── api.js # Axios API calls
│ ├── App.jsx # Root component
│ ├── hooks/
│ │ └── useTasks.js # All task state and operations
│ └── components/
│ ├── AddTaskForm.jsx
│ ├── FilterBar.jsx
│ └── TaskItem.jsx
│
└── README.md
See NOTES.md for a dedicated write-up.