
FixMaster — Hostel Maintenance Service Desk
A hostel maintenance service desk — report once, floor-ordered dispatch, closed only when a resident confirms the fix. Rules live in PostgreSQL.
- PostgreSQL, 16 tables
- 114, real PostgreSQL
- WCAG 2.1 AA
What it had to solve
On paper, complaints get lost and nobody can see their status. Technicians criss-cross a building between floors. Roommates report the same fault separately and two people get sent. Work is marked done without the resident agreeing, supervisors cannot see recurring failures, and there is no record of who changed what. A hostel room is shared, so the person who reported a fault is the wrong unit for a ticket, and everything that two people can do at the same moment, two roommates reporting or two supervisors dispatching, has to come out right.
The decisions that shaped it
The database holds the rules
Ticket transitions run inside stored procedures that lock the row, and a trigger writes every status change to the ticket’s history. Views produce the technician queue, the supervisor summary and recurring-defect alerts. Because the rules live in PostgreSQL, they hold no matter which client writes the data, and every query from the API is parameterised with no ORM in between.
The room is the unit of a ticket
A partial unique index allows one live ticket per location and issue, so when a roommate reports cleaning that is already requested they join the existing ticket, even if both tap at the same instant. Everyone in the room sees it, any resident can confirm the fix, and a common-area fault reported by five people goes up one priority level.
Concurrency made safe, not hoped for
Every transaction locks the ticket before its assignments, so a technician finishing while a supervisor reassigns cannot deadlock, and a rare serialization failure is retried automatically. Two supervisors dispatching the same ticket get optimistic concurrency: the second is refused with the name of who assigned it.
Closed only when confirmed
A technician marks work done; it moves to pending verification. A resident accepts and rates it, or rejects it and sends it back for rework as an escalation. Nothing waits forever: work nobody confirms in 72 hours closes automatically, and every closed ticket records why it closed.
Security as a tested property
Separate sign-in portals for students, staff and administrators, each token bound to its portal and revoked server-side on sign-out. Accounts lock after repeated failures, rate limits count per account, user and IP, and a password change invalidates older sessions. A probe of the running system passes 40 of 40 checks covering auth, authorization, injection, races and brute force.
How the pieces sit together
- React 18, TypeScript, Vite, Tailwind CSS, TanStack Query, React Hook Form with Zod, Recharts
- nginx serving the app with CSP, HSTS and frame denial, proxying /api
- Node.js 20 and Express 5: validation, Helmet, rate limits, JWT, bcrypt
- PostgreSQL 15 and 16: 16 tables, stored procedures, triggers, views; checksummed migrations
- Role-based access with room-residency and reporter checks on every request
- Docker images for API and web, Docker Compose, GitHub Actions against both PostgreSQL versions
Built into the product
Report once
Six categories and 25 issue types; a roommate’s duplicate joins the existing ticket instead of opening a second.
Floor-ordered work queues
Each technician’s queue is ordered by floor, then priority, with on-duty and off-duty handover.
Dispatch and escalation
Supervisors dispatch, reassign, reject or merge duplicates; cleaning can be auto-dispatched; rejected fixes come back as escalations.
Two hostels
Each with its own blocks, supervisors and chief warden; nobody sees or acts on the other hostel’s tickets.
Hotspots and audit
Dashboards of open work and repeat-fault locations, and an append-only audit log of every administrative action.
Built for phones
Responsive for students and technicians, WCAG 2.1 AA, with inactivity sign-out across every tab.
What it is built out of
- React 18, TypeScript, Vite, Tailwind CSS, TanStack Query
- Node.js 20, Express 5, express-validator, Helmet, JWT
- PostgreSQL, Stored procedures, Triggers, Views
- Docker, Docker Compose, nginx, GitHub Actions
- Node test runner, Vitest, Playwright, axe-core
What it looks like




What it produced
- 21/21
- Screens with zero axe-core violations
- ~600
- Authenticated req/s at 50 connections, p99 ~120 ms
- 114
- API and database tests, including real concurrency