A comprehensive full-stack task management application built with React, Node.js, Express, and MongoDB. This system provides role-based access control with separate interfaces for administrators and team members to efficiently manage tasks and track progress.
- Dashboard Analytics: View comprehensive statistics including total tasks, pending tasks, completed tasks, and overdue tasks
- Task Management: Create, update, delete, and assign tasks to team members
- User Management: View all team members and their task statistics
- Task Filtering: Filter tasks by status (All, Pending, In Progress, Completed)
- Progress Tracking: Monitor task completion rates and team productivity
- Excel Reports: Export task and user data to Excel files for reporting
- File Attachments: Add attachments to tasks for additional context
- Dashboard Analytics: View statistics for tasks they created
- Task Management: Create, update, delete tasks they created and assign to team members
- User Management: View team members and leaders (but cannot manage users)
- Task Filtering: Filter tasks by status for their created tasks
- Progress Tracking: Monitor completion rates for their created tasks
- Excel Reports: Export data for tasks they created and users they can see
- Personal Dashboard: View personal task statistics and recent assignments
- My Tasks: View all assigned tasks with filtering capabilities
- Task Details: View detailed task information including description, due dates, and attachments
- Todo Checklist: Mark checklist items as complete and track progress
- Status Updates: Automatic status updates based on checklist completion
- Profile Management: Update personal profile information and avatar
- Authentication & Authorization: Secure login/signup with JWT tokens
- Role-based Access Control: Admin, Leader, and Member roles with appropriate permissions
- Real-time Progress Tracking: Automatic task status updates based on checklist completion
- File Upload: Support for profile images and task attachments
- Responsive Design: Mobile-friendly interface built with Tailwind CSS
- Data Visualization: Charts and graphs for task analytics using Recharts
- React 19: Modern React with hooks and functional components
- Vite: Fast build tool and development server
- React Router DOM: Client-side routing
- Tailwind CSS: Utility-first CSS framework
- Axios: HTTP client for API requests
- React Hot Toast: Toast notifications
- React Icons: Icon library
- Recharts: Data visualization library
- Moment.js: Date manipulation and formatting
- Node.js: JavaScript runtime
- Express.js: Web application framework
- MongoDB: NoSQL database
- Mongoose: MongoDB object modeling
- JWT: JSON Web Tokens for authentication
- bcryptjs: Password hashing
- Multer: File upload handling
- ExcelJS: Excel file generation
- CORS: Cross-origin resource sharing
- Docker: Containerization
- Docker Compose: Multi-container orchestration
- ESLint: Code linting
- Prettier: Code formatting
- Nodemon: Development auto-restart
task-management/
βββ backend/ # Node.js/Express backend
β βββ config/ # Database configuration
β βββ controllers/ # Route controllers
β βββ middlewares/ # Custom middlewares
β βββ models/ # Mongoose schemas
β βββ routes/ # API routes
β βββ uploads/ # File uploads directory
β βββ server.js # Main server file
β βββ package.json # Backend dependencies
βββ frontend/ # React frontend
β βββ public/ # Static assets
β βββ src/ # Source code
β β βββ components/ # Reusable components
β β βββ context/ # React context providers
β β βββ hooks/ # Custom hooks
β β βββ pages/ # Page components
β β βββ routes/ # Route configurations
β β βββ utils/ # Utility functions
β βββ package.json # Frontend dependencies
βββ mongodb-data/ # MongoDB data directory
βββ uploads/ # Shared uploads directory
βββ docker-compose.yml # Docker configuration
- Node.js (v18 or higher)
- MongoDB (v6 or higher)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/HuynhKhanh1402/task-management.git cd task-management -
Backend Setup
cd backend npm install cp .env.example .envUpdate the
.envfile with your configuration:PORT=8000 MONGO_URI=mongodb://localhost:27017/task-management CLIENT_URL=http://localhost:5173 JWT_SECRET=your_jwt_secret_here NODE_ENV=development
-
Frontend Setup
cd ../frontend npm install cp .env.example .envUpdate the
.envfile:VITE_API_URL=http://localhost:8000 VITE_ENV=development
-
Start MongoDB Make sure MongoDB is running on your system or use Docker:
docker run -d -p 27017:27017 --name mongodb mongo:latest
-
Run the Application
Backend (Terminal 1):
cd backend npm run devFrontend (Terminal 2):
cd frontend npm run dev
- Run with Docker Compose
docker-compose up -d
This will start:
- Frontend on
http://localhost:5173 - Backend on
http://localhost:8000 - MongoDB on
http://localhost:27017
- Register a new account at
/signup - Use the admin invite token (set in environment variables) to create an admin account
- Login with admin credentials to access administrative features
- Register a new account at
/signup - Use the leader invite token (set in environment variables) to create a leader account
- Login with leader credentials to access leader features
- Dashboard: View system-wide statistics and charts
- Manage Tasks: Create new tasks, assign to team members, set priorities and due dates
- Manage Users: View all team members and their task progress
- Reports: Export data to Excel for external analysis
- Dashboard: View statistics for tasks they created
- Manage Tasks: Create, update, delete tasks they created
- Team Members: View team members and other leaders (no management capability)
- Reports: Export data for their created tasks
- Dashboard: View personal task statistics
- My Tasks: View assigned tasks and update progress
- Task Details: Complete checklist items and track progress
- Profile: Update personal information and profile image
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profile
GET /api/tasks- Get tasks (filtered by role: Admin sees all, Leader sees created, Member sees assigned)POST /api/tasks- Create new task (Admin and Leader only)GET /api/tasks/:id- Get task by ID (with role-based access)PUT /api/tasks/:id- Update task (with role-based permissions)DELETE /api/tasks/:id- Delete task (Admin or task creator only)PUT /api/tasks/:id/status- Update task statusPUT /api/tasks/:id/todo- Update task checklist
GET /api/users- Get users (Admin sees all members, Leader sees members and leaders)PUT /api/users/:id- Update user (Admin only)DELETE /api/users/:id- Delete user (Admin only)
GET /api/reports/export/tasks- Export tasks to ExcelGET /api/reports/export/users- Export users to Excel
Coming soon
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- HuynhKhanh1402 - Initial work - HuynhKhanh1402
- React team for the amazing framework
- MongoDB team for the excellent database
- All contributors who helped make this project better
β Star this repository if you find it helpful!
For more information or support, please open an issue on GitHub.