A comprehensive task management system built with React, Node.js, Express, and MongoDB. This application allows teams to efficiently manage tasks, track progress, and collaborate seamlessly.
- Role-based Authentication (Admin & Member)
- User Registration & Login with JWT authentication
- Profile Management with avatar support
- Team Member Overview with task statistics
- Dashboard with interactive charts and analytics
- Task Management (Create, Read, Update, Delete)
- User Management (View team members and their task statistics)
- Advanced Task Assignment to multiple team members
- Progress Tracking with visual progress bars
- Report Generation (Export tasks and user data to Excel)
- Personal Dashboard with assigned task overview
- Task Status Updates (Pending β In Progress β Completed)
- Todo Checklist Management within tasks
- Task Details View with attachments and due dates
- Personal Task Reports (Export personal tasks to Excel)
- Priority Levels (Low, Medium, High)
- Due Date Management with proper date formatting
- Status Tracking (Pending, In Progress, Completed)
- Todo Checklists with progress tracking
- File Attachments support
- Task Assignment to multiple users
- Progress Visualization with completion percentages
- Responsive Design (Mobile, Tablet, Desktop)
- Modern UI with TailwindCSS
- Interactive Charts using Recharts
- Toast Notifications for user feedback
- Dark/Light Theme Support
- Avatar System with fallback initials
- Mobile-Friendly Sidebar with backdrop overlay
- React 19 - UI Framework
- Vite - Build tool and dev server
- TailwindCSS 4 - Styling framework
- React Router DOM - Client-side routing
- Axios - HTTP client
- Recharts - Chart library
- React Hot Toast - Notification system
- React Icons - Icon library
- Moment.js - Date manipulation
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcryptjs - Password hashing
- ExcelJS - Excel file generation
- Multer - File upload handling
- CORS - Cross-origin resource sharing
Task-Manager/
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ Cards/ # Task cards, User cards, Info cards
β β β βββ Charts/ # Custom charts (Pie, Bar)
β β β βββ Inputs/ # Form inputs, User selection
β β β βββ layouts/ # Layout components (Sidebar, Navbar)
β β βββ pages/ # Page components
β β β βββ Admin/ # Admin-only pages
β β β βββ Auth/ # Authentication pages
β β β βββ Users/ # User pages
β β βββ context/ # React context (User context)
β β βββ hooks/ # Custom React hooks
β β βββ utils/ # Utility functions and configurations
β βββ public/ # Static assets
β βββ package.json
β
βββ server/ # Backend Node.js application
β βββ config/ # Database configuration
β βββ controllers/ # Route controllers
β βββ middleware/ # Custom middleware
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ uploads/ # File upload directory
β βββ server.js # Entry point
β βββ package.json
β
βββ README.md # Project documentation
- Node.js (v16 or higher)
- MongoDB (local or cloud instance)
- npm package manager
-
Clone the repository
git clone https://github.com/ChandrakantaMandal/Task-Manager cd Task-Manager -
Install Backend Dependencies
cd server npm install -
Install Frontend Dependencies
cd ../client npm install -
Environment Setup
Create a
.envfile in theserverdirectory:The Example File is Given in the server folder as .env.example
-
Database Setup
- Ensure MongoDB is running locally or provide a cloud MongoDB URI
- The application will create collections automatically
-
Start the Backend Server
cd server npm start # or for development with auto-reload npm run dev
Backend will run on
http://localhost:8080 -
Start the Frontend Development Server
cd client npm run devFrontend will run on
http://localhost:5173 -
Access the Application
- Open your browser and navigate to
http://localhost:5173 - Register a new account or use existing credentials
- Open your browser and navigate to
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/profile- Get user profile
GET /api/tasks- Get all tasks (filtered by user role)GET /api/tasks/:id- Get task by IDPOST /api/tasks- Create new task (Admin only)PUT /api/tasks/:id- Update task (Admin only)DELETE /api/tasks/:id- Delete task (Admin only)PATCH /api/tasks/:id/status- Update task statusPATCH /api/tasks/:id/todo- Update task checklist
GET /api/users- Get all users (Admin only)GET /api/users/:id- Get user by ID
GET /api/reports/export/tasks- Export tasks to ExcelGET /api/reports/export/users- Export user statistics to Excel
GET /api/tasks/dashboard-data- Get admin dashboard dataGET /api/tasks/user-dashboard-data- Get user dashboard data
Layout Components:
DashboardLayout- Main application layoutNavbar- Navigation bar with mobile sidebarSideMenu- Sidebar navigation with role-based menus
Card Components:
TaskCard- Individual task display with progressUserCard- User information with task statisticsInfoCard- Statistical information display
Chart Components:
CustomPieChart- Task distribution visualizationCustomBarChart- Task priority level visualization
Form Components:
SelectUsers- Multi-user selection with searchTodoListInput- Dynamic todo list management
- JWT-based Authentication with secure token storage
- Role-based Access Control (Admin vs Member permissions)
- Protected Routes with authentication middleware
- Automatic Token Refresh handling
- Admin: Full access to all features, task management, user management
- Member: Limited access to assigned tasks, personal dashboard
- Task distribution pie chart
- Priority level bar chart
- Statistical overview (Total, Pending, In Progress, Completed tasks)
- Recent tasks table
- Team performance metrics
- Personal task statistics
- Assigned task overview
- Progress tracking
- Personal task distribution
- Multi-user assignment with visual user selection
- Search functionality for large teams
- Real-time user availability display
- Profile image fallbacks with user initials
- Automatic progress calculation based on checklist completion
- Visual progress bars with status-based colors
- Real-time status updates
- Excel export for tasks with full details
- User statistics export with task breakdown
- Formatted reports with proper headers
- Download progress feedback
- Adaptive sidebar with backdrop overlay
- Touch-friendly interface
- Responsive card layouts
- Mobile-optimized forms
-
CORS Errors:
- Ensure backend allows frontend origin in CORS configuration
- Check if both servers are running on correct ports
-
Database Connection:
- Verify MongoDB is running
- Check connection string in
.envfile - Ensure database permissions are correct
-
Authentication Issues:
- Clear localStorage and login again
- Check JWT secret consistency
- Verify token expiration settings
-
File Upload Problems:
- Check upload directory permissions
- Verify file size limits
- Ensure multer configuration is correct
- Set environment variables in deployment platform
- Configure MongoDB Atlas connection
- Update CORS origins for production domain
- Deploy using platform-specific methods
- Build the React application:
npm run build - Deploy the
distfolder - Configure environment variables for API URL
- Set up redirects for SPA routing
- Fork the project
- Create your 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.md file for details.
Your Name
- GitHub: @yourusername
- Email: your.email@example.com
- React.js team for the amazing framework
- TailwindCSS for the utility-first CSS framework
- MongoDB team for the excellent database
- All contributors and the open-source community
β If you found this project helpful, please give it a star!