A full-stack task management application built with Node.js, Next.js, and PostgreSQL.
Track A — Full-Stack Engineer (Backend API + Web Frontend)
- Node.js + TypeScript
- Express.js
- Prisma ORM + PostgreSQL
- JWT (Access + Refresh tokens)
- bcryptjs, Zod, express-rate-limit
- Next.js 14 (App Router) + TypeScript
- Tailwind CSS
- Axios (with interceptors)
- React Hook Form + Zod
- react-hot-toast
- Node.js v18+
- pnpm
- PostgreSQL
git clone cd task-management
cd backend pnpm install cp .env.example .env
pnpm dlx prisma migrate dev pnpm dlx prisma generate
pnpm dev
Runs on http://localhost:5000
cd frontend pnpm install cp .env.example .env.local
Edit .env.local with NEXT_PUBLIC_API_URL=http://localhost:5000/api
pnpm dev
Runs on http://localhost:3000
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/register | No | Register new user |
| POST | /api/auth/login | No | Login |
| POST | /api/auth/refresh | No | Refresh access token |
| POST | /api/auth/logout | No | Logout |
| GET | /api/auth/me | Yes | Get current user |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/tasks | Yes | Get all tasks (paginated) |
| POST | /api/tasks | Yes | Create task |
| GET | /api/tasks/:id | Yes | Get single task |
| PATCH | /api/tasks/:id | Yes | Update task |
| DELETE | /api/tasks/:id | Yes | Delete task |
| POST | /api/tasks/:id/toggle | Yes | Toggle task status |
- page (default: 1)
- limit (default: 6)
- status: PENDING | IN_PROGRESS | COMPLETED
- search: string (searches by title)
- Access token stored in memory (not localStorage) for XSS protection
- Refresh token stored in HTTP-only cookie for CSRF protection
- Axios interceptors handle silent token refresh automatically
- useRef pattern in useTasks hook prevents infinite re-fetch loops
- Prisma adapter pattern used for better connection pool control