PORTFOLIO · FULL-STACK · WEB
CivicResolve
Role-based civic complaint platform — citizens submit and track public-service cases; officers, managers, and admins run assignment, SLA, and audit workflows.

Role
Designed and built the full-stack system end to end — Next.js App Router, Prisma/Postgres, Auth.js, and a server-side permission layer.
Period
2026
Platform
Web
Primary Stack
Next.js · TypeScript · Prisma · PostgreSQL
The Problem
Challenge & Objectives
Public-service complaints are usually fragmented. Citizens cannot see whether a case is moving, and departments have no structured queue, assignment, or SLA trail.
The Solution
Architectural Strategy
CivicResolve gives each role a scoped workspace. Citizens submit and follow cases; officers work assigned queues; managers assign work and watch SLA; admins own users, departments, and the audit log. Status changes only happen through a validated lifecycle.
My Contribution
What I implemented
I designed the schema, services, and role dashboards, and enforced complaint transitions, SLA, and audit logging on the server.
- Designed a 12-model Prisma/Postgres schema for users, departments, complaints, SLA rules, and audit records.
- Built a services layer and a server-side can() permission check used by every route handler and server action.
- Implemented a validated complaint state machine with immutable status history and in-app notifications.
- Shipped citizen, officer, manager, and admin dashboards on the Next.js App Router with Auth.js sessions.
System Architecture
Next.js App Router pages and thin API routes call a services layer for complaints, assignment, SLA, and analytics. Prisma talks to PostgreSQL on Supabase. Auth.js holds sessions. A single can() permission function scopes every action; Zod schemas are shared by client and server.
Key Features
- 01Citizen complaint submission with category, location, attachments, and tracking
- 02Public lookup by human-readable complaint number without exposing sensitive data
- 03Officer case queue with internal notes, evidence, and limited status moves
- 04Manager dashboards for department queues, officer workload, and SLA compliance
- 05Admin control of users, departments, categories, SLA rules, and audit logs
- 06In-app notifications for assignment, status, SLA warning, and breach events
- 07PDF and data export for reports
Engineering Challenges
Challenge
Complaint status could not jump arbitrarily, and every move needed an actor, timestamp, and reason.
Technical Approach
A role-aware transition matrix validates each change before it is applied, then writes an immutable ComplaintStatusHistory record and notifies affected users.
Outcome
Cases move SUBMITTED → UNDER_REVIEW → ASSIGNED → IN_PROGRESS → RESOLVED → CLOSED, with reopen and reject paths that stay inside the same audit trail.
Challenge
Citizens, officers, managers, and admins needed different views of the same records without trusting the UI to hide data.
Technical Approach
A centralized can(user, action, resource) check and service-layer ownership/department scoping run on every route handler and server action.
Outcome
Each role lands on its own dashboard; internal notes, audit logs, and department queues stay server-enforced.
Technology Breakdown
Frontend
- Next.js
- TypeScript
- Tailwind CSS
- TanStack Query
Backend
- Auth.js
- Prisma
- Zod
Database
- PostgreSQL
- Supabase
Integrations
- SLA monitoring
- PDF export
Impact & Outcome
Open-source full-stack system with seeded role dashboards, SLA states, and an audit trail. Clone and run locally — no public live deployment.
Have a project, role, or idea in mind?
Get in Touch