A complete, modern task and project management application with separate Admin and User interfaces. Built with React (Frontend) and Node.js + Express + MongoDB (Backend).
- Create & Manage Projects: Organize work into distinct projects
- Project Dashboard: Track progress, budget, and team members
- Project Statistics: View task completion rates and project status
- Team Assignment: Assign multiple users to projects
- Task CRUD Operations: Create, Read, Update, Delete tasks
- Task Assignment: Assign tasks to specific team members
- Task Status Tracking: Track tasks through their lifecycle (Pending β In Progress β Completed)
- Priority Levels: Set task priorities (Low, Medium, High)
- Due Dates: Set and track task deadlines
- Todo Checklists: Break tasks into subtasks with checkable items
- File Attachments: Attach files and images to tasks
- Progress Tracking: Automatic progress calculation based on checklist completion
- Role-Based Access Control: Admin and Member roles
- User Profiles: Manage user information and profiles
- Team Assignment: Assign users to projects and tasks
- Activity Tracking: Track user task counts and performance
- Admin Dashboard: Overview of all projects, tasks, and team performance
- User Dashboard: Personal task overview and statistics
- Task Statistics: View task distribution by status and priority
- Project Stats: Track project completion and progress
- Export Reports: Export task and user reports to Excel
- JWT Authentication: Secure token-based authentication
- Protected Routes: Role-based access control
- Password Hashing: Secure password storage with bcrypt
- Admin Token: Special token for admin registration
βββ backend/
β βββ config/
β β βββ db.js # MongoDB connection
β βββ controllers/
β β βββ authController.js # Authentication logic
β β βββ projectController.js # Project CRUD operations
β β βββ taskController.js # Task CRUD operations
β β βββ userController.js # User management
β β βββ reportController.js # Export reports
β βββ middlewares/
β β βββ authMiddleware.js # JWT verification & role checking
β β βββ uploadMiddleware.js # File upload handling
β βββ models/
β β βββ User.js # User schema
β β βββ Project.js # Project schema
β β βββ Task.js # Task schema
β βββ routes/
β β βββ authRoutes.js # Auth endpoints
β β βββ projectRoutes.js # Project endpoints
β β βββ taskRoutes.js # Task endpoints
β β βββ userRoutes.js # User endpoints
β β βββ reportRoutes.js # Report endpoints
β βββ uploads/ # Uploaded files directory
β βββ .env # Environment variables
β βββ package.json
β βββ server.js # Express server
β
βββ frontend/Task-Manager/
βββ src/
β βββ components/
β β βββ Sidebar.jsx # Navigation sidebar
β β βββ ProjectCard.jsx # Project card component
β βββ pages/
β β βββ Admin/
β β β βββ Dashboard.jsx # Admin dashboard
β β β βββ Projects.jsx # Project list
β β β βββ ProjectDetails.jsx # Project details
β β β βββ ProjectForm.jsx # Create/Edit project
β β β βββ ManageTask.jsx # Task list
β β β βββ CreateTask.jsx # Create/Edit task
β β β βββ ManageUsers.jsx # User management
β β βββ Users/
β β β βββ UserDashboard.jsx # User dashboard
β β β βββ MyTasks.jsx # User's tasks
β β β βββ ViewTaskDetails.jsx # Task details
β β βββ Auth/
β β βββ Login.jsx # Login page
β β βββ SignUp.jsx # Registration page
β βββ services/
β β βββ projectService.js # Project API calls
β β βββ taskService.js # Task API calls
β βββ utils/
β β βββ axiosInstance.js # Axios configuration
β β βββ apiPaths.js # API endpoints
β βββ App.jsx # Main app component
β βββ main.jsx # React entry point
βββ package.json
- Node.js (v16 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn
-
Navigate to backend directory:
cd backend -
Install dependencies:
npm install
-
Create
.envfile:# Server Configuration PORT=5000 # MongoDB Configuration MONGO_URI=mongodb://localhost:27017/task-manager # JWT Configuration JWT_SECRET=your_super_secret_jwt_key_here # Admin Configuration ADMIN_INVITE_TOKEN=admin_secret_token_123 # Client Configuration CLIENT_URL=http://localhost:5173
-
Start the server:
npm start
Server will run on
http://localhost:5000
-
Navigate to frontend directory:
cd frontend/Task-Manager -
Install dependencies:
npm install
-
Create
.envfile (if needed):VITE_API_URL=http://localhost:5000/api
-
Start the development server:
npm run dev
Frontend will run on
http://localhost:5173
| Method | Endpoint | Description | Access |
|---|---|---|---|
| POST | /api/auth/register |
Register new user | Public |
| POST | /api/auth/login |
User login | Public |
| GET | /api/auth/profile |
Get user profile | Private |
| PUT | /api/auth/profile |
Update profile | Private |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/projects |
Get all projects | Private |
| GET | /api/projects/:id |
Get project details | Private |
| POST | /api/projects |
Create new project | Admin |
| PUT | /api/projects/:id |
Update project | Admin |
| DELETE | /api/projects/:id |
Delete project | Admin |
| GET | /api/projects/:id/tasks |
Get project tasks | Private |
| GET | /api/projects/:id/stats |
Get project statistics | Private |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/tasks |
Get all tasks | Private |
| GET | /api/tasks/:id |
Get task by ID | Private |
| POST | /api/tasks |
Create new task | Admin |
| PUT | /api/tasks/:id |
Update task | Private |
| DELETE | /api/tasks/:id |
Delete task | Admin |
| PUT | /api/tasks/:id/status |
Update task status | Private |
| PUT | /api/tasks/:id/todo |
Update task checklist | Private |
| GET | /api/tasks/dashboard-data |
Get dashboard data | Admin |
| GET | /api/tasks/user-dashboard-data |
Get user dashboard | Private |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/users |
Get all users | Admin |
| GET | /api/users/:id |
Get user by ID | Admin |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/reports/export/tasks |
Export tasks to Excel | Admin |
| GET | /api/reports/export/user |
Export user report | Private |
| Variable | Description | Required | Example |
|---|---|---|---|
PORT |
Server port | No | 5000 |
MONGO_URI |
MongoDB connection string | Yes | mongodb://localhost:27017/task-manager |
JWT_SECRET |
JWT signing secret | Yes | your_secret_key |
ADMIN_INVITE_TOKEN |
Token for admin registration | Yes | admin_secret_123 |
CLIENT_URL |
Frontend URL for CORS | No | http://localhost:5173 |
| Variable | Description | Required | Example |
|---|---|---|---|
VITE_API_URL |
Backend API URL | No | http://localhost:5000/api |
-
Login as Admin
- Use admin credentials
- Navigate to Projects page
-
Create New Project
- Click "New Project" button
- Fill in project details:
- Project name (required)
- Description (required)
- Start and end dates (required)
- Priority (Low/Medium/High)
- Budget
- Status (Planning/Active/On-Hold/Completed/Cancelled)
- Click "Create Project"
-
Manage Project
- View project details
- Edit project information
- Track project progress
- View all project tasks
-
Navigate to Tasks
- Go to Tasks page OR
- Click "Add Task" from a Project
-
Fill Task Details
- Project (required) - Select the project
- Title (required) - Task name
- Description - Task details
- Priority - Low/Medium/High
- Due Date (required)
- Assign To - Select team members
- Todo Checklist - Add subtasks
- Attachments - Upload files
-
Task Status
- Tasks start as "Pending"
- Update to "In-Progress" when working
- Mark as "Completed" when done
-
Login
- Use member credentials
- View personal dashboard
-
View Projects
- See all projects you're assigned to
- View project details and tasks
-
Manage Tasks
- View all your assigned tasks
- Update task status
- Check off todo items
- View task details
- β Create, edit, delete projects
- β Create, edit, delete tasks
- β Assign tasks to users
- β View all projects and tasks
- β Manage users
- β Export reports
- β Access admin dashboard
- β View assigned projects
- β View assigned tasks
- β Update task status
- β Update task checklists
- β View task details
- β Create/delete projects
- β Create/delete tasks
- β Manage users
- express - Web framework
- mongoose - MongoDB ODM
- jsonwebtoken - JWT authentication
- bcryptjs - Password hashing
- cors - Cross-origin resource sharing
- dotenv - Environment variables
- multer - File upload handling
- exceljs - Excel report generation
- react - UI library
- react-router-dom - Routing
- axios - HTTP client
- react-hot-toast - Toast notifications
- react-icons - Icon library
- moment - Date formatting
- recharts - Charts and graphs
- tailwindcss - Utility-first CSS
- Modern Design - Clean, professional interface
- Responsive Layout - Works on desktop, tablet, and mobile
- Dark Sidebar - Elegant navigation
- Color-Coded Status - Easy visual status identification
- Real-time Updates - Instant feedback on actions
- Loading States - Smooth loading indicators
- Form Validation - Client-side validation
- Toast Notifications - User-friendly alerts
- JWT Authentication - Secure token-based auth
- Password Hashing - bcrypt encryption
- Protected Routes - Role-based access control
- Input Validation - Server-side validation
- CORS Configuration - Secure cross-origin requests
- HTTP-Only Tokens - Secure token storage
- Set environment variables on hosting platform
- Update
MONGO_URIto production MongoDB (MongoDB Atlas) - Set
CLIENT_URLto production frontend URL - Deploy backend code
- Update
VITE_API_URLto production backend URL - Build the project:
npm run build - Deploy the
distfolder
MongoDB Connection Error
- Ensure MongoDB is running
- Check
MONGO_URIin.env - Verify network connectivity
CORS Error
- Set correct
CLIENT_URLin backend.env - Check frontend API URL configuration
JWT Token Error
- Clear browser local storage
- Re-login to get a new token
Tasks Require Project Error
- Ensure all tasks have a project assigned
- Check that project exists before creating tasks
- Real-time notifications (Socket.io)
- Email notifications
- Task comments and activity log
- File preview for attachments
- Drag-and-drop task management
- Calendar view for tasks
- Team chat/messaging
- Time tracking
- Project templates
- Advanced analytics dashboard
Created with β€οΈ by [Your Name]
This project is MIT licensed.
Contributions, issues, and feature requests are welcome!
- 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
If you have any questions or need help, please open an issue in the repository.
Give a βοΈ if this project helped you!
Happy Coding! π