Temu
Event ticketing platform for online ticket sales
Overview
Temu is a full-stack event ticketing platform I designed and built independently, covering concert, workshop, and community event ticket sales end-to-end. Unlike a typical CRUD ticketing demo, the project was built around one specific technical problem: how to sell a limited quota of tickets to hundreds of buyers checking out at the same time, without overselling and without the checkout experience breaking under load.
The platform has two sides: Temu Web, a public-facing PWA where buyers browse events and purchase tickets, and Temu CMS, a dashboard for organizers and admins to manage events, monitor sales, and handle venue check-in.
I owned the full lifecycle solo: requirements definition, system design, backend architecture, frontend implementation on both sides, database schema design, and load testing. I started by writing a full PRD before any code, then built outward from the riskiest part of the system, checkout, rather than the easiest part, CRUD screens.
The core technical challenge was preventing overselling under concurrent checkout. A naive read-quota-then-decrement implementation has a classic race condition: two requests can both read "5 left" before either writes, and both succeed, resulting in an oversold event. I evaluated Redis-based holds with SETNX and TTL against optimistic locking via a version column in PostgreSQL, and implemented the Redis approach as the primary mechanism for its atomic, low-latency reservation with automatic expiry. Each hold reserves a specific quantity of a specific ticket type for a fixed window, so two concurrent requests can never both succeed against the same remaining inventory. I wrote dedicated concurrency tests using k6, simulating hundreds of concurrent checkout requests against a limited-quota ticket type specifically to catch race conditions, not just verify CRUD correctness, and documented the trade-off analysis behind the decision.
Key Contributions:
- Designed the full system architecture and entity model from a blank page
- Built the Go backend as a modular monolith with JWT auth, refresh token rotation, and role-based access control
- Implemented the Redis-based ticket hold/reservation mechanism with automatic TTL expiry
- Integrated a sandbox payment gateway with idempotent webhook handling
- Built QR-based e-ticketing and a check-in flow that rejects already-used codes
- Developed the public-facing Angular PWA, including offline access to purchased e-tickets via service worker caching
- Built the Angular CMS with lazy-loaded modules for event management, sales dashboards, and a camera-based check-in scanner
- Set up async notifications via RabbitMQ so email sends never block the checkout path
- Load-tested the checkout endpoint with race-condition-specific tests using k6
Tech Stack: Go · PostgreSQL · Redis · RabbitMQ · Angular · TypeScript · Tailwind CSS · Docker · k6
Building Temu from scratch taught me the difference between a feature that works in a demo and a feature that is actually safe under real-world load. I learned to reason about concurrency concretely, justify architectural decisions with evidence instead of intuition, and scope a solo project with an explicit MVP boundary so the hardest, most valuable problem did not get crowded out by easier work.