A full-stack web application for managing projects, assigning tasks, and tracking progress with role-based access control.
- Authentication: Sign up and login with JWT-based auth
- Project Management: Create projects, add descriptions, and manage teams
- Task Management: Create, assign, and track task status (To Do, In Progress, Done)
- Dashboard: View task statistics, overdue tasks, and recent activity
- Role-Based Access: Admin and Member roles with appropriate permissions
- Team Collaboration: Add members to projects with email-based invites
- Frontend: Next.js 16 (App Router), React 19, Tailwind CSS 4
- Backend: Next.js API Routes (REST)
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT (JSON Web Tokens)
- Validation: Zod
- Password Hashing: bcryptjs
- Node.js 18+ and npm
- PostgreSQL database
-
Clone the repository
git clone <your-repo-url> cd team-task-manager
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile:DATABASE_URL="postgresql://user:password@localhost:5432/taskmanager?schema=public" JWT_SECRET="your-secret-key-here"
-
Run database migrations
npx prisma migrate dev
-
Start the development server
npm run dev
Open http://localhost:3000 in your browser.
team-task-manager/
├── src/
│ ├── app/
│ │ ├── (auth)/ # Auth pages (login, signup)
│ │ ├── (dashboard)/ # Protected dashboard pages
│ │ │ ├── dashboard/ # Dashboard with stats
│ │ │ └── projects/ # Project list & detail pages
│ │ ├── api/ # REST API routes
│ │ │ ├── auth/ # Login, signup, me endpoints
│ │ │ ├── projects/ # CRUD for projects
│ │ │ ├── dashboard/ # Dashboard stats
│ │ │ └── ...
│ │ └── layout.tsx
│ ├── lib/
│ │ ├── auth.ts # JWT helpers
│ │ ├── db.ts # Prisma client
│ │ ├── middleware.ts # Auth middleware
│ │ └── validations.ts # Zod schemas
│ └── generated/prisma/ # Generated Prisma client
├── prisma/
│ └── schema.prisma # Database schema
└── package.json
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /api/auth/signup |
Register a new user | No |
| POST | /api/auth/login |
Login and get token | No |
| GET | /api/auth/me |
Get current user | Yes |
| GET | /api/projects |
List user's projects | Yes |
| POST | /api/projects |
Create a project | Yes |
| GET | /api/projects/:id |
Get project details | Yes |
| PATCH | /api/projects/:id |
Update project | Admin |
| DELETE | /api/projects/:id |
Delete project | Owner |
| GET | /api/projects/:id/tasks |
List project tasks | Yes |
| POST | /api/projects/:id/tasks |
Create a task | Yes |
| PATCH | /api/projects/:id/tasks/:taskId |
Update a task | Yes |
| DELETE | /api/projects/:id/tasks/:taskId |
Delete a task | Admin |
| GET | /api/projects/:id/members |
List project members | Yes |
| POST | /api/projects/:id/members |
Add a member | Admin |
| DELETE | /api/projects/:id/members |
Remove a member | Admin |
| GET | /api/dashboard |
Get dashboard stats | Yes |
- Admin: Can create/edit/delete tasks, add/remove members, update project settings
- Member: Can view and update task status, create tasks
- Owner: Full control including project deletion
- Push your code to GitHub
- Go to Railway and create a new project
- Add a PostgreSQL service from the marketplace
- Add a New Project from your GitHub repository
- Set the following environment variables in Railway:
DATABASE_URL- Use the PostgreSQL connection string from your Railway databaseJWT_SECRET- A random secret key
- Set the Start Command to:
npm start - Railway will automatically build and deploy your app
MIT