A full-stack MERN (MongoDB, Express, React, Node.js) application for managing tasks and projects with a modern, responsive user interface.
- Overview
- Features
- Tech Stack
- Project Structure
- Installation & Setup
- Running the Application
- API Endpoints
- Database Schema
- Frontend Routes
- Environment Variables
- Scripts
Task Manager is a productivity application that allows users to organize their work into projects and manage individual tasks. Each task can have priority levels, due dates, descriptions, and completion status. The application features a clean, intuitive UI built with React and styled with Tailwind CSS. View live project here
- Create, read, update, and delete tasks
- Set due dates and times for tasks
- Assign priority levels (Low, Medium, High)
- Mark tasks as important/starred
- Mark tasks as completed
- Add detailed descriptions to tasks
- Organize tasks within projects
- Create and manage multiple projects
- View all tasks associated with a project
- Default "My Tasks" project for ungrouped tasks
- Update project names
- View all tasks
- View completed tasks
- View starred/important tasks
- Runtime: Node.js
- Framework: Express.js v5.1.0
- Database: MongoDB with Mongoose v8.20.0
- Authentication: bcrypt v6.0.0
- CORS: cors v2.8.5
- Environment: dotenv v17.2.3
- Testing: Jest, Supertest, mongodb-memory-server
- Dev Tools: Nodemon
- Library: React v19.2.0
- Build Tool: Vite
- Styling: Tailwind CSS v4.1.17
- UI Components: Radix UI
- Form Handling: React Hook Form v7.66.1
- Validation: Zod v4.1.12
- HTTP Client: Axios v1.13.2
- Routing: React Router DOM v7.9.6
- Notifications: Sonner v2.0.7
- Icons: Lucide React v0.554.0
- Theme: next-themes v0.4.6
Task-Manager/
├── backend/
│ ├── src/
│ │ ├── server.js # Express server entry point
│ │ ├── config/
│ │ │ └── db.js # MongoDB connection config
│ │ ├── models/
│ │ │ ├── tasks.js # Task schema
│ │ │ └── projects.js # Project schema
│ │ └── routes/
│ │ ├── taskRoutes.js # Task API endpoints
│ │ └── projectRoutes.js # Project API endpoints
│ ├── package.json
│ └── pnpm-lock.yaml
│
├── frontend/
│ ├── src/
│ │ ├── main.jsx # React entry point
│ │ ├── App.jsx # Main app component with routes
│ │ ├── App.css
│ │ ├── index.css
│ │ ├── components/
│ │ │ ├── Layouts/ # Layout components
│ │ │ │ ├── mainLayout.jsx
│ │ │ │ ├── navbar.jsx
│ │ │ │ └── sidebar.jsx
│ │ │ └── ui/ # Reusable UI components
│ │ │ ├── accordion.jsx
│ │ │ ├── avatar.jsx
│ │ │ ├── button.jsx
│ │ │ ├── card.jsx
│ │ │ ├── taskCard.jsx
│ │ │ ├── taskModal.jsx
│ │ │ ├── projectModal.jsx
│ │ │ ├── projectAccordion.jsx
│ │ │ └── ... (other UI components)
│ │ ├── hooks/
│ │ │ └── use-mobile.js # Mobile detection hook
│ │ ├── lib/
│ │ │ ├── utils.js # Utility functions
│ │ │ └── APIs/ # API integration
│ │ │ ├── projectAPI.js
│ │ │ ├── tasksAPI.js
│ │ │ └── userAPI.js
│ │ ├── pages/
│ │ │ ├── AllTasks.jsx # All tasks view
│ │ │ ├── Completed.jsx # Completed tasks view
│ │ │ ├── Starred.jsx # Starred tasks view
│ │ │ ├── Login.jsx # Login page (in progress)
│ │ │ ├── Signup.jsx # Signup page (in progress)
│ │ │ ├── ResetPassword.jsx # Password reset (in progress)
│ │ │ └── schema.js # Zod schemas for validation
│ │ └── assets/
│ ├── public/
│ ├── vite.config.js
│ ├── package.json
│ └── pnpm-lock.yaml
│
└── README.md
- Node.js (v16 or higher)
- npm or pnpm package manager
- MongoDB (local or MongoDB Atlas)
git clone <repository-url>
cd Task-Managercd backend
# Install dependencies
pnpm install
# or
npm install
# Create .env file
cat > .env << EOF
PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/task-manager
ALLOWED_ORIGINS=http://localhost:5173
EOF
# Start the development server
pnpm devThe backend will run on http://localhost:5000
# In a new terminal, from project root
cd frontend
# Install dependencies
pnpm install
# or
npm install
# Start the development server
pnpm devThe frontend will run on http://localhost:5173
Backend (from backend/ directory):
pnpm dev # Uses nodemon for auto-reloadFrontend (from frontend/ directory):
pnpm dev # Vite development serverFrontend (from frontend/ directory):
pnpm build # Creates optimized production build
pnpm preview # Preview the production build locallyBackend (from backend/ directory):
pnpm start # Run production serverGET /api/tasks
Response:
{
"success": true,
"data": [
{
"_id": "507f1f77bcf86cd799439011",
"title": "Task Title",
"description": "Task description",
"dueDate": "2026-01-25",
"dueTime": "10:00",
"priority": "High",
"status": "Active",
"importance": false,
"projectId": "507f1f77bcf86cd799439012",
"createdAt": "2026-01-20T10:00:00Z",
"updatedAt": "2026-01-20T10:00:00Z"
}
]
}GET /api/tasks/project/:projectId
GET /api/tasks/:id
POST /api/tasks
Content-Type: application/json
{
"title": "New Task",
"description": "Task description",
"dueDate": "2026-01-25",
"dueTime": "10:00",
"priority": "Medium",
"projectId": "507f1f77bcf86cd799439012" // Optional, defaults to "My Tasks"
}
PUT /api/tasks/:id
Content-Type: application/json
{
"title": "Updated Title",
"description": "Updated description",
"priority": "High",
"status": "Completed",
"importance": true
}
DELETE /api/tasks/:id
GET /api/projects
GET /api/projects/:id
POST /api/projects
Content-Type: application/json
{
"name": "Project Name"
}
POST /api/projects/default
Creates "My Tasks" project if it doesn't exist.
PUT /api/projects/:id
Content-Type: application/json
{
"name": "Updated Project Name"
}
DELETE /api/projects/:id
{
title: String (max 100 chars, default: 'task'),
description: String (max 250 chars),
dueDate: String,
dueTime: String,
priority: String (enum: 'Low', 'Medium', 'High', default: 'Medium'),
status: String (enum: 'Active', 'Completed', default: 'Active'),
importance: Boolean (default: false),
projectId: ObjectId (ref: 'Project'),
createdAt: DateTime (auto),
updatedAt: DateTime (auto)
}{
title: String (max 100 chars, default: 'project'),
createdAt: DateTime (auto),
updatedAt: DateTime (auto)
}| Route | Component | Description |
|---|---|---|
/ |
AllTasks | Display all active tasks |
/completed |
Completed | Display completed tasks |
/starred |
Starred | Display starred/important tasks |
/login |
Login | User login (in progress) |
/signup |
Signup | User registration (in progress) |
/reset-password |
ResetPassword | Password reset (in progress) |
# Server Configuration
PORT=5000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/task-manager
# CORS
ALLOWED_ORIGINS=http://localhost:5173VITE_API_BASE_URL=http://localhost:5000/apipnpm dev # Start development server with auto-reload
pnpm start # Start production server
pnpm test # Run tests with Jestpnpm dev # Start Vite dev server
pnpm build # Build for production
pnpm preview # Preview production build
pnpm lint # Run ESLint- User authentication and authorization
- Drag-and-drop task management
- Task filtering and search
- Task dependencies
- Recurring tasks
- Task attachments
- Team collaboration features
- Task comments and notes
- Calendar view
- Export/Import functionality
- The application automatically creates a "My Tasks" default project for ungrouped tasks
- Tasks accept
projectIdon creation; if not provided, they default to the "My Tasks" project - The frontend uses Vite for fast development and optimized builds
- All UI components are built with Radix UI for accessibility
Contributions are welcome! Please feel free to submit a Pull Request.
ISC