Skip to content
← Back to portfolio

Project case study · Web system

Lil Tickets

A self-serve event-ticketing SaaS built end to end on Cloudflare, covering the marketing site, QR-code check-in, and Stripe Connect payouts.

Next.jsTypeScriptCloudflare WorkersCloudflare D1Cloudflare KVDrizzle ORMHonotRPCLuciaGoogle OAuthStripe ConnectReact EmailResendjsPDF
Lil Tickets

The idea

Lil Tickets was a self-serve event-ticketing platform I built solo in about a month, during May and June 2024. Organizers could create events, sell tickets, and manage check-in without a spreadsheet or legacy vendor. I later shelved the project, but it records a complete Cloudflare-native product build from the frontend through fulfillment.

The build

The Next.js 14 frontend deploys to Cloudflare Pages through @cloudflare/next-on-pages and talks to a Hono API Worker. The API combines tRPC with REST endpoints. Lucia manages sessions and Google OAuth, Stripe Connect handles payments, D1 with Drizzle ORM stores application data, and KV stores OTPs. Separate tasks and pdfboy Workers handle asynchronous fulfillment and PDF rendering.

Key features

  • QR-code ticketing: Tickets are rendered as QR codes and validated with a browser camera scanner built on ZXing and tRPC.
  • PDF tickets: A standalone pdfboy Cloudflare Worker generated downloadable ticket PDFs with jsPDF and embedded QR codes.
  • Transactional email: Three React Email templates cover magic-link login, ticket assignment, and ticket-order confirmation. Resend provides the sending layer.
  • Background jobs: A cron and queue Worker ran one fulfillment job. enqueuePaidOrders queued fulfillOrder, which minted tickets and triggered one order-confirmation email.

Architecture

Lil Tickets architecture: a Bun monorepo of four Cloudflare Workers. It includes a Next-on-Pages frontend with a ZXing QR scanner, a Hono API Worker (tRPC + REST), a cron/queue tasks Worker, and a pdfboy PDF Worker over D1, Workers KV, and Stripe Connect.
A four-Worker Cloudflare topology on a Bun monorepo, with Stripe Connect payouts.

The product was split across four independently deployable Cloudflare Workers, keeping the frontend, API, asynchronous fulfillment, and PDF rendering isolated.

Frontend Worker: Next.js 14, deployed to Cloudflare Pages through @cloudflare/next-on-pages.

API Worker: Hono exposes REST endpoints and tRPC, with Lucia sessions and Google OAuth. Stripe Connect handles payments. Cloudflare D1 through Drizzle ORM stores application data, while Cloudflare KV stores OTPs.

Tasks Worker: A cron and queue Worker runs enqueuePaidOrders, queues fulfillOrder to mint tickets, and sends one order-confirmation email per fulfilled order.

PDF Worker: The standalone pdfboy Worker uses jsPDF and QR-code generation to render ticket PDFs.

Email: Resend sends the React Email templates for transactional messages.

Have a project in mind?

Tell me what you're working on and where you need help.