A full-stack web application for managing projects, assigning tasks, and tracking team progress with role-based access control.
π Frontend-Url: https://task-manager-51cn.vercel.app
π Backend-Urk: https://task-manager-production-ff41.up.railway.app
- Authentication β Secure signup/login with JWT-based session management
- Role-Based Access Control β Admin and Member roles with distinct permissions
- Project Management β Create and manage projects with team members
- Task Management β Create, assign, and update tasks with due dates and priorities
- Status Tracking β Track task progress (Todo β In Progress β Completed)
- Dashboard β Overview of tasks, statuses, and overdue items with charts
- File Uploads β Attach files to tasks via Multer
- Reports β Export task reports using ExcelJS
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Redux Toolkit + redux-persist | State management |
| React Router v7 | Client-side routing |
| Axios | HTTP requests |
| Tailwind CSS v4 | Styling |
| Recharts | Dashboard charts |
| React Hot Toast | Notifications |
| Vite | Build tool |
| Technology | Purpose |
|---|---|
| Node.js + Express 5 | Server framework |
| MongoDB + Mongoose | Database |
| JWT + bcryptjs | Authentication |
| Multer | File uploads |
| ExcelJS | Report generation |
| Cookie Parser | Cookie handling |
| CORS | Cross-origin requests |
Task-Management-App/
βββ frontend/
β βββ public/
β βββ src/
β β βββ assets/
β β βββ components/
β β βββ pages/
β β β βββ admin/
β β β β βββ CreateTask.jsx
β β β β βββ Dashboard.jsx
β β β β βββ ManageTasks.jsx
β β β β βββ ManageUsers.jsx
β β β βββ auth/
β β β β βββ Login.jsx
β β β β βββ SignUp.jsx
β β β βββ user/
β β βββ redux/
β β β βββ slice/
β β β βββ store.js
β β βββ routes/
β β β βββ PrivateRoute.jsx
β β βββ utils/
β β β βββ axiosInstance.js
β β β βββ data.js
β β β βββ helper.js
β β β βββ uploadImage.js
β β βββ App.jsx
β β βββ index.css
β β βββ main.jsx
β βββ .env
β βββ index.html
β βββ package.json
β
βββ backend/
βββ controller/
β βββ auth.controller.js
β βββ report.controller.js
β βββ task.controller.js
β βββ user.controller.js
βββ models/
β βββ task.model.js
β βββ user.model.js
βββ routes/
β βββ auth.route.js
β βββ report.route.js
β βββ task.route.js
β βββ user.route.js
βββ utils/
β βββ error.js
β βββ multer.js
β βββ verifyUser.js
βββ uploads/
βββ .env
βββ index.js
βββ package.json
git clone https://github.com/your-username/Task-Management-App.git
cd Task-Management-Appcd backend
npm installCreate a .env file in the backend/ directory:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
ADMIN_JOIN_CODE=your_admin_code
FRONT_END_URL=http://localhost:5173
PORT=3000| Variable | Description |
|---|---|
MONGO_URI |
MongoDB connection string from Atlas or local |
JWT_SECRET |
Any long random string for signing tokens |
ADMIN_JOIN_CODE |
Secret code required to register as Admin |
FRONT_END_URL |
Frontend URL for CORS (no trailing slash) |
PORT |
Port to run the backend on (default: 3000) |
Start the backend:
# Development (with hot reload)
npm run dev
# Production
npm startBackend will run at: http://localhost:3000
cd ../frontend
npm installCreate a .env file in the frontend/ directory:
VITE_API_URL=http://localhost:3000/apiStart the frontend:
npm run devFrontend will run at: http://localhost:5173
| Method | Endpoint | Description | Access |
|---|---|---|---|
| POST | /api/auth/sign-up |
Register a new user | Public |
| POST | /api/auth/sign-in |
Login | Public |
| POST | /api/auth/sign-out |
Logout | Public |
| GET | /api/auth/user-profile |
Get logged-in user profile | Auth |
| PUT | /api/auth/update-profile |
Update user profile | Auth |
| POST | /api/auth/upload-image |
Upload profile image | Public |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/users/get-users |
Get all users | Admin |
| GET | /api/users/:id |
Get user by ID | Auth |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| POST | /api/tasks/create |
Create a new task | Admin |
| GET | /api/tasks |
Get all tasks | Auth |
| GET | /api/tasks/dashboard-data |
Get admin dashboard stats | Admin |
| GET | /api/tasks/user-dashboard-data |
Get member dashboard stats | Auth |
| GET | /api/tasks/:id |
Get task by ID | Auth |
| PUT | /api/tasks/:id |
Update task details | Auth |
| DELETE | /api/tasks/:id |
Delete a task | Admin |
| PUT | /api/tasks/:id/status |
Update task status | Auth |
| PUT | /api/tasks/:id/todo |
Update task checklist | Auth |
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /api/reports |
Download Excel report | Admin |
| Feature | Admin | Member |
|---|---|---|
| Create/delete tasks | β | β |
| Assign tasks to users | β | β |
| Update task status | β | β |
| View all tasks | β | β (own) |
| Manage users | β | β |
| Export reports | β | β |
| View dashboard | β | β |
To register as an Admin, use the Admin Join Code set in your backend
.env.
- Push your code to GitHub (make sure
.envis in.gitignore) - Create a new project on Railway
- Connect your GitHub repo and set the root directory to
backend - Add the following environment variables in Railway β Variables:
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
ADMIN_JOIN_CODE=your_admin_code
FRONT_END_URL=https://your-vercel-app.vercel.app
- Railway auto-detects
npm startfrompackage.json
- Import your repo on Vercel
- Set the root directory to
frontend - Add the environment variable in Vercel β Settings β Environment Variables:
VITE_API_URL=https://your-railway-app.up.railway.app/api
- Deploy β Vercel auto-runs
npm run build
You can test the app using these demo accounts on the live deployment:
| Role | Password | |
|---|---|---|
| Admin | admin@demo.com | demo1234 |
| Member | member@demo.com | demo1234 |
This project was built as a full-stack assignment. Feel free to use it as a reference.