A full-stack Task Management application built with Node.js, Express, MongoDB, and React.
- Create tasks with a title and description
- View a list of all tasks
- Mark tasks as completed
- Edit task details
- Delete tasks
- Data persistence using MongoDB
- Due dates for tasks with overdue detection
- Categorize tasks (General, Work, Personal, Shopping, Health)
- Task title cannot be empty (validated on both frontend and backend)
- Cannot mark an already completed task as complete
- Meaningful error messages displayed to the user
- Node.js — Runtime environment
- Express.js — Web framework
- MongoDB — Database
- Mongoose — MongoDB object modeling
- dotenv — Environment variable management
- cors — Cross-origin resource sharing
- React — UI library
- Vite — Build tool
- Axios — HTTP client for API calls
- CSS — Styling
task-manager/
├── config/
│ └── db.js # MongoDB connection
├── controllers/
│ └── taskController.js # Route handler functions
├── model/
│ └── Task.js # Mongoose task schema
├── routes/
│ └── TaskRoute.js # API route definitions
├── client/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ │ ├── TaskForm.jsx # Create and edit task form
│ │ │ ├── TaskList.jsx # List of all tasks
│ │ │ └── TaskItem.jsx # Single task card
│ │ ├── services/
│ │ │ └── taskService.js # Axios API call functions
│ │ ├── App.jsx # Main app component
│ │ └── App.css # Global styles
├── .env # Environment variables
├── app.js # Express app setup
└── server.js # Server entry point
- Node.js installed
- MongoDB Atlas account
git clone https://github.com/your-username/task-manager.git
cd task-managernpm installCreate a .env file in the root of task-manager:
PORT=5000
MONGO_URI=your_mongodb_connection_string
cd client
npm installcd task-manager
node server.jscd task-manager/client
npm run devMongoDB was chosen for its flexibility with document-based storage. Tasks can have optional fields like description, dueDate, and category without strict schema constraints.
Vite is the modern standard for React projects — faster than Create React App, lighter, and better developer experience.
All API calls are centralized in taskService.js using Axios. This keeps components clean and makes it easy to update API logic in one place.
No CSS framework was used to keep the project lightweight and demonstrate core CSS skills with a clean, minimal design.
Frontend — Basic checks are performed before sending requests so users get instant feedback (for example, when the task title is empty). This improves the overall user experience and avoids unnecessary API calls. Backend — All data is validated again on the server to ensure correctness and handle cases where requests might bypass the frontend.