A production-ready full-stack team task management application. Admins create projects, assign tasks, and manage members; team members track their work and update task status — all through a clean, responsive interface.
Stack: React 18 · Vite · Tailwind CSS · Node.js · Express · MongoDB · Mongoose · JWT · bcryptjs
- Role-based access control — Two roles:
adminandmember. The first account registered automatically becomes admin. - Project management — Admins create and manage projects, add members, and delete projects (cascades to tasks).
- Kanban task board — Tasks move through three statuses: To do, In progress, and Done. Members can update the status of tasks assigned to them.
- Dashboard — Real-time stats (total tasks, completed, overdue) filterable by project and team member.
- Secure authentication — JWT tokens with configurable expiry; passwords hashed with bcryptjs (12 rounds).
- Production-hardened API — Helmet security headers, CORS, rate limiting (300 req / 15 min), and centralized error handling with
express-validator. - Single-service deployment — Express serves the built React app in production; no separate static host needed.
| Tool | Version |
|---|---|
| Node.js | ≥ 18 |
| npm | ≥ 9 |
| MongoDB | ≥ 6 (local or Atlas) |
# Clone the repository
git clone https://github.com/anan5093/team-task-manager.git
cd team-task-manager
# Install root dependencies
npm install
# Install server dependencies
npm install --prefix server
# Install client dependencies
npm install --prefix clientCreate server/.env with the following content:
PORT=5000
NODE_ENV=development
MONGO_URI=mongodb://127.0.0.1:27017/team-task-manager
JWT_SECRET=replace-with-a-long-random-secret
JWT_EXPIRES_IN=7d
CLIENT_URL=http://localhost:5173Create client/.env with the following content:
VITE_API_URL=http://localhost:5000/apinpm run devThis starts both the Express API server and the Vite dev server concurrently.
| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| API health check | http://localhost:5000/health |
- Sign up — Register the first account (it automatically becomes admin). Additional accounts default to the
memberrole. - Create a project (admin only) — Navigate to Projects, add a project name and description, and assign team members.
- Create tasks (admin only) — Open the Task Board, fill in the task form (title, project, assigned user, due date), and click Create task.
- Track work (all users) — Use the Task Board to see tasks grouped by status. Change a task's status via its dropdown. Overdue tasks are highlighted in red.
- Monitor progress — The Dashboard shows total, completed, and overdue task counts. Use the project and user filters to narrow the view.
- Manage roles (admin only) — Promote members to admin or demote admins to member via
PATCH /api/users/:id/role.
All protected routes require the header:
Authorization: Bearer <token>
| Method | Route | Access | Description |
|---|---|---|---|
| POST | /api/auth/signup |
Public | Register a user; first account becomes admin |
| POST | /api/auth/login |
Public | Log in and receive a JWT |
| GET | /api/auth/me |
Authenticated | Get the current user's profile |
| POST | /api/auth/logout |
Authenticated | Client-side logout acknowledgement |
| Method | Route | Access | Description |
|---|---|---|---|
| GET | /api/users |
Authenticated | List users (for assignment and filtering) |
| PATCH | /api/users/:id/role |
Admin | Promote or demote a user's role |
| Method | Route | Access | Description |
|---|---|---|---|
| GET | /api/projects |
Authenticated | List accessible projects |
| POST | /api/projects |
Admin | Create a project |
| GET | /api/projects/:id |
Project member / Admin | Get a single project |
| PUT | /api/projects/:id |
Admin | Update a project |
| DELETE | /api/projects/:id |
Admin | Delete a project and its tasks |
| Method | Route | Access | Description |
|---|---|---|---|
| GET | /api/tasks |
Authenticated | List tasks; supports ?project=&user=&status= filters |
| GET | /api/tasks/stats |
Authenticated | Dashboard counts; supports ?project=&user= filters |
| POST | /api/tasks |
Admin | Create a task |
| PUT | /api/tasks/:id |
Admin or assigned member | Update task fields or move status |
| DELETE | /api/tasks/:id |
Admin | Delete a task |
Express serves both the API and the built React app from a single process, making it straightforward to deploy on any Node.js-capable platform.
- Connect your repository to your platform of choice.
- Provision a MongoDB instance (a managed Atlas cluster or a platform plugin).
- Set the following environment variables:
NODE_ENV=production
MONGO_URI=<your MongoDB connection string>
JWT_SECRET=<long random production secret>
JWT_EXPIRES_IN=7d
CLIENT_URL=<your deployed app URL>- Most platforms run
npm installautomatically in the root. Set the build command to install the sub-package dependencies and build the React client:
npm install --prefix server && npm install --prefix client && npm run build --prefix client- Set the start command to:
npm startIn production, Express serves the built React SPA from client/dist and handles all non-/api routes with index.html for client-side routing.
A client/vercel.json rewrite rule is included for deploying the React frontend to Vercel as a standalone SPA. In this configuration you will need to host the Express API separately and point VITE_API_URL at its public URL before building.
team-task-manager/
├── package.json # Root scripts: dev (concurrent), start
├── server/
│ ├── package.json
│ └── src/
│ ├── app.js # Express app setup (middleware, routes)
│ ├── server.js # HTTP server entry point
│ ├── config/
│ │ └── db.js # MongoDB connection
│ ├── controllers/ # Route handlers (auth, project, task, user)
│ ├── middleware/ # Auth guard, error handler, validation runner
│ ├── models/ # Mongoose schemas (User, Project, Task)
│ ├── routes/ # Express routers
│ └── utils/ # asyncHandler, generateToken
└── client/
├── index.html
├── package.json
├── vercel.json # SPA rewrite rules for Vercel deployment
├── vite.config.js
└── src/
├── App.jsx # Route definitions
├── api/ # Axios instance with JWT interceptor
├── components/ # Button, Input, Layout, Loading, ProtectedRoute
├── context/ # AuthContext (login, logout, isAdmin)
├── pages/ # Dashboard, Login, Signup, Projects, TaskBoard
└── utils/ # formatters (date, overdue detection)
Contributions are welcome! Please open an issue first to discuss your idea, then submit a pull request.
- Fork the repository and create a feature branch.
- Follow the existing code style (ESLint, consistent naming).
- Write clear commit messages.
- Open a pull request against
main— describe what changed and why.
For significant changes, please open an issue first so we can discuss the approach.
- Bugs & feature requests — Open a GitHub issue
- Questions — Use the GitHub Discussions tab
Maintainer: @anan5093