
22night
Nightlife events platform with guestlists, QR tickets and a prize wheel
- Role
- Freelance full-stack developer
- When
- Aug 2024 – Jan 2026
- Status
- Live platform
- Highlight
- Sole developer since 2024 · ~76K lines
Demo · mobile viewport
Overview
What it is
22night is a web platform where members find nightlife events in Dutch cities, join free guestlists, buy tickets and spin a prize wheel for free entry. Venue partners and an admin team run events, ticket stock, orders and analytics from the same app. Together with the other events platforms I freelanced on, it serves 30K+ monthly active users.
I built and maintained it as a React single-page app on Supabase, with Postgres and row-level security, Deno Edge Functions, Stripe payments, Brevo emails and PostHog analytics. I wrote the ticket reservation and payment flow, the fee logic, the prize wheel and the admin tooling.
Why it’s interesting
- Tickets are soft-locked for 10 minutes. Expired reservations are reclaimed on the next reserve, and a Stripe webhook finalizes the payment.
- Database triggers and constraints stop overselling: a reserved ticket needs a live reservation, a sold ticket needs an order, and each ticket code maps to one order item.
- One pricing rule runs through four payment functions: a per-event service fee, free guestlist spots allocated first, and the fee waived when the total is zero.
- The prize wheel is decided on the server, with gender, age and location eligibility, a main-prize win chance, and guarded code claims that survive races.
- Ticket PDFs with barcode or QR render from the same React component used on screen, then get emailed after purchase.
- Three roles (user, partner, admin) are enforced with row-level security policies, not only in the UI.
- 30K+
- monthly active users across the events platforms I built for
- ~76K
- lines of code in the platform
- Live
- at 22night.com since 2024
reported by the clients
React app and Edge Functions
Architecture
How it fits together
Screens
A closer look
Tap a screenshot to enlarge it.
Features
Everything it does
Discovery
- Event feed — Filters by city, date and genre, search, a trending row and a day-grouped list.
- Event page — Lineup, genres, Leaflet venue map, share button and a sold-out waitlist.
- Deals — A lifestyle section with coupon codes members can claim.
- Languages — Dutch and English through i18next.
Tickets and checkout
- Free guestlists — Run through the same checkout, with a duplicate-signup check and guest sync to venue systems.
- Paid tickets — Several products per event, a max per person, a terms checkbox, card or iDEAL.
- Reservation timer — A 10-minute soft-lock, for both guest and logged-in buyers.
- My Tickets — Purchased and Spin & Win tickets in one list, with PDF download as barcode or QR.
- Ticket email — PDF tickets are sent after purchase through Brevo.
Spin & Win
- Server-side wheel — The prize is picked on the server using win chance and eligibility rules.
- Paid prizes — A paid prize holds its code for 10 minutes until payment completes.
- Plus-one invite — Winners get a link to bring a friend for free.
- Prize emails — Winners receive a prize email, with a reminder job for unclaimed ones.
Admin tools
- Events CRUD — Tabs for date, tickets, lineup and media, with trending order and venue and artist management.
- Stock and codes — Ticket code upload with live Uploaded, Reserved, Sold and Available counters.
- Orders — Resend, delete, CSV export and manual ticket assignment.
- Analytics — Date ranges, per-event views, and PDF and Excel export.
- People — Team permissions, user management, partners and impersonation.
Partners and accounts
- Partner dashboard — Partners sign up and see their events with per-event analytics.
- Partner payouts — A Stripe Connect transfer per paid ticket, set per event.
- Sign-in options — Email, phone OTP, Google and Apple, community token login and password reset.
- Background jobs — Scheduled functions for guestlists, community tickets, spin reminders and Brevo contact sync.
Tech stack
What it's built with, and why
Frontend
- React 18
- Single-page app for members, partners and admins (Create React App).
- Redux Toolkit
- Holds the signed-in user state.
- Tailwind, Chakra UI, Headless UI
- Styling and components across member and admin screens.
- TanStack Table
- Sortable, filterable admin tables for events and orders.
- Leaflet, Framer Motion, i18next
- Venue maps, animations and Dutch/English strings.
Backend
- Supabase Edge Functions (Deno)
- 50 function folders: reservations, payments, spin, tickets, admin, cron.
Data
- Postgres
- 36 migration files, row-level security, triggers and availability views.
- Supabase Auth and Storage
- Email, phone, Google and Apple login, plus file storage.
Payments & tickets
- Stripe
- PaymentElement and PaymentIntents for cards and iDEAL, Connect transfers to partners.
- jsPDF, html2canvas, pdf-lib, JsBarcode
- Render ticket PDFs from the on-screen React template.
Integrations
- Brevo
- Transactional ticket and prize emails, plus contact sync.
- Attendium and Fourvenues
- Guest sync to venue systems for guestlist events.
- PostHog
- Product analytics, next to my own page and click event tables.
Infra
- Vercel and Supabase cloud
- Hosts the web app and the backend.
