Team Task Manager is a full-stack web application for managing projects, assigning tasks, tracking progress, and controlling access based on user roles.
The application includes authentication, role-based authorization, project management, task management, dashboard analytics, project member assignment, protected frontend routes, and deployment-ready configuration.
- React
- Vite
- React Router
- Axios
- Tailwind CSS
- Node.js
- Express.js
- Prisma ORM
- PostgreSQL
- JWT authentication
- bcryptjs password hashing
- User signup and login
- Secure password hashing with bcryptjs
- JWT-based authentication
- Protected frontend routes
- Role-based access control
- Admin and member roles
- Project creation and management
- Add users as project members
- Task creation and assignment
- Task status updates
- Dashboard with live backend statistics
- Recent projects and recent tasks
- Task distribution by status
- Toast notifications
- Loading and empty states
- Responsive UI
- Railway/Vercel deployment-ready structure
Admins can:
- Create projects
- Update projects
- Delete projects
- Add members to projects
- Create tasks
- Assign tasks
- Edit tasks
- Delete tasks
- View all projects and tasks
Members can:
- View only assigned projects
- View only assigned tasks
- Update only the status of their assigned tasks
Members cannot create or delete projects or tasks.
pro/
├── backend/
│ ├── prisma/
│ │ ├── schema.prisma
│ │ └── seed.js
│ ├── src/
│ │ ├── config/
│ │ ├── controllers/
│ │ ├── middleware/
│ │ ├── routes/
│ │ ├── utils/
│ │ ├── app.js
│ │ └── server.js
│ └── package.json
│
├── frontend/
│ ├── src/
│ │ ├── api/
│ │ ├── components/
│ │ ├── context/
│ │ ├── layouts/
│ │ ├── pages/
│ │ ├── routes/
│ │ ├── App.jsx
│ │ └── main.jsx
│ └── package.json
│
├── README.md
└── TESTING_CHECKLIST.md
The main Prisma models are:
UserProjectProjectMemberTask
ProjectMember is the join table between users and projects.
This allows:
- one user to belong to many projects
- one project to have many users
Tasks belong to projects and can be assigned to users. The backend validates that a task assignee must be a member of the selected project.
POST /api/auth/signup
POST /api/auth/login
GET /api/auth/me
GET /api/dashboard/stats
Returns:
- total tasks
- completed tasks
- pending tasks
- overdue tasks
- recent projects
- recent tasks
- task distribution by status
GET /api/projects
POST /api/projects
GET /api/projects/:id
PUT /api/projects/:id
DELETE /api/projects/:id
POST /api/projects/:id/members
GET /api/tasks
POST /api/tasks
PUT /api/tasks/:id
DELETE /api/tasks/:id
GET /api/users
Create a .env file inside the backend folder:
DATABASE_URL="postgresql://username:password@localhost:5432/team_task_manager?schema=public"
JWT_SECRET="your-long-random-secret"
JWT_EXPIRES_IN="7d"
CLIENT_URL="http://localhost:5173"
NODE_ENV="development"
PORT=5000Create a .env file inside the frontend folder:
VITE_API_URL="http://localhost:5000"For production, replace VITE_API_URL with the deployed backend URL.
git clone <your-repository-url>
cd procd backend
npm installCreate backend/.env and add your PostgreSQL database URL, JWT secret, and frontend URL.
npx prisma generatenpx prisma migrate dev --name initnpm run prisma:seednpm run devBackend runs on:
http://localhost:5000
Open a new terminal:
cd frontend
npm installnpm run devFrontend runs on:
http://localhost:5173
npm start
npm run dev
npm run prisma:generate
npm run prisma:migrate
npm run prisma:seednpm run dev
npm run build
npm run lint
npm run previewUse this flow while presenting the project:
- Log in as an admin.
- Show the dashboard with live task and project statistics.
- Open the Projects page.
- Create a new project.
- Open the project details page.
- Add members to the project from the user dropdown.
- Open the Tasks page.
- Create a task and assign it to a project member.
- Update the task status.
- Log in as a member.
- Show that the member only sees assigned projects and tasks.
- Show that members can only update task status.
- Passwords are hashed before being stored.
- JWT tokens are used for protected routes.
- Admin-only middleware protects privileged backend routes.
- Members cannot create or delete projects or tasks.
- Members can only update their assigned task status.
- Duplicate project members are prevented.
- Invalid task status values are rejected.
- Invalid priority values are rejected.
- Task assignees must belong to the selected project.
- API errors return consistent JSON responses.
The dashboard uses live backend data from:
GET /api/dashboard/stats
It displays:
- total tasks
- completed tasks
- pending tasks
- overdue tasks
- recent projects
- recent tasks
- task status distribution
For admins, dashboard stats include all tasks and projects.
For members, dashboard stats include only assigned tasks and projects.
- Push the repository to GitHub.
- Create a Railway project.
- Add a PostgreSQL database.
- Add a backend service from GitHub.
- Set the backend root directory to:
backend
- Add backend environment variables:
DATABASE_URL="your-railway-postgres-url"
JWT_SECRET="your-production-jwt-secret"
JWT_EXPIRES_IN="7d"
CLIENT_URL="https://your-frontend-domain.com"
NODE_ENV="production"- Use this start command:
npm startFor production migrations, run:
npx prisma migrate deploy- Import the GitHub repository into Vercel.
- Set root directory to:
frontend
- Set build command:
npm run build- Set output directory:
dist
- Add frontend environment variable:
VITE_API_URL="https://your-backend-url.up.railway.app"A detailed checklist is available in:
TESTING_CHECKLIST.md
Main checks:
- Signup
- Login
- Logout
- Protected routes
- Admin permissions
- Member restrictions
- Project creation
- Add project members
- Task creation
- Task assignment
- Task status update
- Dashboard updates
- Production build
This project demonstrates a complete full-stack workflow with:
- authentication
- authorization
- relational database design
- REST API development
- dashboard analytics
- frontend state management
- validation and error handling
- deployment-ready structure