A full-stack task management application built with MongoDB, Express, React, and Node.js. It supports authentication, role-aware task operations, dashboards, checklist progress tracking, image uploads, and Excel report exports.
- Overview
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Environment Variables
- Installation
- Run the App
- API Reference
- Authentication
- Task Status Rules
- File Uploads
- Reports
- Recent Updates
- Known Notes
- Roadmap Ideas
- Author
This project is organized into two top-level apps:
Backend/: REST API, auth, MongoDB models, uploads, reporting.Frontend/: React + Vite dashboard UI for admin/member workflows.
- JWT-based user authentication (
register,login,profile) - Role model in backend (
admin,member) - Admin-focused task creation/management
- Task assignment to one or more users
- Task checklist with automatic progress calculation
- Status-aware dashboards (
Pending,In_Progress,Completed) - Image upload API with multer (JPEG/PNG, max 5MB)
- Excel report export for tasks and users
- Responsive frontend with charts and cards
- Dark/Light mode toggle
- Toast Notifications: Real-time user feedback with success, error, info, and warning notifications across the application
- Task Comments: Team collaboration feature - users can add, view, and manage comments on tasks they're assigned to
- Edit Profile: Both users and admins can update their profile (name, email, password, profile photo)
- Admin User Enrollment: Admins can create new users directly from the dashboard with optional admin role assignment via invite token
- Sidebar Integration: New "Edit Profile" and "Add User" menu items in admin and user sidebars
- React 19
- Vite
- React Router
- Axios
- Tailwind CSS 4
- Recharts
- React Toastify
- Node.js
- Express 5
- MongoDB + Mongoose
- JWT (
jsonwebtoken) bcryptjsmulterexceljsdotenv
Task_Manager/
├── Backend/
│ ├── config/
│ ├── controllers/
│ ├── middlewares/
│ ├── models/
│ ├── routes/
│ ├── uploads/
│ ├── package.json
│ └── server.js
├── Frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── context/
│ │ ├── hooks/
│ │ ├── pages/
│ │ ├── routes/
│ │ └── utils/
│ └── package.json
└── README.md
- Node.js 18+
- npm 9+
- MongoDB instance (local or Atlas)
Create Backend/.env:
PORT=8000
MONGO_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173
ADMIN_INVITE_TOKEN=optional_admin_invite_tokenFrontend is currently configured with:
Frontend/src/utils/apiPath.js→BASE_URL = 'http://localhost:8000'
So backend should run on port 8000 unless you also change frontend base URL.
From project root:
# Backend dependencies
cd Backend
npm install
# Frontend dependencies
cd ../Frontend
npm installUse two terminals:
cd Backend
npm run devBackend: http://localhost:8000
cd Frontend
npm run devFrontend (Vite default): http://localhost:5173
Base URL: http://localhost:8000
POST /register- Register new userPOST /login- Login and receive JWTGET /profile- Get current user profile (protected)PUT /profile- Update current user profile (protected)POST /upload-image- Upload profile image (multipart/form-data, field:image)POST /uploads- Additional upload endpoint fromserver.js(multipart/form-data, field:image)
GET /- Get users (admin only)GET /:id- Get single userPOST /- Create user (admin only) - NEWDELETE /:id- Delete user (admin only)
GET /dashboard-data- Admin dashboard summaryGET /user-dashboard-data- Current user dashboard summaryGET /- List tasks (?status=Pending|In_Progress|Completed)GET /:id- Get task by IDPOST /- Create task (admin only)PUT /:id- Update taskDELETE /:id- Delete task (admin only)PUT /:id/status- Update task statusPUT /:id/todo- Update checklist + auto progress/statusGET /:id/comments- Get all comments on a task (protected) - NEWPOST /:id/comments- Add comment to task (protected) - NEW
GET /exports/tasks- Download task report.xlsx(admin only)GET /exports/users- Download user report.xlsx(admin only)
Protected routes require header:
Authorization: Bearer <jwt_token>Token is generated on login/register and expires in 7 days.
Supported canonical statuses in backend:
PendingIn ProgressCompleted
Backend also normalizes variants like in progress, in-progress, In Progress.
Checklist updates automatically recalculate:
progresspercentage- status transition (
Pending→In_Progress→Completed)
Upload constraints:
- Allowed formats:
.jpg,.jpeg,.png - Max size: 5MB
- Storage:
Backend/uploads/
Static access:
GET /uploads/<filename>
Exports use exceljs and return downloadable Excel files:
task_report.xlsxuser_report.xlsx
- Integrated
react-toastifyfor real-time user feedback - Implemented 4 notification types:
success,error,info,warning - Applied across: Login, User Creation, Profile Updates, Comment Operations
- Files Modified:
Frontend/src/utils/toast.js(NEW)Frontend/src/main.jsxFrontend/src/pages/Auth/Login.jsxFrontend/src/pages/Admin/CreateUser.jsxFrontend/src/pages/EditProfile.jsx
- Team members can add and view comments on tasks
- Only task collaborators and admins can comment
- Real-time comment updates with timestamps
- User avatars and names shown with each comment
- Backend:
Backend/models/Task.js- Addedcommentsschema fieldBackend/controllers/taskController.js- AddedaddComment()andgetComments()Backend/routes/taskRoute.js- Added comment endpoints
- Frontend:
Frontend/src/pages/User/ViewTaskDetails.jsx- Full comment UI
- Edit profile page for both users and admins
- Update: name, email, password, profile photo
- New Routes:
/admin/edit-profile(Admin)/user/edit-profile(User)
- Files Modified:
Frontend/src/pages/EditProfile.jsx(NEW)Frontend/src/components/Inputs/ProfilePhotoSelector.jsx- Enhanced
- Admins can create new users from dashboard
- Optional role assignment via
ADMIN_INVITE_TOKEN - Direct user management without signup page
- New Route:
/admin/create-user - Files Modified:
Frontend/src/pages/Admin/CreateUser.jsx(NEW)Backend/controllers/userController.js- AddedcreateUser()
- Added "Add User" menu item in admin sidebar
- Added "Edit Profile" menu item in both sidebars
- Improved sidebar organization
- Files Modified:
Frontend/src/utils/data.js
- In backend env, key is
MONGO_URL(notMONGO_URI). - Frontend API base URL is hardcoded in
Frontend/src/utils/apiPath.js. - Backend report routes are
/api/reports/exports/.... Frontend/src/utils/apiPath.jscurrently uses/api/reports/export/...(withouts) for reports.
- Complete user
GET /:idandDELETE /:idcontroller logic. - Add pagination/filtering/sorting for task list endpoints.
- Add automated tests for API routes and auth middleware.
- Move frontend API base URL to
.env(VITE_API_BASE_URL).
Made by Arya.








