Skip to content

grwt/Task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ Team Task Manager

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


✨ Features

  • 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

πŸ› οΈ Tech Stack

Frontend

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

Backend

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

πŸ“ Project Structure

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

βš™οΈ Local Setup

Prerequisites


1. Clone the Repository

git clone https://github.com/your-username/Task-Management-App.git
cd Task-Management-App

2. Backend Setup

cd backend
npm install

Create 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 start

Backend will run at: http://localhost:3000


3. Frontend Setup

cd ../frontend
npm install

Create a .env file in the frontend/ directory:

VITE_API_URL=http://localhost:3000/api

Start the frontend:

npm run dev

Frontend will run at: http://localhost:5173


πŸ”‘ API Endpoints

Auth β€” /api/auth

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

Users β€” /api/users

Method Endpoint Description Access
GET /api/users/get-users Get all users Admin
GET /api/users/:id Get user by ID Auth

Tasks β€” /api/tasks

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

Reports β€” /api/reports

Method Endpoint Description Access
GET /api/reports Download Excel report Admin

πŸ‘₯ Role-Based Access

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.


πŸš€ Deployment

Backend β€” Railway

  1. Push your code to GitHub (make sure .env is in .gitignore)
  2. Create a new project on Railway
  3. Connect your GitHub repo and set the root directory to backend
  4. 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
  1. Railway auto-detects npm start from package.json

Frontend β€” Vercel

  1. Import your repo on Vercel
  2. Set the root directory to frontend
  3. Add the environment variable in Vercel β†’ Settings β†’ Environment Variables:
VITE_API_URL=https://your-railway-app.up.railway.app/api
  1. Deploy β€” Vercel auto-runs npm run build

πŸ§ͺ Test Credentials

You can test the app using these demo accounts on the live deployment:

Role Email Password
Admin admin@demo.com demo1234
Member member@demo.com demo1234

πŸ“„ License

This project was built as a full-stack assignment. Feel free to use it as a reference.

About

A full-stack Task Manager website with role based access

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages