Back to portfolio

Ticketing System

I built this ticketing site from zero to one through vibe coding. It solves the old problem of grabbing tickets only through a Google Form, followed by lengthy admin work, and saves the admin team roughly 2 to 3 weeks of work!

Tools and systems used

  • Claude Code
  • React
  • Vite
  • Vercel
  • NestJS
  • Prisma
  • PostgreSQL
  • Redis
  • Railway
  • BullMQ
  • Socket.IO
  • Resend
  • Anthropic API
  • Google Gemini API
  • JWT
  • Helmet
  • ExcelJS
  • QR Code
  • Three.js
  • Spline
  1. Why I built it

    I signed up to join the admin team for my team's annual event, handling admin and tickets. In past years people grabbed tickets through a Google Form. The process was complicated, the form had to be tidied up separately, and it took the admin team roughly two to three weeks. I proposed building a ticketing site with Claude Code through vibe coding, to stop overselling and to let people transfer tickets. We didn't use an existing ticketing platform: this is an internal event that we didn't want fully public, and listing on an outside platform costs extra. I have no programming background. I started by asking Claude Code how to do it, then described my ideas and goals step by step.

  2. A fair chance for everyone

    What I care about most is that everyone gets a fair chance at a ticket. You must sign in before joining the queue, and the queue pass is tied to your own account, so handing it to someone else won't let them jump the queue. One Gmail address can hold only one account, which stops people grabbing extra seats with spare accounts. Each account can hold only one seat in the holder's own name. The number of tickets left is hidden from buyers, with the exact figure kept in the admin panel, to avoid needless pressure to rush for tickets.

  3. Not a single seat oversold

    Stock is held in Redis and reduced in a single atomic operation, and the database records only orders that succeeded, so however many people arrive at once, no extra seats are sold. The virtual queue only controls speed and the stock deduction prevents overselling, so the release rate can be adjusted safely. Stock can't be recalculated during a sale, to avoid putting seats already sold back on sale. After two rounds of security review, steps that read and then wrote were changed to atomic operations.

  4. Personal data stays private, and the site stays secure

    The system holds many members' email addresses and real names. During a transfer, the recipient sees only what the invitation needs. Buyers can't see admin notes. The support assistant has no access to any user or order data. A password reset never reveals whether an address is registered. The site uses a strict Content Security Policy that allows only same-origin scripts. Before the project went public, contact details were pixelated and payment details replaced with asterisks.

  5. Tickets: transfers, changes and entry

    A transfer goes through only when both sides accept, and the ticket doesn't move until the recipient accepts. Early-bird rounds stopped new transfers, and each later round can set a transfer deadline. Buyers can edit their companions' details themselves and can return tickets; payment is settled outside the system, which has no refund function. Each seat has its own entry QR code. After a transfer the old code stops working at once, and if two staff scan the same code at the same moment, only one scan succeeds.

  6. Admin and operations

    The admin panel can set rounds and ticket types, correct orders (every change keeps a before-and-after record), view each team's check-in list, reconcile sponsorships and reply to support requests. When a round ends, unsold tickets move to the next round automatically. Teams are chosen from a list, so free typing can't split the admin statistics. The site has a public contact point, scam warnings and a user guide, and the support assistant answers only from the FAQ, passing the question to a person when it can't answer.

  7. How I tested and improved it

    After launch, I asked friends and team members to try it, then added features and refined the flow, interface and transitions based on their feedback. I also tested every page myself. For example, when a footer link opened a new page halfway down, I had it changed so new pages open at the top. I asked for a load test on the live environment: 2,500 simulated users arrived at once and only about 160 got through in 150 seconds, so the release rate was raised. Every new feature or change is announced on the site.

  8. How Claude and I split the work

    I decide how the product works and what must never go wrong, and I review every page; Claude writes the code. Every decision is recorded with who proposed it: my own decisions, approaches Claude proposed and I adopted, technical decisions Claude carried out, and system design decisions. Four principles are drawn from these decisions: review before launch and always check after launch; before going public, leave no real contact or payment details in place; keep the scope tight, build only what is needed and leave the rest alone; find problems from what is on screen. Claude is very efficient at writing code, building tools and connecting other tools, and whenever I raise a problem or something I'm unsure about, it gives me good suggestions.

  9. Results

    355 tickets sold, all real orders, excluding load tests (including paid and pending, excluding cancelled; admin order figures, 27/11/2026). Development ran from 11/07/2026 to 26/11/2026, with 116 commits across 27 days. All 330 back-end tests passed (run on 26/11/2026).

  10. What I learnt

    The biggest gain was learning from scratch how to turn an idea into a system, and to keep improving it with product thinking. The old, tedious admin process is gone, and sorting tickets is more efficient. The hardest part was starting from zero: I built up the front end, back end and database, connected several APIs and MCP tools, and worked out the UI/UX step by step. Users responded positively and said it was clearly different from the old way of signing up.

  11. What I could improve next

    When a transfer deadline passes, automatically close transfers that haven't been accepted and notify both sides; expand the barcode check-in system; strengthen encryption of personal data; set up a process for handling a personal data breach, including automatic deletion of the affected data; and keep a record when users or orders are deleted.

