How to build an event ticketing system with OpenAI Codex
Stop paying high fees on every ticket sold. Simply describe your storefront, ticket limits, and door-scanning rules in simple prompts: OpenAI Codex generates the entire application for you.
OpenAI Codex
$ Build a ticketing platform: organisations and events, ticket types with a fixed allocation, an order path that reserves and sells in one transaction, QR tickets redeemable once, a camera scanner for the gate, and refunds and reports behind them.
- Order path written and proved
- Access rules reviewed as SQL
- Ready for your review
What an event ticketing system actually is
Three applications over one database: the shop where people buy, the counter and the gate where your staff work on the day, and the back office where orders, refunds, and takings are reconciled afterwards.
An event ticketing system isn’t complex enterprise software. It is simply three straightforward tools working together: the storefront where attendees buy, the scanning app your team uses at the door, and the admin dashboard where you track sales and handle refunds.
Most organizers rely on third-party platforms because they work out of the box. But that convenience costs a fortune: you are paying a percentage on every single ticket sold. That fee might feel small for a 50-person meetup, but it turns into a massive expense when you scale to thousands of attendees.
Building your own system used to be hard because of two core edge cases: preventing two people from buying the last ticket at the exact same second, and verifying QR codes at a crowded door without internet. Once you solve these two rules with your AI coding tool, the rest of the application is just simple web screens.
Zero Overselling Risk
Two buyers clicking "pay" on the last ticket at the exact same millisecond isn’t a rare glitch. It’s standard practice. Your AI coding tool configures your database so reservations and payment happen atomically. You will never sell the same seat twice.
Anti-Fraud QR Protection
A ticket isn’t just a digital receipt. It’s a single-use access key. The system validates every QR code against your central database instantly. A screenshot forwarded to four friends will only let the first person through the gate.
Offline-First Door Scanning
When hundreds of people are waiting at the door, a slow network shouldn’t stop entry. The scanner app validates tickets instantly, syncing seamlessly even in basement venues with zero cell signal.
What the fees actually come to
27%
of a ticket’s base price went to fees on the primary market, ranging from 13% to 58% across 31 events and five ticketing companies, the GAO’s 2018 review, still the figure the Congressional Research Service puts in front of Congress in its April 2026 report on live-event tickets.
Congressional Research Service, 2026 (GAO 2018 study) · checked GAO study 2018, CRS report updated April 2026
The parts every ticketing platform is built from
Two of these six decide whether the app survives its first real event. The other four are where most of the visible work is, and almost none of the risk.
Real-Time Inventory & Cart Hold
Each ticket type holds a number that exists and a number already gone, and the moment those two are read in one place and written in another, an on-sale will sell you past your capacity. Reserve and sell in a single database operation, decide how long an abandoned checkout holds its stock, and put the released seats back where somebody else can reach them.
Flexible Ticket Tiers & Limits
A date, a venue, a door time, and one or more ticket types, each with its own price, its own allocation, and its own cap per order. Keep those on the event rather than in your settings, because early-bird, concession, and on-the-door are the same event disagreeing with itself on purpose.
Anti-Fraud QR Tickets
A code per attendee that nobody can guess from the one next to it, a copy the buyer can always reach without an email, and a status that moves from valid to used the first time it is scanned. That status is the whole product on the day.
Offline-Ready Gate Scanner
A phone camera, a result big enough to read at arm’s length, and a decision in well under a second. Then the part people skip: what it does when the network drops. Queue the scans locally, admit against what the device already knows, and reconcile when signal returns, because the alternative is a queue out of the building.
On-Site Cash & Door Sales Sync
Walk-ups are a large share of a small event and they arrive with cash. A till that sells and prints in one movement, on the same stock as the website, keeps the door and the storefront from quietly disagreeing about how many are left.
Master Dashboard & Export
Orders, refunds, exchanges, what sold, what came in, and who actually turned up, with an export, because somebody will want it in a spreadsheet. Attendance against sales is the number that tells you what to print, staff, and order for next time.
Own the checkout or pay per person through the door
Don’t look at monthly subscription fees. The hidden cost of ticketing platforms is the percentage they carve out of every ticket you sell. Multiply that per-ticket fee by your total attendance, and the numbers speak for themselves.
Build your own
Own the checkout outright: one purchase, the whole codebase, and no cut taken from any ticket. Forty attendees and four thousand cost exactly the same to run.
- No percentage and no per-ticket fee, because you choose the payment rail and negotiate its rate yourself
- The same cost to run whether you sell forty tickets or four thousand
- Free events stay genuinely free, rather than free on some plans and charged on others
- Your attendees’ names and email addresses are yours, on a list you can reach without an export request
- The checkout carries your name rather than a marketplace’s, which is most of what a first-time buyer is deciding about
- Fee handling, refund windows, exchange rules, and how many per order are your policies, not a vendor’s defaults
Rent the checkout
Eventbrite · Universe · TicketSpice · HumanitixWhat renting genuinely buys you is the money rail and the audience in front of it. Card processing, refunds, chargebacks on a category that attracts fraud, payouts, and a marketplace where people who have never heard of you are already browsing. None of that is the part you would enjoy building.
- Selling works on the first day, with the processor, the payouts, and the failed-card handling already solved
- Chargebacks and fraud are somebody else’s problem, which matters more here than in most categories
- The larger platforms put your event in front of people already searching, which no app of your own does
- Scanning apps, printed-ticket formats, and door hardware arrive built rather than described
- Every one of them takes a cut of each ticket, so the bill scales with the exact thing you are trying to grow
- Free is not uniformly free: three of these four charge nothing on free tickets, and one charges the same flat fee unless you also sell paid ones
The category default, and the clearest statement of the percentage model. The page quotes a “3.7% + $1.79 service fee per ticket” alongside a “2.9% payment processing fee per order”, and lets you choose whether you or the attendee absorbs them. Free events are free: the page offers to “Publish unlimited free events at no cost”. What it does not publish is a plan ladder: the only monthly figure anywhere on it is $15/month for the Pro email tool, which is an add-on rather than the thing you are buying, so no tier price is estimated for it here. Do the multiplication before you compare anything: on a $40 ticket that combined cut is over $5, and it is charged again for every person who comes.
eventbrite.com · checked August 2026
The low-percentage end of the same model, owned by Ticketmaster. Starter and Standard both show “2% + $0.59 per ticket”, and free tickets carry nothing at all. The page is unusually blunt about it: “There are absolutely no service fees. Universe is 100% free for free events”. Payment processing is bundled when you take money through Universe itself. Connect your own Stripe account instead and the page says the processing fee “will be charged to you by Stripe”, which is worth reading twice, because it changes who your money touches first. Pro publishes no figure.
universe.com · checked August 2026
Included because it prices the opposite way: a flat amount rather than a percentage, which gets cheaper relative to face value the more expensive your ticket is. The page states “99¢ per ticket plus standard credit card processing rates of 2.9% + 30¢”, drops to “49¢ a ticket” on tickets of $5 or less and on box office sales, and answers the question of what else there is with “Nope, nada, zilch.” No monthly plans, setup fees, or contracts. One line to catch: unlike the other three, a free ticket is still charged unless your organisation is also selling paid ones.
ticketspice.com · checked August 2026
The not-for-profit end, and useful here for showing that even a platform donating its profits still charges per ticket, because the rail underneath costs money whoever runs it. The standard booking fee is “2.1% + $0.99” with processing of “2.9% + $0.30” on top. Charities and schools pay “1% + $0.99” on the same processing. Free events cost “$Nothing. Nada. zero.”, and the page commits that “ALL plans get access to ALL features. NO sign up fees, NO contracts.” Custom arrangements exist on request with no published figure.
humanitix.com · checked August 2026
Rule of thumb: if you need an audience you do not have, buy. A marketplace putting your event in front of strangers is worth a real percentage, and none of it is something an app of your own provides. If your attendees already know who you are, because they follow you, subscribe to you, or come every month, then you are paying a finder’s fee on people you found yourself, and that is the case for building. The arithmetic that settles it is one line: your ticket price, times the percentage, plus the fixed fee, times how many people come. For scale, the Congressional Research Service reports that in 2025 Ticketmaster averaged about $8.91 in revenue for each fee-bearing ticket it sold, not your rate, but a fair sense of what a seat at the top of this market is worth to the company selling it.
Why build with Codex
Most software looks simple from the outside, but almost all of the actual work is invisible: a database, logins, permission checks, forms that validate what people type, and dozens of screens that read and write records. Doing that by hand means knowing the whole stack cold, so weeks pass before the first feature a customer would notice actually works.
Codex closes that gap by working the way a developer would, just faster. The whole workflow becomes a simple loop:
Describe
Tell Codex what you want, in plain language.
Build
It edits the real project files, backend and auth and UI, rather than replying in a chat.
Check
Run the app yourself and confirm the change works.
Repeat
Describe the next change.
None of that loop needs a computer-science background, which is why one person can take an idea to a working app over a handful of focused sessions.
Three hard partshandled for you
The data model, authentication, and access rules are the pieces that make software like this genuinely hard to build alone. Describe them and Codex scaffolds all three, leaving mostly screens to build on top.
Any language is the interface
There’s no code to write, and no requirement to describe it in English. Ask for a new field, a renamed step, or an AI summary in whatever language you think in, and Codex implements it.
Local files it edits directly
Codex works on the project on your own disk rather than a copy somewhere else, so what it changes is exactly what you see when you run the app. Point it at the handful of files that matter and it stays fast and focused.
Pay a developer, or do it with AI
Two ways to get the same app built: pay a developer for their hours, or spend your own describing it to an AI coding tool. Here is what each one costs to build, and what it costs to keep running once it is live.
Hire a developer
Custom build, from scratch- Developer
- ~$13k-$51k
- Supabase (backend)
- Free tier · $25/mo (Pro plan)*
- Hosting
- $0 free tier
- Build time
- ~255 hrs of their work
~$13k-$51k to build, then from $25/mo after launch
Our ~255-hour estimate, priced against the rate survey linked below. That survey puts senior US developers in the $100-$150+/hour bands and notes the 20-40% an agency adds over them, so $50/hr and $200/hr bracket the realistic ends. The interesting part is where the hours land: roughly a third of them go on the inventory rules and the door, neither of which appears in a single screenshot, which is the usual reason a quote for this kind of app comes back at a number the organiser was not expecting.
Build it with Codex
From scratch, with Codex- Codex
- ~$20/month (Plus) to ~$200/month (Pro)
- Backend (Supabase)
- Free tier · $25/month (Pro plan)*
- Hosting
- $0 on a free tier
- Your time
- ~122 hrs
~$20-$200/month while you build, then whichever plan you keep using
Codex itself is free to install. The cost sits in the ChatGPT plan behind it, or in API usage if you sign in with a key instead. Plus, around $20/month, covers a template import or a short build. A from-scratch build that runs for weeks usually needs Pro’s top usage-multiplier tier instead, which lands around $100 to $200 a month. The fee doesn’t shrink when you start from a template the way a per-hour developer bill would: the template changes how many of the hours in the estimator above you actually spend, not which ChatGPT plan you’re paying for.
* One line on the free tier is worth more attention on this build than on most. Supabase Free comes with 500 MB of database space, 1 GB of file storage, and 5 GB of monthly egress, and it puts a project to sleep after seven days without activity. Look at the traffic shape of a ticketing app (one on-sale, one event night, weeks of silence around both) and that sleep is not an edge case, it is the default state. Pro, from $25/mo, ends it, brings 250 GB of egress (then $0.09 per GB), and keeps a daily backup for 7 days. Free is genuinely fine until you announce something. Announcing is the moment to move.
Neither column takes a cut of a ticket, because the app records orders and whatever payment rail you connect charges its own rate, so the running cost is a database and a host and nothing else. That bill does not move with attendance: forty tickets and four thousand cost the same to host, and the only thing that grows is the traffic on the night.
Prices and rates from supabase.com, developex.com and learn.chatgpt.com, checked August 2026.
Decide before you build
Answer these six simple questions before launching your platform. Settling your rules today takes minutes: fixing them on the day of the event costs money and lost sales.
How will you take payments?
Decide whether you will process credit cards online or accept manual transfers/cash. Card processors automate sales instantly and handle disputes, but they take a small fee (2-3%) on each transaction.
General admission or reserved seating?
Are your tickets first-come, first-served, or do attendees pick exact seat numbers on a floor map? Simple ticket counts are effortless to build, while interactive seat maps require additional setup logic.
Guest checkout or forced accounts?
Requiring buyers to create an account creates friction and lowers sales. Allowing instant guest checkout sells more tickets, while sending a simple login link via email helps buyers recover lost tickets later.
Hidden fees or all-inclusive prices?
Will you absorb payment processing fees into the ticket price or add them on top at checkout? Adding surprise fees at the final step is the single biggest cause of abandoned shopping carts.
Clear refund and transfer policies
Define your rules upfront: Can attendees request a refund up to 48 hours before the event? Can they transfer a ticket to a friend’s name? Setting these rules into your system automates support and stops dispute confusion.
Door entry logistics & internet signal
How many staff members will scan QR codes, and will the venue entrance have reliable Wi-Fi or 4G? If the signal drops in a basement or field, your scanning app must be able to validate tickets offline.
Comparing your build options
How much of the estimate disappears into concurrency and doorways instead of screens is decided by where you begin. Below is one app built three ways: entirely by hand, on a UI kit that stops at a catalogue, or with Codex working task by task on the real source.
Two deadlines sit inside this build and neither moves. The on-sale, where a hundred people press buy in the same second and the count has to stay honest, and the door, where a scan has to resolve in under a second on a phone with one bar of signal. Both are hard to get right and impossible to postpone.
A starter kit hands you a catalogue, a cart, and a dashboard. It has no notion of a ticket that must be sold once and admitted once, no idea that two buyers can reach the last twenty at the same moment, and nothing at all for the gate. The inventory rules and the whole door are still yours.
Hand Codex one task at a time and it edits the real files (the migrations, the order transaction, the scanner screen) from the terminal, an editor extension, or a cloud run you check back on later. The same task list, worked as diffs you approve.
Estimate your exact build timeframe
Select the features your event platform needs. Uncheck what you don’t use to see your custom setup timeframe.
Your estimate
122 hrs
start to finish
Based on the 6 of 6 features you’ve selected, plus ~29h of groundwork. Toggle any on the left to watch the number move, and open the groundwork row to untick what you have already, such as a database that is already running or going live if you are only building a mock-up for now.
A rough estimate, not a quote. Real time depends on how much you customize and how clean your data is.
Let’s set up the tools you need
Before step 01, four things go on your computer. It takes about 15 minutes in total, and none of it is coding. Three are ordinary installers, and the fourth is a ChatGPT plan with Codex access switched on. After that, you build by describing what you want in plain language.
OpenAI Codex
Your main AI assistant. The app itself costs nothing and installs with a single command from OpenAI, then runs in your Terminal. What it costs to use is the next card: every request spends the usage allowance on your ChatGPT plan, and the free plan’s allowance is small enough that a build of this size stops early. Codex is also built into an extension for popular code editors and into the ChatGPT desktop app, which can hand a longer task off to Codex cloud to keep running in an isolated environment while you do something else.
Install Codex CLIChatGPT plan
Codex is technically included on the free ChatGPT plan too, but Free’s usage is the tightest of any tier. OpenAI doesn’t publish Free’s own cap, only that every paid tier gets a larger multiple of it, so treat Free as a way to try Codex rather than to build with it. ChatGPT Plus, around $20/month, is the realistic starting point, and a long, from-scratch build tends to need the top ChatGPT Pro tier, priced by usage multiplier at roughly $100 to $200/month. Codex can also run on pay-as-you-go API billing instead of a ChatGPT plan, if you’d rather pay per token than hold a subscription.
Compare ChatGPT plansNode.js engine
The engine that runs your app on your own computer. You never have to learn how it works: download the version marked LTS (the most stable one), install it, and forget about it.
Download Node.js (LTS)Supabase (database)
Where your project keeps its data. Install it, then sign in once by running supabase login. Words like migrations and row-level security turn up later in the guide, and Codex writes those parts for you.
Install Supabase CLINothing here is worth memorizing. These four just need to exist on your machine. From step 01 on, you say what you want and Codex runs the commands.
Build your ticketing platform, one Codex task at a time
You describe a task, Codex writes the files and runs the commands. The sequence front-loads the two places a plausible-looking diff can be quietly wrong: the transaction behind a sale, and the redemption behind a scan. Both get their own task and a close read while the only data is invented.
- 01
AGENTS.md comes before the scaffold, not after it
Every task Codex starts begins by reading that file. Writing it first means the two constraints this build turns on are already loaded before a single line exists to violate them.
PromptSet up the projectStart by writing an AGENTS.md at the project root: the stack is React 18, Vite, TypeScript, Tailwind, and the Supabase JS client, and this project is an event ticketing platform. Fix the vocabulary (organisation, event, performance, ticket type, allocation, order, ticket, scan) and record two standing constraints: what remains of a ticket type is always derived from its allocation and what has sold, never held as a figure the client can write, and a ticket is redeemable exactly once with that check performed on the server rather than on the scanning device. You load that file automatically at the start of every later task. Then scaffold the project: a typed Supabase client under src/lib reading VITE_SUPABASE_URL and the publishable key (the sb_publishable_… key that replaced the older anon key) from .env, with .env confirmed present in .gitignore. Start the dev server once to prove it boots.
The derived-count rule is the one worth writing down. Caching the remaining number is a reasonable-sounding optimisation for any assistant to propose later, and it is how a storefront and a gate start disagreeing about whether an event is sold out.
- 02
Give the schema and the storefront one task each
Two tasks that are cheap to get wrong and cheap to redo, since nothing depends on them yet. The point of doing them together is to click the storefront and find out whether your ticket types match how you actually sell.
PromptModel the events and build the storefrontTwo tasks. First, the data model as Supabase migrations, with no authentication in this task. Organisations own venues and events. Events carry a title, description, image, status, and their organisation. Performances, because one event can run several times, each carry a start time, a door time, and a capacity. Ticket types sit under a performance with a name, a price, an allocation, a sold count, and a per-order maximum. Show me the SQL before you run it, then seed two organisations with three events between them, one of which has early-bird and standard tiers on the same date. Second task, the public storefront over that: browse with search and a date filter, and an event page listing dates, ticket types, prices, what remains, and a quantity picker honouring the per-order maximum. Nothing signs in and nothing sells yet.
Seed the two-tier event deliberately. One date carrying two prices is the first place a ticket model contradicts itself, and it is much cheaper to notice now than in a migration against live orders.
- 03
Give the oversell problem its own task, and read that diff
The largest piece of genuinely tricky logic in the build. Keep it in one task, ask for the SQL before it runs, and test the collision rather than the happy path.
PromptBuild the checkout that cannot oversellOne task, the order path. Orders carry a performance, a buyer name and email, a status of pending, confirmed, or cancelled, a channel of online or box office, and a total. Tickets belong to an order and a ticket type. The part I want you to be careful about is stock: write a Postgres function that takes a ticket type and a quantity, takes a row lock, compares the allocation against the sold count, and then either creates the order, creates its tickets, and increments the sold count within one transaction, or fails with a reason, never a read followed by a later write. Call it from a Supabase edge function so no browser ever updates the count. Give pending orders a hold window and add a job that expires unpaid ones and releases their stock. Show me the SQL before it runs. Then demonstrate two simultaneous orders for the last two tickets and print what each returned and what the counts are afterwards.
This is the task to spend a round trip on. Asking for the SQL first is cheap. Discovering during a sold-out on-sale that the check and the write were two statements is not.
- 04
Narrow Codex’s permissions, then add the roles
Authentication and the rules guarding your buyers’ names and email addresses, in one task. Tighten what Codex is allowed to do for this one rather than running it under whatever you use for ordinary edits.
PromptAdd auth, roles, and access rulesNarrow your permissions for this task before starting it, because everything here touches authentication. Wire in Supabase Auth for email-and-password sign-up, login, logout, a persisted session, and a useUser hook. Add an app_role enum of 'buyer', 'staff', and 'admin' with a user_roles table kept off the account itself, since anything stored there is editable by its owner, plus a SECURITY DEFINER has_role function, and a membership table tying accounts to organisations with a has_org_access helper. Then row-level security over organisations, events, performances, ticket types, orders, tickets, and scans, where every rule checks role and organisation together: a buyer sees only their own orders and tickets, staff see their own organisation’s events and may sell and scan without touching prices or takings, and an admin is scoped to their own organisation and no further. Explicit WITH CHECK on every insert and update. Show me the policies as SQL before they run, then walk me through querying as a buyer to prove another buyer’s orders and another organisation’s events both come back empty.
Three roles across two dimensions means more policies than tables, and the one nobody wrote is the one that leaks. Ask for the list of tables and roles it actually covered and check it against your own schema rather than assuming the set was complete.
- 05
The door, in one task: tickets, scanner, and till
Three features share one constraint: they all run on a phone in a doorway. That is why they belong in one task and get tested the same way.
PromptBuild the doorOne task covering the whole door. Ticket issue first: every ticket gets an unguessable code that cannot be inferred from its neighbours, rendered as a QR on a "My tickets" page the buyer can return to, with a download. Then the scanner: a staff-only camera screen that reads a code, calls a server-side edge function to validate and redeem it, and shows a result legible at arm’s length: admitted, already used with the time and device that used it, wrong event, or refunded. Redemption happens on the server and must be safe against the same code arriving twice at once. Then the offline path: cache the event’s valid codes on the device, admit against that cache when the network is gone, queue every scan, reconcile on reconnect, and flag anything that turns out to have been admitted twice. Finally a box office till selling walk-ups against the same stock as the site, cash included. Flag in the diff anywhere you put a decision on the device that belongs on the server.
The offline rule is yours to choose, not Codex’s to infer. Admit-and-reconcile keeps a queue moving and accepts that a duplicate may get through. Refuse-if-unverified keeps the count exact and stops the queue. Say which, or you will find out on the night.
- 06Destination
Hand the reports to a cloud run, then rehearse it yourself
Refunds, exchanges, and reporting are well-specified and self-contained, a reasonable hand-off while you do something else. The rehearsal at the end is not, and it is the part that finds what a diff cannot.
PromptAdd the back office and rehearseTwo pieces, both self-contained enough to run unattended. First, refunds and exchanges as server-side functions: a refund cancels its tickets, returns the stock to the allocation, and records who did it and why. An exchange voids the old tickets, issues replacements carrying new codes, and settles the difference. Second, the admin panel over events, orders, payments, and venues, plus reports (sales by ticket type, revenue, scanned against sold, and arrival times across the evening), each exportable as CSV. When both are merged, run the app and take it end to end yourself: publish an event, buy two tickets, sell a third at the box office, scan all three on a phone, present the first one again, refund one and confirm its stock returned, and check the sales and attendance reports against what you actually did, then fix whatever does not hold up.
If you hand the first half to a cloud run, read the refund diff before merging it. Returning stock to the allocation is one line in a function that otherwise looks finished, and its absence is invisible until a refunded event stays sold out.
Built-in security, role permissions, and fraud protection
Protecting buyer data and ticket validity requires strict server-side security. Here is how your system secures user access, handles permissions, and prevents ticket fraud.
Out-of-the-box user authentication
Registration, sign-in, sessions, and the forgotten-password path should all come from your database provider’s own auth service. None of it is code worth having written for you, and all of it is code that is unpleasant to get subtly wrong. Keep it to email and password: your buyer signs in perhaps twice a year, and every extra step between wanting a ticket and holding one costs you some of them.
Smart role permissions (Buyer, Staff, Admin)
The template ships buyer, staff, and admin. Buyers reach their own orders and nothing else, admins run the organisation, and staff sit in between with exactly the powers the door needs (sell at the counter, scan a code, admit somebody) and none of the powers it does not, like editing prices or reading the takings. That middle role is the one worth getting right, because it is handed out to the most people and often to the ones you know least well.
Server-verified gate check-in
The check-in screen has to refuse to admit anybody when the account holding it is not staff for that event, checked on the server, on every scan. A door tool that trusts whatever device opened it is a door tool that a shared link turns into a free entrance.
Ironclad buyer data privacy
An orders page that narrows results in the component is one missing condition away from listing somebody else’s purchase, name, and email address. Row-level security moves that decision to the point the rows are handed out, which changes the failure: a query nobody remembered to scope returns nothing instead of returning everything.
Organisation-scoped access rules (90 policies)
The template ships 90 row-level security policies, and the count is structural rather than anxious: most tables need one rule for the buyer the row is about, another for the staff working that event, and a third for the admin who owns it, with every one of those also checking which organisation is asking.
Privilege escalation defense
Buyer, staff, and admin live in a roles table of their own, for one specific reason: whatever sits on an account is editable by whoever owns that account. Store the role there and a buyer can promote themselves to admin, at which point your box office, your takings, and every other buyer’s details belong to them too.
Unguessable, single-use QR tickets
Whoever holds it gets in, which makes it exactly as sensitive as a password and rather easier to forward. Generate it from something unguessable rather than from the ticket’s position in a list, redeem it once on the server, and record which device admitted it and when, so a duplicate at the gate is a question you can answer rather than an argument.
Secure automated business logic
Refunding an order, exchanging a ticket, or admitting somebody at the gate all need to do several things at once and to outrank the person asking. The template puts 13 of those on the server as edge functions, where they run with elevated privileges above the access rules and enforce the business rule themselves, which is why the access rules can stay strict without the app becoming unusable.
Automated database backups
The free tier keeps none: not your orders, and not the tickets you have already issued. Daily backups with a week of history begin on Supabase Pro at $25/mo. Read that line twice on this build in particular: an order table lost during the week of an event leaves several hundred people holding codes you have no way to check, and no way to reissue.
Review the access rules (row-level security policies) on every table. For each one, tell me in simple terms who can view, add, edit, and delete records, confirm that people can only reach their own data while the right roles can reach more, and flag anything left open that shouldn’t be.
Paste this before launch so Codex checks nobody can see data they shouldn’t.
The one rule that matters: the database service key, the secret your ticket codes are signed with, and any payment key you add later never belong in the app or in a public repo. If one of them gets out, assume it is compromised and rotate it that day.
What speeds the build, and what slows it
Speeds the build
- An AGENTS.md file at your project root: Codex reads it automatically before every task, so you never have to remind it
- Setting Codex’s permissions once for the session, instead of approving every small edit by hand
- Handing a long, well-scoped task to Codex cloud, so it keeps working in an isolated environment while you do something else
- Reviewing a diff in the IDE extension, next to the code it touched, before you keep it
Slows the build
- Leaving permissions wide open for a sensitive change instead of narrowing them for that one task
- Skipping the AGENTS.md file, so Codex starts each new task without your conventions loaded
- Handing Codex cloud a vague, open-ended task, where you can’t steer it mid-run the way you can in a live terminal session
- Merging a cloud task’s changes back in without reading the diff first
Git: what it is, and why you need it
Before you build anything, meet the one tool that makes building safe. You need no coding background for it: Git remembers every version of your project, so you can try things, break things, and get back to a working state in seconds.
What Git actually is
Git is a quiet recorder that runs alongside your project. Each time you save your work it keeps a full snapshot, so the entire history of your project lives on your computer, not just whatever the files look like right now.
Why you need it
Codex asks before it edits files or runs commands, unless you widen its permissions for the session. Once you do, Git is what makes that safe: there’s always a working version to return to, so you can hand it a bigger task without the fear of losing what already works.
A commit is a save point
Each commit is a snapshot with a short note, like “added the home page”. Make one after every working step and you can jump back to any of them later.
GitHub’s beginner guide to GitUndo anything, safely
If a change breaks something, you roll back to the last good commit instead of unpicking it by hand. It’s the safety net that keeps a Codex session low-risk even once you’ve widened its permissions.
GitHub is also where Codex can start from
Git lives on your computer. GitHub is a free, private cloud copy of the same project. Keep it private, and never commit secret keys or passwords. Once your project is pushed there, Codex cloud can pick up a task straight from a GitHub issue or repo, without you opening a terminal at all.
Create a free GitHub accountYou rarely type git commands
There’s little to memorize. Ask Codex to “commit this” or “undo the last change” and it runs the git steps for you, inside whatever permission boundary you’ve set. Prefer clicking to typing? The Codex extension for your editor shows each change next to the code it touched before you keep it, and GitHub Desktop gives you plain buttons for saving and rolling back.
Get CodexWhere to host your application
Hosting gives your app a home on the internet so anyone can open it via a web link. Choose a service below to make your site live. (Your database, logins, and business records are stored separately in Supabase, covered below).
| Host | Best for | Notes | Free tier |
|---|---|---|---|
| Vercel | One-click deploys | Connect the repository once and every push goes live on its own, with nothing to configure for a Vite project. The line to read before your first on-sale is the plan terms: Hobby permits personal, non-commercial use only, and charging people for entry is commercial under any reading of it, so anything selling belongs on Pro at $20/user/mo. | Pro from $20/user/mo (Hobby is non-commercial) |
| Netlify | Drag-and-drop or Git | Connect the repository, or drag the built folder onto the page and be live in about a minute. It needs one redirect rule so that a link straight to a single event opens that event rather than a not-found page, which matters here, because a shared link is how most of your buyers arrive. | Free tier |
| Cloudflare Pages | Handling the on-sale spike | Copies of the site sit near your visitors rather than in one place, which is the property that matters on this build: a ticketing site is idle for weeks and then serves a month of traffic in about ninety seconds when tickets go on sale. | Generous free tier |
| GitHub Pages | Not really this app | Free publishing straight out of your GitHub project, after changing one routing setting. Listed mainly to be ruled out: publishing free requires the repository to be public, and this one sits alongside an app holding your buyers’ names and email addresses, so the free path is one you would not want to take. | Free from a public repo only |
| Firebase Hosting | Teams already on Google | Set it up once, then release with a single command each time. The reason to choose it is almost always that your other accounts are already Google ones. | Free Spark tier |
| AWS Amplify Hosting | Teams already on AWS | Publishes from the AWS console, with one rewrite rule so a direct link to an event resolves. Worth choosing when AWS is already on your invoices and you would rather not add a vendor. | Free tier (build + hosting) |
| Surge | Publish from the terminal | One terminal command puts the built folder online, with no repository anywhere in the process. Good for showing a venue what the storefront looks like over coffee, though not for the address you print on a poster. | Free - unlimited publishing |
| DigitalOcean App Platform | DigitalOcean users | Builds and serves from the account that already holds whatever else you run. That consolidation is the whole reason to pick it over the rest of this list. | Free - 3 static sites, 1 GB/mo transfer |
Any of these will serve the app. Three things to check here rather than one. Does the plan allow commercial use? Vercel’s Hobby tier does not, and you are taking money. Can it publish from a private repository, given the code sits beside an app holding your buyers’ contact details. And does it give you HTTPS on a real domain, which on this build is a functional requirement rather than a nicety, for the reason below.
Your scanner will not open the camera unless the page is on HTTPS. Browsers only hand over a camera on a secure origin or on localhost, so a check-in screen opened over plain http, or on a bare address on the venue wi-fi, shows a permission failure and nothing else. Every host above gives you HTTPS on a real domain for free. Use it, and then test the scanner on the actual phone, at the actual door, before the doors open rather than while there is a queue.
Keep your data in Supabase
Events, orders, issued tickets, accounts, and whichever images you attach. This is also where the rules that outrank the person asking live: refunding, exchanging, and admitting somebody at the gate.
| Service | Best for | Notes | Free tier |
|---|---|---|---|
| Supabase | Data, auth, functions, files | Postgres holds the events and the orders, auth covers all three kinds of account, edge functions carry the order, refund, and admit-a-ticket rules that have to outrank the person asking, and storage holds your event images. Opening a free project and handing over its URL and publishable key is the whole of the setup. Watch one line on the free tier: a project pauses after a week of nothing happening, and weeks of nothing happening is the normal state of a ticketing app between events. | Free tier, then usage-based |
Where AI genuinely helps an organiser
Each of these is one more prompt once the selling works. The template carries no outside keys, so the first one also creates the single server-side function the other three go through, with your key on it alone.
Write the event listing from the facts you already have
The description is the last thing done before an on-sale and usually the most rushed. Turning a date, a venue, a line-up, and three bullet points into a listing that reads properly is an edit rather than a writing task.
Add a "Draft the listing" action on the event form. Send the event name, date, door time, venue, ticket types with their prices, and any notes I have typed to a server-side function calling an AI model, and return a short summary line and a longer description in a tone I choose. Show them as editable drafts rather than saving them, never invent a detail I did not provide (no line-ups, no times, no claims about the venue) and leave anything it was not given blank instead of guessing.
Answer the questions your inbox keeps getting
Every event generates the same messages: is it accessible, can I bring a child, where do I park, what happens if it rains. Answering them from what you have already published is the least interesting hour of running an event.
Add a question box on the public event page that answers from that event’s own published details and my organisation’s standing information only, through my ai function. Retrieve the relevant text first and pass it in, keep the answer to what is in that text, and when there is no answer say so and offer the contact route rather than guessing. Never let it state a policy on refunds, entry, or accessibility that is not written in the source it was given.
Explain what actually happened at the door
Attendance against sales is the number that decides how much to print, how many staff to book, and how many to order for next time. It is buried across orders, tickets, and scans in three different shapes.
Add a post-event summary that sends the aggregate figures for one event (tickets sold by type, revenue, how many were scanned in, when the arrivals happened across the evening, refunds and exchanges) to my ai function, and returns a short written read of it: how the sale went, what turnout looked like against what sold, and where the arrival peak fell. Send aggregate numbers only, never attendee names or email addresses, and have it state the figures rather than describing them vaguely.
Ask your own sales a question nobody built a report for
Whatever reporting you build answers the questions you had while building it. The questions that turn up later are things like which tier sold out first, whether March’s crowd came back in June, or which night people bought latest.
Put a question box on the admin dashboard that converts a plain-language question about my events into a single read-only lookup and renders the answer as a small exportable table. Constraints, all of them enforced rather than requested: describe the tables to the model instead of sending it any rows, permit SELECT and nothing else, run the query under the signed-in account so the same access rules that govern the rest of the app govern this too, exclude attendee names and email addresses from anything it returns, and print the query beside the answer so I can see what it actually asked.
Each prompt above should pick whichever model tier fits the job: a fast, lower-cost model for high-volume work, and a stronger reasoning model for anything that weighs tradeoffs against each other. Codex’s model names change faster than this page does, so check OpenAI’s current model line-up (linked in the references below) before you build, rather than copying a name you saw once. Keep all of it behind that same ai function, so one key and one rule set covers every feature you add.
Get a head start with our template
Don’t want to assemble the app step-by-step? Get the complete, fully-functional template. Connect your database, add your event details, and start selling tickets in an afternoon, no manual coding required.
Event Ticketing System
The exact ticketing platform this guide builds, packaged so you can open it, point it at your own backend, and make it yours from there. An event ticketing platform that takes you from selling tickets online to scanning people in at the door. Attendees buy in a few taps, your staff sell and check in on the day, and you keep an eye on orders and payments behind the scenes.
The key benefits of starting with a template
Skip weeks of backend coding, complex security tests, and edge-case debugging. Launch a complete, custom ticketing platform in under an hour.
Building the core from scratch
~122 hrs
Opening the template, already built
~1 hr
~121 hrs of building you skip
These measure two different things on purpose. The ~122 hrs is the cost of building the app. The ~1 hr is how long the finished one takes to open, aim at your own database, and load your first event into. Wiring up a payment rail and deciding your refund rules cost the same on both paths, so neither figure includes them.
A checkout that already holds stock
Ticket types carry what exists and what has gone, with a cap per order, and the order path moves both together rather than reading one and trusting it, which is the difference between a busy on-sale and an apology to the last four buyers.
Turnkey entrance & scanner toolkit
A camera scanner that admits a code once and refuses it the second time, a queue that holds scans when the signal drops and reconciles them when it returns, a counter till for walk-ups on the same stock as the website, and a maintenance job for when a barcode goes wrong at the worst moment.
Pre-configured roles & security
Buyer, staff, and admin accounts with 90 row-level security policies behind them, every one also checking which organisation is asking, plus 13 server-side functions for the rules that have to outrank the person asking, like refunding an order or admitting somebody at the gate.
Clean code optimized for AI prompts
Typed throughout, organised by feature rather than by file kind, and annotated wherever the reasoning would not be obvious to somebody reading it cold. That last part matters most around the order path: a change made there without following the pattern already in place produces the sort of bug that surfaces at a sold-out door, not in a test run.
From founders who build on our templates
Starting with this template saved us dozens of hours of complex setup. Instead of building from scratch, I loaded the template into our AI assistant, customized the ticketing rules with simple prompts, and shipped a live platform in under several days.
Jeevan ThomasFounder & CEO, Hado.aiCommon questions
Not on its own. The template records orders and tracks their payment status, but the payment itself is simulated rather than real. No gateway is wired up, and no processor key sits anywhere in it. Connecting one is a described step rather than a rebuild, and doing it deliberately is the point: whichever rail you pick sets the fee on every ticket you sell, and that is the number this whole approach is about controlling.
No, and it is the half your AI coding tool handles best. Describe what you want in ordinary language and it produces the tables, the three kinds of account, the rules governing what each can reach, and the server-side functions behind creating an order or admitting somebody at the gate. Your one job is opening a free Supabase project for it to write into, which is also what keeps your events and your buyer list somewhere you own rather than somewhere you are renting.
The database, if you ask for it properly. The rule to insist on is that reserving stock and creating the order happen in one operation that cannot be interrupted, rather than a screen reading the remaining count and writing an order a moment later. Ask to see it proved with two orders landing at the same instant on the last ticket, a demonstration, not a description, because this is the bug that only appears when the event is going well.
It can, and this is worth specifying before it is built rather than after. The pattern is that the device holds the list of valid codes for that event, admits against what it already knows, queues each scan locally, and reconciles when signal returns. What you decide is how it should behave in the gap. Most organisers would rather admit a genuine attendee and catch a duplicate on reconciliation than hold up a queue, but that is a policy call and the code should reflect the one you actually made.
Not without building it. This template sells general admission: each ticket type has a number and buyers take from it. Reserved seating is a genuinely different application: a plan of the room, a hold on individual seats while somebody checks out, and a picker that stays usable on a phone. It is describable in plain words like anything else here, but it belongs in the plan before the data model rather than as an addition afterwards.
Not as it stands. Orders and tickets are shown in the app, and a buyer with an account can always come back and find theirs, which covers the common case of a lost email. Sending confirmations means connecting an email service, which is a small, well-defined addition, and one worth making before a real on-sale, because a ticket somebody can only reach by signing in is a support message waiting to happen.
Two things, both with a free tier: somewhere to keep the data and somewhere to serve the app. Supabase Pro, from $25/mo, is the upgrade to make once a real event depends on it, and the reason is less about size than about sleep. A free project shuts down after seven quiet days, and quiet is what a ticketing app is between events. Past those two lines, the only cost tied to a ticket is whatever your payment rail charges. Nothing else takes a cut.
Yes. That is built in rather than bolted on. Events, orders, and staff all belong to an organisation, and the access rules check which one is asking on top of checking the role, so a promoter running three rooms or an agency running events for several clients keeps them properly separate rather than filtered apart on screen.
Nothing here is proprietary. Events, orders, tickets, and check-in records live in ordinary PostgreSQL, so a standard dump gives you everything in a form any Postgres host accepts. That matters more than usual in this category: the buyer list is the asset, and the reason organisers stay on platforms they have outgrown is normally that the list will not come out.
Yes, and do it before you announce anything. Every host listed above attaches one in a few clicks with HTTPS included, and you are about to ask strangers to type card details into a page. A name they recognise as yours does most of that reassuring on its own. The HTTPS half is not merely cosmetic here either, because the check-in scanner cannot open a camera without a secure address.
No, though you will type the occasional command: installing Codex, starting the app, applying a database change. The setup section above lists what you need, with a link for each, and once it’s on your machine Codex runs most of those commands for you.
A regular ChatGPT chat can sketch ideas and write snippets, but it isn’t working on your actual project. Codex reads and edits the real files on your computer. The app you get out of it is one you can run and publish, not a preview.
On a ChatGPT plan, Codex’s usage resets on a rolling window rather than billing per token, so a heavy day of building can bump into a limit. You either wait for it to reset, move up a plan, or switch to pay-as-you-go API billing for the rest of the session. Nothing you’ve already built is lost either way, so the work only pauses.
References
Sources checked August 2026- 01Tickets for Live Entertainment Events (CRS report R48179, April 2026 update). everycrsreport.com (CRS report updated April 2026)
- 02Event Ticket Sales: Market Characteristics and Consumer Protection Issues, U.S. GAO. gao.gov (published 2018)
- 03Pricing (service fee and payment processing per ticket), Eventbrite. eventbrite.com
- 04Pricing (per-ticket fee, free events, Stripe option), Universe. universe.com
- 05Pricing (flat per-ticket fee, low-price and box office rates), TicketSpice. ticketspice.com
- 06Pricing (booking fee, charity rate, free events), Humanitix. humanitix.com
- 07Pricing (Pro plan, egress, backups, free-tier pause), Supabase. supabase.com
- 08Web developer hourly rates 2026 (freelance and agency benchmarks). developex.com
- 09Row Level Security, Supabase docs. supabase.com
- 10Storage access control, Supabase docs. supabase.com
- 11Pricing (plans, usage limits), ChatGPT docs. learn.chatgpt.com
- 12Codex CLI, ChatGPT docs. learn.chatgpt.com
- 13API pricing (models), OpenAI for developers. developers.openai.com
- 14IDE extension, ChatGPT docs. learn.chatgpt.com
- 15ChatGPT desktop app, ChatGPT docs. learn.chatgpt.com
- 16Codex cloud, ChatGPT docs. learn.chatgpt.com
- 17AGENTS.md, ChatGPT docs. learn.chatgpt.com
This guide is general information, not legal, tax, or accounting advice. Consumer rules on how ticket prices and fees must be displayed, what refunds are owed when an event is cancelled, and how attendee data may be used vary by country and by state, so check your own rules before you sell anything. Third-party fees, plan terms, and market rates are quoted from the sources above and were last checked on the date shown. Vendors change them without notice, so confirm before you budget. Build hours and the cost estimates derived from them are our own estimates, not quotes. Codex, ChatGPT, and the OpenAI API are products of OpenAI. Verify current capabilities and pricing before relying on them.