Business & shops

Build an event ticketing app with AI

Issue a ticket only after verified payment and atomically consume its QR credential at an authorized check-in station.

Apirex TeamUpdated AndroidiOS
On this page
  1. Screens
  2. Data model
  3. Native features
  4. Android notes (Kotlin and Jetpack Compose)
  5. iPhone notes (Swift and SwiftUI)
  6. Copy-paste prompt
  7. Acceptance test
  8. Frequently asked questions
5screens
6data tables
135word prompt
2platforms: Android, iOS

An event ticketing app must connect ticket issuance to real capacity and a dependable door check. Attractive event pages are secondary to preventing an unpaid ticket or a copied QR code from admitting multiple people. Start with general admission for owner-supplied events, one ticket type and online check-in, then prove that two scanners cannot both accept the same credential.

Screens

  • Events: list published events with supplied venue details and current on-sale status.
  • Event detail: display event-local date, capacity conditions and refund terms before purchase.
  • Buy ticket: request a trusted server quote and show payment pending separately from issued admission.
  • My tickets: retrieve owned admissions and present their QR credential without exposing customer details in its payload.
  • Check-in: let authorized door staff scan, verify and consume a ticket with a clear duplicate response.

Data model

Event Ticketing storage contract
TableKey fieldsPurpose
eventsid (uuid), title (text), starts_at (timestamptz), zone_id (text), capacity (int)Published event schedule and authoritative admission capacity.
ordersid (uuid), buyer_id (uuid), event_id (uuid), total_minor (int), state (text)Server-priced ticket purchases with recoverable payment status.
ticketsid (uuid), order_id (uuid), event_id (uuid), token_hash (text), status (text)Admissions issued only after approved server-side payment verification.
paymentsid (uuid), order_id (uuid), provider_reference (text), status (text)Verified provider state and idempotent issuance references.
checkinsid (uuid), ticket_id (uuid), scanner_id (uuid), checked_at (timestamptz)One authoritative successful consumption record per ticket.
scanner_rolesuser_id (uuid), event_id (uuid), active (bool)Explicit event-specific authority to validate admission.

Buyers can read only their purchased tickets and order history, while scanner accounts receive event-limited validation results rather than the full attendee database. Enforce those scopes with backend row-level security and server functions. Reserve capacity transactionally when checkout begins, using a documented hold policy. Put a unique constraint on checkins.ticket_id and consume the ticket within one server transaction so simultaneous scans cannot both succeed. QR contents should be opaque credentials, not names, email addresses or a client-editable paid flag.

Native features

Ticketing needs a bright, readable admission code, reliable retrieval of purchased tickets and an optional event reminder. A pass displayed from Room or SwiftData is a cached credential, not proof that the ticket remains valid after a refund or transfer. If staff scan tickets, request camera access only in the authorized check-in workflow, using CameraX on Android or an AVFoundation scanner presented by SwiftUI. UserNotifications can remind attendees of doors opening, but the event's stated venue time must remain visible. Avoid promising that a screenshot or an offline scan prevents duplicate admission.

Android notes (Kotlin and Jetpack Compose)

Use a LazyColumn of ticket types with stable tier IDs and Material 3 quantity controls that expose the remaining purchase limit. Keep the seat or tier hold countdown in a ViewModel based on the server expiry instant rather than a counter reset by recomposition. Navigation Compose should lead to a receipt only after verified payment. Launch a staff scanner through rememberLauncherForActivityResult when permission is required and keep denial separate from an invalid code. On Android hardware, scan the same test ticket on two staff devices at nearly the same moment; the server must accept only the permitted check-in, with an understandable duplicate result on the other.

iPhone notes (Swift and SwiftUI)

Build the attendee journey with NavigationStack and a List of orders that expands into individually identifiable tickets. Present the admission code at a size that survives larger text settings without clipping its quiet border. A SwiftData cache may support reopening a purchased ticket, while .refreshable fetches revocation and schedule changes before travel. Keep camera scanning behind a separate staff route and present its permission explanation in a sheet. On an iPhone, buy two admissions, reopen them after termination, and verify their codes differ. Refund one through the test backend and confirm a refreshed wallet no longer labels it valid for entry.

Copy-paste prompt

Build this yourself 133 words · Android
Build an event ticketing app for Android with Events, Event detail, Buy ticket, My tickets and Check-in. Begin with general admission and online validation. Ask for actual prices, currency, event and venue time zones, sale windows, capacity, cancellation, refund and transfer rules, plus who may scan. Store events, orders, payments, tickets, scanner roles and check-in records. Calculate prices and reserve capacity on the server. Verify Stripe or Razorpay payments server-side with checked webhook signatures before issuing tickets, and deduplicate repeated provider events. Encode opaque QR credentials and consume admissions transactionally with one successful check-in per ticket. Include loading, sold out, pending payment, camera denied, unsupported scanner, no connection and already-used ticket states. Acceptance requires a verified test purchase that survives reopening, then two simultaneous scans that produce one admission and one duplicate rejection.

Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.

Acceptance test

  1. Publish a general-admission event with an explicit named venue time zone, capacity and refund cutoff, then verify the displayed local start time.
  2. Complete a provider test purchase and confirm the backend issues one ticket only after payment verification; replay the provider event without issuing another.
  3. Close and reopen My tickets, then compare the recovered ticket and event details with the server order.
  4. Scan the same credential simultaneously using two authorized devices; require exactly one successful check-in and one already-used response.
  5. Attempt validation as an unauthorized account, then disconnect an authorized scanner; reject the first and show unable to verify for the second instead of admitting the attendee.

Frequently asked questions

Can check-in continue offline?

This first version deliberately requires the server to prevent duplicate admission across doors. Offline admission needs a separately designed reconciliation and risk policy; a local green check cannot prove that another scanner has not already consumed the ticket.

What if an event is cancelled or moves time zones?

The owner supplies cancellation, refund and schedule-change procedures, including which event-local zone applies. Preserve the original purchase facts, communicate approved changes and make refunded or revoked tickets fail server validation rather than trusting their cached QR image.

Do streaming-event tickets use the same checkout?

Do not assume that admission to a physical venue and digital access consumed inside an app have identical billing treatment. As of November 2026, review Google Play and App Store digital-goods rules before adding online content; any required native purchase integration is separate scope.

Build this blueprint

The blueprint prompt, ready for your platform. Edit anything before you send it.

AndroidKotlin · Jetpack ComposeReal source on your computer

Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.