Student Room Booking Platform.
A full-stack marketplace for student accommodation — listings, bookings, payments, in production.
Off-campus housing for students in Indian college towns is a mess of WhatsApp groups, broker fees, and unverifiable listings. I wanted a focused, mobile-first marketplace where students can browse, book, and pay for verified rooms without the noise.
Modelled the domain carefully in Prisma: Users, Listings, Bookings, Payments, Reviews, with the right cascade rules so a cancelled listing never leaves orphan bookings.
Built a Next.js (App Router) front end with server components for the listing pages — listings render fast, even on a 3G hostel connection, and the URL is the source of truth.
Implemented booking + payment as a state machine: pending → confirmed → checked-in → completed, with optimistic UI and idempotent webhook handlers so retries never double-charge.
Containerised with Docker, set up a CI pipeline in GitHub Actions that runs typecheck + lint + tests on every PR, and ships to a container host on merge to main.
Server Components, not a SPA
Listings are SEO-critical and most users arrive from Google. Rendering on the server means the page works without JS, loads fast on bad networks, and the data layer stays the source of truth.
Prisma over a hand-rolled query layer
The schema is the contract. Prisma's type-safe client means a typo in a relation is a compile error, not a 3am production incident.
Booking as a state machine
Status transitions are explicit and tested. Every payment webhook, every cancellation, every admin override goes through the same function — which means we can replay the audit log and know exactly what happened.
↳ TODO_1I'd add a verified-student flow (college email domain check + ID upload) before allowing listings. Right now trust is reputational; it should be cryptographically grounded.
↳ TODO_2Search is naive (LIKE on title). For the next iteration I'd add a real search layer (Postgres trigram or Meilisearch) and a 'rooms near me' geo query.