Booking Layanan Polda

Booking Layanan Polda

Online queue booking for police services, so citizens arrive with a QR ticket instead of waiting in line.

Services like SKCK draw long queues at the counter. Booking Layanan Polda moves the queue online: citizens pick a service, choose an open date and time slot, fill in their details and leave with a QR ticket. At the counter, an operator looks up the ticket and checks them in.

The app is built entirely on Server Components and Server Actions, with no REST layer. The only API route is the cron endpoint that keeps slots generated ahead of time.

Results

−60%

Average waiting time at the counter

30

Days of slots generated in advance

0

Double-booked slots

Getting  the  queue  right

No double-booked slots

Quota is locked with SELECT … FOR UPDATE inside a transaction, so two people can never claim the same last slot.

Limits in the database

The one-booking-per-NIK rule is a unique constraint, not just a form check.

Slots that create themselves

A cron-protected endpoint generates the next 30 days of slots and skips weekends.

Built  with

  • Next.js 16
  • Prisma
  • PostgreSQL
  • Clerk
  • React QR Code
  • Motion
  • Recharts

Related  Work