A full-stack task management app with project-based workspaces, role-based access, and a Kanban board.
Stack: Node.js · Express · PostgreSQL · React · Tailwind CSS · JWT
- Node.js 18+
- PostgreSQL database (local or Railway)
git clone https://github.com/your-user/team-task-manager
cd team-task-manager
npm run install:allcp backend/.env.example backend/.envEdit backend/.env:
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
JWT_SECRET |
Long random string (≥32 chars) |
PORT |
API port (default 3001) |
CLIENT_URL |
Frontend origin for CORS (default http://localhost:5173) |
npm run dev:backendThe server applies schema.sql automatically on startup — no manual migration needed.
npm run seedThis creates two demo accounts:
| Role | Password | |
|---|---|---|
| Admin | admin@demo.com | password123 |
| Member | member@demo.com | password123 |
npm run dev:frontend| Action | Admin | Member |
|---|---|---|
| Create / delete projects | ✓ | |
| Add / remove project members | ✓ | |
| Create / delete tasks | ✓ | |
| Edit any task field | ✓ | |
| Update status of own assigned tasks | ✓ | |
| View projects & tasks | ✓ | ✓ |
POST /api/auth/signup
POST /api/auth/login
GET /api/auth/me
GET /api/projects
POST /api/projects (admin)
GET /api/projects/:id
PUT /api/projects/:id (admin)
DELETE /api/projects/:id (admin)
GET /api/projects/:id/members
POST /api/projects/:id/members (admin)
DELETE /api/projects/:id/members/:userId (admin)
GET /api/tasks/dashboard
GET /api/tasks/project/:projectId
POST /api/tasks/project/:projectId (admin)
PUT /api/tasks/:id
DELETE /api/tasks/:id (admin)
- Push the repo to GitHub.
- Create a new Railway project → Deploy from GitHub repo.
- Add a PostgreSQL plugin — Railway injects
DATABASE_URLautomatically. - Set environment variables in Railway:
JWT_SECRET=<generate a long secret> NODE_ENV=production - Set the start command:
npm run build && npm start - Railway will build the frontend into
frontend/distand the Express server will serve it.
Deploy backend and frontend as separate Railway services, pointing VITE_API_URL on the frontend to the backend's public URL.
team-task-manager/
├── backend/
│ ├── src/
│ │ ├── config/db.js # pg Pool
│ │ ├── middleware/auth.js # JWT authenticate + requireAdmin
│ │ └── routes/
│ │ ├── auth.js # signup / login / me
│ │ ├── projects.js # project + member management
│ │ └── tasks.js # task CRUD + dashboard
│ ├── seeds/seed.js # demo data
│ └── schema.sql # table definitions (auto-applied on start)
└── frontend/
└── src/
├── api/client.js # Axios instance with token interceptor
├── context/AuthContext.jsx
├── components/ # Navbar, TaskCard, TaskModal, ProjectModal, …
└── pages/ # Login, Signup, Dashboard, Projects, ProjectDetail