Design flow

Buyer: from arrival to ticket
flowchart TD
  A["Arrive: home page"] --> B{"Signed in?"}
  B -- "No" --> C["Sign up or sign in<br/>email verification code, Gmail only"]
  B -- "Yes" --> D["Choose event and ticket type<br/>each round opens on its own schedule"]
  C --> D
  D -.-> X["Group tickets: no longer on sale"]
  D --> E["Fill in registration<br/>team, contact details, companions"]
  E --> F["Enter the virtual queue<br/>queue pass tied to the account"]
  F --> G{"Your turn to be released?"}
  G -- "Wait" --> F
  G -- "Released" --> H["Place order"]
  H --> I{"Atomic stock deduction succeeded?"}
  I -- "No" --> J["Show sold out"]
  I -- "Yes" --> K["Write to the database<br/>order plus one entry ticket per seat, each with a QR code"]
  K -- "Write failed" --> L["Return the stock"]
  K --> M["Send confirmation email"]
  M --> N["My tickets<br/>QR, self-service edits, transfer, return"]
        
Queue and overselling prevention
flowchart LR
  A["Request to enter the queue"] --> B["Issue a queue pass<br/>tied to that user"]
  B --> C["Release at a set rate<br/>affects experience only, not overselling"]
  C --> D["Release check<br/>pass belongs to this user and is unused"]
  D --> E["One order at a time per pass<br/>30-second lock"]
  E --> F["Single atomic Redis command deducts stock<br/>no read then write"]
  F -- "Not enough stock" --> G["Reject, no order created"]
  F -- "Success" --> H["Write to PostgreSQL"]
  H -- "Failed" --> I["Return the stock"]
  H -- "Success" --> J["Use up the release pass"]
  J --> K["Send confirmation email<br/>a failure doesn't affect the order"]
        
Transfer, check-in and admin
flowchart TD
  subgraph transfer [Transfer]
    T1["Holder starts a transfer<br/>one pending transfer per order at a time"] --> T2["Recipient reviews and can correct details"]
    T2 --> T3{"Accept?"}
    T3 -- "Declined or withdrawn" --> T4["Order unchanged"]
    T3 -- "Accepted" --> T5["Conditional update in one transaction<br/>new holder, every seat QR code replaced"]
    T5 --> T6["Notify both sides and the admins"]
    T0["Limits: no new transfers in the early-bird round; each round can set a transfer deadline"] -.-> T1
  end
  subgraph checkin [Check-in]
    C1["Staff sign in with dedicated accounts<br/>12 hours"] --> C2["Scan the seat QR code"]
    C2 --> C3{"Order paid and seat not freed up?"}
    C3 -- "No" --> C4["Entry refused"]
    C3 -- "Yes" --> C5["Conditional write<br/>succeeds only if not yet checked in"]
    C5 -- "Already checked in" --> C4
    C5 -- "Success" --> C6["Show green OK"]
  end
  subgraph admin [Admin]
    A1["Admin signs in"] --> A2["Round and ticket type settings<br/>opening and closing times, quantities"]
    A1 --> A3["Order and user management<br/>change seats, change team, cancel, export to Excel"]
    A1 --> A4["Contact points, sponsorship reconciliation, support replies"]
  end
        

Source code and full write-up

The full source code is open, in the source folder of the ticket-system-showcase repository (a de-identified copy). The full write-up, flow diagrams and every decision are in the ticket-system-showcase repository on GitHub. Live site: www.ts-annual-event.com