Demo Website Link: https://incident-tracking-system.vercel.app/
- Auth + RBAC (ADMIN / SUPPORT / USER)
- Ticket CRUD (create, view, update status/priority/assignee)
- Comments
- Add comment
- Edit (author/admin only)
- Soft delete
- Audit logging for key actions (ticket + comment + assign/priority)
- Unified ticket timeline
- Merge comments + status history + audits
- Day grouping (Today/Yesterday)
- "Show system events" toggle
- Filters + dashboard
- Status / Priority / Assignee / Unassigned filters (URL-driven)
- Dashboard metrics + recent activity
- Server-side validation (Zod) and transactions (Prisma)
- Error code reference (link common error codes to tickets with note+ audit trail)
Ticket Dashboard
- Status and priority counts, unassigned and "assigned to me" views, and recent updated tickets
Ticket List
- Search, filters, pagination, and role-aware visibility
Ticket Detail (Admin / Support Control)
- Status, priority, and assignment management with RBAC enforcement
Ticket Timeline
- Comments, status history, and audit events in a unified timeline
Error Code Classification
- Link error codes with notes and suggested recommendations
- Next.js
- Auth.js / NextAuth (Credentials)
- Prisma + PostgreSQL
- Zod validation
- Docker (Postgres)
- Jest + React Testing Library
- Playwright E2E
- ADMIN: manage everything
- SUPPORT: view all tickets, update status/priority/assignee
- USER: create tickets, view own tickets, comment on own tickets
- Object-level authorization via
canViewTicket(user, ticket)to prevent ID guessing - Server actions for mutations (no thin API routes)
- Prisma transactions for "write + audit log" consistency
- Soft delete for comments to preserve history
- Timeline view model: normalized
TimelineItem[]for rendering
- Node.js
- PostgreSQL
- If you use Docker, you'll need:
- Docker
- Docker Compose
cp .example_env .envnpm install
docker compose up -d
npx prisma migrate deploy
npm run seed
npm run devSeed users (example):
- admin@test.com / Password123!
- support@test.com / Password123!
- user@test.com / Password123!
npm install
npx prisma migrate deploy
npm run seed
npm run devSeed users (example):
- admin@test.com / Password123!
- support@test.com / Password123!
- user@test.com / Password123!
The project includes both unit/integration coverage with Jest and end-to-end coverage with Playwright.
npm test
For full Jest and Playwright setup, runbook, and E2E coverage details, see TESTING.md.
- Improve the UI and expand feature coverage
- Dockerize the application for consistent local and deployment environments
- Add a CI/CD pipeline for automated testing and deployments
- Expand the Playwright E2E suite for timeline and broader regression coverage