A full-stack project management web app where teams can create projects, assign tasks, track progress, and manage members — all with role-based access control.
- Authentication — Signup, login, JWT-based sessions (7-day expiry)
- Projects — Create and manage projects, invite teammates by email
- Tasks — Create tasks with title, description, status, priority, due date, and assignee
- Dashboard — Overview of all projects, task counts by status, overdue tasks, upcoming deadlines
- Role-Based Access Control — Admins manage tasks and members; Members update task status only
- My Tasks — View all tasks assigned to you across every project
| Runtime | Node.js |
| Framework | Express.js |
| ORM | Prisma |
| Database | PostgreSQL |
| Auth | JSON Web Tokens + bcryptjs |
| Validation | express-validator |
| Framework | React 18 |
| Build Tool | Vite |
| Styling | Tailwind CSS v4 |
| Routing | React Router v6 |
| HTTP Client | Axios |
| Icons | lucide-react |
| Date Handling | date-fns |
- Node.js 18+
- npm
- A PostgreSQL database (local or Railway free tier)
git clone <your-repo-url>
cd task-managercd backend
npm install
cp .env.example .envEdit backend/.env and fill in:
DATABASE_URL="postgresql://user:password@host:5432/dbname"
JWT_SECRET="your-secret-key-here"
PORT=3001
NODE_ENV=developmentRun migrations and start:
npx prisma migrate dev --name init
npm run devBackend runs at http://localhost:3001.
cd frontend
npm install
cp .env.example .envEdit frontend/.env:
VITE_API_URL=http://localhost:3001/apiStart the dev server:
npm run devFrontend runs at http://localhost:5173.
| Variable | Description | Example |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgresql://user:pass@host:5432/db |
JWT_SECRET |
Secret key for signing JWTs | my-super-secret-key |
PORT |
Port to listen on | 3001 |
NODE_ENV |
Environment | development or production |
| Variable | Description | Dev value | Prod value |
|---|---|---|---|
VITE_API_URL |
Base URL for API calls | http://localhost:3001/api |
/api |
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /signup |
— | Create account |
| POST | /login |
— | Login, returns JWT |
| GET | /me |
✅ | Get current user |
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / |
✅ | List all projects (owner or member) |
| POST | / |
✅ | Create a project |
| GET | /:id |
✅ | Get project details + members |
| DELETE | /:id |
✅ Admin | Delete project |
| POST | /:id/members |
✅ Admin | Add member by email |
| DELETE | /:id/members/:userId |
✅ Admin | Remove member |
| PATCH | /:id/members/:userId |
✅ Admin | Change member role |
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /my-tasks |
✅ | Tasks assigned to current user |
| GET | /project/:projectId |
✅ | Tasks for a project |
| POST | /project/:projectId |
✅ Admin | Create task |
| PATCH | /:id |
✅ | Update task (admins: all fields; members: status only) |
| DELETE | /:id |
✅ Admin | Delete task |
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | / |
✅ | Summary stats, overdue tasks, upcoming deadlines |
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Railway health check |
-
Push your code to GitHub
git init git add . git commit -m "initial commit" git remote add origin <your-github-repo-url> git push -u origin main
-
Create a Railway account at railway.app (free tier, no credit card)
-
Create a new project in Railway → "Deploy from GitHub repo" → select your repo
-
Add a PostgreSQL database
- In your Railway project, click + New → Database → PostgreSQL
- Railway automatically sets the
DATABASE_URLvariable in your service
-
Set environment variables on your Railway service:
JWT_SECRET= a long random string (e.g. generate withopenssl rand -hex 32)NODE_ENV=productionPORTis set automatically by Railway
-
Railway will automatically:
- Run the build command from
railway.json - Run
prisma migrate deployon every deploy - Serve the app at your Railway URL
- Run the build command from
-
Get your live URL from the Railway dashboard → Settings → Domains
[Add after deployment]
task-manager/
├── backend/
│ ├── prisma/
│ │ └── schema.prisma
│ ├── src/
│ │ ├── middleware/ auth.js, rbac.js
│ │ ├── routes/ auth, projects, tasks, dashboard
│ │ ├── controllers/ authController, projectController, taskController, dashboardController
│ │ └── index.js
│ ├── .env.example
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── api/ axios.js
│ │ ├── components/ Navbar, Sidebar, Badge, Modal, ProtectedRoute
│ │ ├── context/ AuthContext.jsx
│ │ └── pages/ Login, Signup, Dashboard, Projects, ProjectDetail, MyTasks
│ ├── .env.example
│ └── package.json
├── railway.json
├── package.json
└── README.md