No double-sold seats
Seat allocation takes a database lock (pessimistic locking on PostgreSQL), so two buyers can never get the same last seat. Purchases are idempotent: a retried request can't charge twice.
Work / Event ticketing platform
Organizers publish events, attendees buy tickets in two taps, and door staff scan QR codes at entry. Web, Android and backend, built end to end.

The challenge
Ticketing fails in two moments: when a popular event goes on sale and everyone checks out at once, and when a queue forms at the door with bad signal. Overselling costs organizers refunds and trust. A scanner that needs perfect internet stops the line.
What was built



Engineering decisions
Seat allocation takes a database lock (pessimistic locking on PostgreSQL), so two buyers can never get the same last seat. Purchases are idempotent: a retried request can't charge twice.
Events carry a version number. If an organizer saves on the website and on the phone at the same time, the stale save is refused instead of silently overwriting the other.
The Android app keeps tickets in an encrypted on-device store, so an attendee can show their QR code at a venue with no signal.
The self-hosted Keycloak server went down in production, so sign-in was migrated to Auth0 with role-based access for attendees, organizers and staff.
Stack
Share a few details and you'll get a reply within 24 hours: honest advice, a rough range, and the next step.