What I built
Built with one other developer. These are the modules I own, in the order a track uses them:
- Scheduling, bookings and check-in. The booking module on all three fronts (admin, public page and pilot), a two-step booking flow, bookings for more than one pilot at a time, recurring schedule slots with bulk generation from presets, blocked dates, and check-in by QR code behind a biometric gate.
- Pilots. Profile setup and management, the pilot code that identifies a pilot in the booking form and in the round links, public pilot pages with lap-time history, and the head-to-head comparison between two pilots.
- Championships, end to end. Creation and management, browsing and filters, enrolment that is either automatic or requires approval, community championships created by the pilots themselves, sessions instead of rounds, and a scoring module that is the single source of truth for points.
- Results and race control. Result entry that scores and finalises inside one transaction, the grid formed from qualifying, lap-by-lap entry, race-control flags, the TV wall, per-session attendance, and blocking a pilot.
- Karts, tracks and categories. CRUD for the three, maintenance logs and kart status, and maintenance intervals tracked in hours with an alert once a kart passes its own interval.
- Finance. The financial summary with charts, occupancy by day, period filters, and a CSV export of bookings.
- Security. TOTP MFA, an in-memory sliding-window rate limiter, an audit log, session timeout on protected procedures, row-level security across all 14 tables, upload type and size validation, and projections that keep personal data out of every public endpoint.
- Lap time import. Reading lap times out of a PDF or an image with AI extraction, a mapping step so the operator matches rows to pilots (guests included), a printable session sheet with a QR code, and a public results page for the session.
- The mobile app. Expo and React Native: the pilot screens, the kartodrome pages, the booking flow, a dark theme, push notifications, and the EAS workflow that builds the Android app.
- The WhatsApp agent. The booking agent on WhatsApp, built on the same booking procedure as the app, so the rules live in one place.
How it is put together
One Turborepo monorepo, because web and mobile are the same product on different surfaces and
the rules have to be written once. apps/web is the Next.js 15 App Router
application (admin dashboard, driver portal and landing page), apps/mobile is the
Expo Router app for iOS and Android, packages/api holds the tRPC routers with the
business logic, and packages/db holds the Prisma schema and client.
Technical decisions and trade-offs
- tRPC with Zod instead of a hand-written REST contract. Both clients call the same procedures and inherit their types, so web and mobile cannot drift apart. Trade-off: there is no public API surface, so a third party would need one built for it.
- Supabase for identity and Postgres, Prisma for the schema. One provider for auth and data, with the schema as code and migrations in the repository. Trade-off: the data layer leans on one vendor, and Prisma sits between the queries and the database.
- Biometric login on mobile, Google OAuth plus email on web. Staff at the desk open a browser; drivers open an app with a fingerprint. Same identity, two entry points.
- Playwright acceptance tests against a real Supabase instance instead of mocks. Trade-off: heavier and slower than unit tests, but they exercise the flows the way the track actually uses them.
- Docker Compose for the local stack (Supabase plus web), so the two of us ran the same environment instead of two similar ones.
- Time anchored in the kartodrome's timezone and computed on the server. Booking windows, what counts as "today", analytics ranges and cancellation deadlines all come from one helper instead of from the browser's clock. Trade-off: every date travels with a timezone through the API, which adds ceremony to code that would otherwise just read the local time.
Where it stands
The platform is deployed on Vercel with GitHub Actions and holds about 400 commits between the two of us. Live timing and results are the parts still on the roadmap; the rest of the operation runs on what was shipped.