A robust full-stack task management web application built with React, Node.js, Express, MongoDB, JavaScript, CSS, and Webpack.
Designed with clean architecture patterns: an MVC backend with Mongoose validation, a container/presentational split on the frontend, an Object-Oriented TaskManager service layer, component-scoped BEM CSS, and production deployment configuration for Vercel.
- Full Task Lifecycle Management:
- Full CRUD: Create, read, update, delete tasks.
- Three-tier status tracking: To Do, In Progress, and Done.
- Dynamic status filtering via REST API (
?status=todo|in-progress|done) and one-click quick-filter counters. - Priority levels (
low,medium,high) and due-date tracking with visual overdue indicators.
- Frontend Architecture:
- Stateful Container & Stateless Presentational Components:
TaskListContainer: Stateful container managing data fetching, status filters, task mutations, and application state.TaskList,TaskItem,TaskForm: Stateless presentational components rendering props and delegating user events.
- Object-Oriented
TaskManagerClass:- Encapsulates all REST API interactions (
fetchAll,fetchOne,create,update,setStatus,remove) into a clean class insrc/utils/TaskManager.js. - Components never invoke
fetchdirectly, ensuring separation of concerns.
- Encapsulates all REST API interactions (
- Stateful Container & Stateless Presentational Components:
- Backend Architecture:
- MVC Pattern:
models/Task.js: Mongoose schema with strict validation rules, enums, character limits, and automatic timestamps (createdAt,updatedAt).controllers/taskController.js: Business logic and HTTP response handling with defensive error checking.routes/taskRoutes.js: Clean REST routing with route chaining.
- Connection pooling with serverless cache optimization for deployment on Vercel.
- MVC Pattern:
- Custom Webpack & Babel Build Pipeline:
- Built from scratch with Webpack 5 and Babel.
babel-loaderfor modern ES6+ and JSX compilation.style-loaderandcss-loaderfor bundling CSS.webpack-dev-serverwith automated/apireverse-proxy targetinghttp://localhost:5000.
- Component-Scoped, BEM-Style CSS:
- Strictly follows Block-Element-Modifier (
block__element--modifier) naming conventions. - Component-scoped stylesheets (
TaskItem.css,TaskForm.css,App.css) imported directly into corresponding components.
- Strictly follows Block-Element-Modifier (
- Production-Ready Vercel Deployment:
- Pre-configured
vercel.jsonwith monorepo full-stack serverless functions and static build output. - Serverless function wrapper in
api/index.jsexporting the Express application.
- Pre-configured
task-manager/
├── api/
│ └── index.js # Vercel serverless function entry point
├── backend/
│ ├── config/
│ │ └── db.js # Mongoose connection with serverless connection pooling
│ ├── controllers/
│ │ └── taskController.js # MVC Controller: CRUD + status filter logic
│ ├── models/
│ │ └── Task.js # MVC Model: Mongoose schema with validations & timestamps
│ ├── routes/
│ │ └── taskRoutes.js # MVC Routes: REST endpoints
│ ├── .env.example # Backend environment variable template
│ ├── package.json # Backend dependencies and scripts
│ └── server.js # Express app setup and server listener
├── frontend/
│ ├── public/
│ │ └── index.html # HTML template
│ ├── src/
│ │ ├── components/ # Stateless presentational components
│ │ │ ├── TaskForm.jsx # Task creation form
│ │ │ ├── TaskItem.jsx # Task card with inline edit, status toggle & delete
│ │ │ └── TaskList.jsx # Task list renderer with loading/empty states
│ │ ├── containers/ # Stateful container components
│ │ │ └── TaskListContainer.jsx # State management, stats counters & filter bar
│ │ ├── styles/ # Component-scoped BEM CSS
│ │ │ ├── App.css
│ │ │ ├── TaskForm.css
│ │ │ └── TaskItem.css
│ │ ├── utils/
│ │ │ └── TaskManager.js # OOP Class managing API communication & lifecycles
│ │ ├── App.jsx # Application root component
│ │ └── index.js # React 18 DOM mount point
│ ├── .babelrc # Babel presets for JSX and ESNext
│ ├── package.json # Frontend dependencies and scripts
│ ├── vercel.json # Standalone frontend Vercel rewrite configuration
│ └── webpack.config.js # Webpack 5 configuration with dev-server proxy
├── .gitignore # Git ignore rules (node_modules, .env, dist, .vercel)
├── package.json # Root monorepo script runner
├── README.md # Comprehensive project documentation
└── vercel.json # Root full-stack Vercel deployment configuration
- Node.js (v18 or higher recommended)
- MongoDB (local instance running on
mongodb://127.0.0.1:27017or a free MongoDB Atlas cluster)
Install dependencies for both backend and frontend from the project root:
npm run install:allcd backend
# Create .env from template
cp .env.example .env
# Start backend server in development mode (nodemon)
npm run devThe Express API will start on http://localhost:5000.
In a separate terminal:
cd frontend
# Start Webpack dev server with hot reloading & API proxy
npm startThe React application will open in your browser at http://localhost:3000. Any requests to /api are automatically proxied to http://localhost:5000.
To generate the optimized production bundle:
cd frontend
npm run buildThis compiles minified, cache-busted assets into frontend/dist/.
All task endpoints are prefixed with /api/tasks.
| Method | Endpoint | Query / Body Parameters | Description |
|---|---|---|---|
GET |
/api/tasks |
?status=todo / in-progress / done |
List all tasks (or filtered by status) |
GET |
/api/tasks/:id |
id (MongoDB ObjectId) |
Get single task by ID |
POST |
/api/tasks |
{ title, description, priority, dueDate, status } |
Create a new task |
PUT |
/api/tasks/:id |
{ title?, description?, priority?, dueDate?, status? } |
Update task details or status |
DELETE |
/api/tasks/:id |
id (MongoDB ObjectId) |
Delete task by ID |
{
"title": "Build Webpack Pipeline",
"description": "Configure Babel loader, CSS loader, and dev server proxy",
"priority": "high",
"status": "in-progress",
"dueDate": "2026-11-05"
}{
"status": "done"
}This repository is configured for seamless deployment on Vercel.
- Push your repository to GitHub / GitLab / Bitbucket.
- Sign in to Vercel and select Add New Project -> Import your repository.
- Keep the Root Directory as
./(the repository root). The rootvercel.jsonwill automatically configure:- Frontend static compilation via
@vercel/static-buildoutputtingfrontend/dist. - Backend Express serverless functions via
@vercel/node.
- Frontend static compilation via
- In the Environment Variables section on Vercel, add:
MONGO_URI: Your MongoDB Atlas connection string:mongodb+srv://<username>:<password>@cluster.mongodb.net/task_manager?retryWrites=true&w=majorityNODE_ENV:production
- Click Deploy. Vercel will build the frontend bundle, deploy the serverless API routes, and provide your live URL!
If you prefer to host your backend on Render, Railway, or Heroku:
- Set the Vercel Root Directory to
frontend. - Set the build command to
npm run buildand output directory todist. - Set the environment variable:
API_URL: Your hosted backend URL (e.g.https://my-backend.railway.app).
- Click Deploy.