Arkhins - Emblem

projects2026 · Full-stack · Live · v0.70

Spartan

Open-Source Motorsport Management

Spartan is a free platform for motorsport clubs: race teams with entry lists and licences, championships with rounds, sessions and standings, circuits with reservations and payments, signup events for track days and marshals, and gear with a ledger. One codebase, governed by written architecture decisions and a CI that refuses to ship a regression.

Spartan, cover
Role
Architecture, full-stack, docs
Stack
Next.js 16 · React 19 · MUI v7 · Prisma 7 · Neon
Toolchain
Bun · Vitest · GitHub Actions · Vercel
Licence
Apache-2.0 code · CC BY 4.0 docs

  • Entry lists
  • Race weekends
  • Sessions
  • Standings
  • Marshal signup
  • Circuits
  • Reservations
  • Stripe Connect
  • Gear ledger
  • Messaging
  • ADR-governed
  • Apache-2.0
97
Prisma models
58
Migrations, deployed on build
213
Vitest suites
11
GitHub Actions workflows

01 · Overview

Paddock operations, as software.

A club season runs on entry lists, licence numbers, emergency contacts, session timetables, marshal rosters and who has paid. Most of it lives in spreadsheets, group chats and email chains. Spartan replaces those with one source of truth that a team administrator, a championship secretary and a circuit operator can all sign into.

Four kinds of organisation share the platform. Race teams keep rosters and respond to rounds. Championships own divisions, rounds with practice, qualifying and race sessions, entry confirmation, standings, documents, gear and messaging. Circuit operators manage venues, surfaces, operating hours, schedule blocks, reservations and card payments. Anyone can host a signup event with role-limited slots for drivers, marshals, scrutineers and officials.

The engineering is as deliberate as the product: every mutation is a Server Action behind Zod, every decision that shaped the architecture is a numbered record in the repository, and the release pipeline runs quality gates, smoke tests, deployment validation and uptime checks on a schedule.

Entry lists
Drivers and crew with licence numbers, contacts and emergency details; email invitations with unique signup links.
Race weekends
Rounds with practice, qualifying and race sessions, circuit and scrutineering details, and Going / Not going / Maybe from every entrant.
Marshal signup
Signup events with per-slot capacities that are never oversold, priority windows for members, FIFO waitlists with claim windows.
Gear ledger
Pooled and tagged inventory, team requests, allocations, custody handoffs and an immutable activity ledger with an email outbox.
Circuits
Venues with surfaces, operating hours, schedule blocks, reservations, lesson offerings and Stripe Connect payments.
Decision records
Twelve ADRs, linted and integrity-checked in CI, from Server Actions as the mutation surface to motorsport-only scope.

02 · Decisions

Written down before built.

ADRDecisionWhy
0001Record decisions as versioned markdown in gitReviewable, diffable, linted
0002Server Actions as the primary mutation surfaceOne validated path for every write
0003PostgreSQL only through Prisma on Neon serverlessNo raw SQL; checked in CI
0004MUI as the primary component libraryAccessible, themeable, dense
0005Bun as the development and CI toolchainFast installs, one runtime
0006League gear as ledger projections with an outboxAuditable custody, durable email
0007Canonical venue reservations for occupancyOne truth for who holds a surface
0009Delegate authority through scoped role grantsChief marshals without super admins
0010Object storage through a provider seamS3 or Vercel Blob, signed reads
0011Race weekends as rounds with sessions and open volunteer signupThe motorsport shape of a weekend
0012Motorsport-only platformOne domain, done properly

03 · Under the hood

Three flows that carry a weekend.

A round from creation to confirmed grid, a signup event from slots to waitlist, and the gear ledger that knows where every helmet is.

RoundFrom a date to a confirmed gridshow
  1. 01Create the round. Circuit, paddock and scrutineering details, then sessions: practice, qualifying, race, each with its own time and notes.
  2. 02Invite the entry list. Every team member on the round's entry list is emailed; a Going, Not going or Maybe lands instantly on the admin's summary.
  3. 03Accept the waiver. Round waivers are versioned; an acceptance is recorded per entrant before the weekend.
  4. 04Open marshal signup. Volunteer needs with capacities and credentials; assignments and reminders go out on a cron.
  5. 05Enter results. Race results per session feed the championship standings and the day sheet.

Pieces

  • RaceRound · RaceSession
  • RaceEntry · RaceResult
  • RoundWaiver · Acceptance
  • VolunteerNeed · Assignment
  • RSVP · Invitation
  • /api/cron/rsvp-reminders
  • day-sheet
Signup eventsA SignUpGenius that cannot oversellshow
  1. 01Define slots. Thirty drivers, forty marshals, four scrutineers, eight officials: per-slot capacities enforced under concurrent registration.
  2. 02Choose visibility. Private, invite-only by email, link-only with a regenerable unguessable link, or public with rollup onto circuit and association pages.
  3. 03Run priority windows. Members register first; when a phase opens to the public, the waitlist makes FIFO offers with time-boxed claim windows and a cron backstop.
  4. 04Take payment. Venmo, Zelle, cash instructions with paid, unpaid and waived tracking, or online cards through Stripe Connect with refunds.
  5. 05Form the day. Grid and marshal-post formation from signups with reserves, session rotations, posted entry lists and a participants-only media gallery.

Pieces

  • SignupEvent · SignupSlot
  • EventRegistrationPhase
  • EventInvitation · EventManager
  • EventGame · Participant
  • EventMediaItem
  • Stripe Connect
  • /api/cron/event-waitlist
Gear ledgerWhere every item is, and wasshow
  1. 01Catalogue and stock. Pooled stock per storage location and tagged units with their own identity.
  2. 02Request and allocate. Teams raise needs; administrators approve and allocate from pool or unit, each as a command with a projection.
  3. 03Hand over. Custody handoffs record who holds what, including partial returns.
  4. 04Pledge in kind. A public wishlist takes pledges without money, photos or QR codes; receipts land in inventory.
  5. 05Notify durably. Every gear email goes through an outbox with retry and reminder sweeps.

Pieces

  • GearCatalogItem · GearUnit
  • GearPoolStock · StorageLocation
  • TeamGearNeed · Command
  • GearAllocation · Handoff
  • GearWishlist · Pledge
  • GearActivity ledger
  • NotificationOutbox

04 · Key screens

From the landing page to the day sheet.

The front door

A marketing site in the same build: the problem, the four kinds of organisation, how it works in three steps, and a free signup. Pricing is honest: the core is free and provider-portable by decision.

  • Features, pricing, security and docs pages
  • MDX documentation with guides and an API reference
  • Umami analytics, no advertising

A championship dashboard

Divisions, teams, upcoming rounds, open invitations and messages for one championship, with role-scoped navigation for administrators, team administrators and members.

  • LeagueUser roles per championship
  • Scoped role grants for chief marshals and coordinators
  • Public association page with schedule feed

A race round

Sessions in order, the circuit, waiver status, the entry list with each entrant's response, volunteer needs and the day sheet.

  • Practice, qualifying, race sessions
  • Entry confirmation summary
  • Marshal assignments and reminders

Standings

Derived from race results per session, per division. Age-gated where a championship configures it, so junior classes publish participation without a points table.

  • Results feed standings
  • Per-division tables
  • STATS_MIN_AGE_LEVEL gate

The calendar

A grid on a desktop and a list on a phone, across every team and championship a member belongs to, with an ICS feed for the association.

  • Responsive grid and list
  • ICS export per association
  • Sessions, practices and signup events together

Platform admin

User moderation with an approval kill-switch, and an audit log of every write across the platform.

  • approved as a suspension switch
  • AuditLog per mutation
  • Rate-limit buckets per action

05 · Pit wall

Built for the paddock.

Dashboard on a phone
A round on a phone
Calendar on a phone
Standings on a phone
Landing on a phone

06 · Engineering

What keeps it honest.

Quality gates

  • Type-check, lint and Vitest on every push
  • A raw-SQL check that fails the build on a bypass of Prisma
  • ADR lint, integrity and review-date checks
  • Smoke tests and deployment validation after a release
  • Weekly uptime monitoring and version checks

Security

  • Zod on every form and action input
  • bcrypt at cost 12; JWT sessions in HTTP-only cookies
  • Rate-limit buckets on sign-in and sensitive actions
  • Email verification and an approval kill-switch
  • Signed, expiring reads from private object storage

Stack

  • Next.js 16
  • React 19
  • TypeScript
  • MUI v7 · Emotion
  • Tailwind v4 (marketing)
  • Prisma 7
  • Neon Postgres
  • Auth.js v5
  • Zod
  • Bun
  • Vitest
  • Sentry
  • Stripe Connect
  • AWS SES · Brevo · Mailchimp
  • S3 · Vercel Blob
  • dnd-kit
  • date-fns
  • MDX
  • Umami

Operations

  • Migrations deploy during the Vercel build
  • Provider seams for email and storage
  • Five cron routes for reminders, waitlists, gear and batches
  • Release workflow tags and publishes from main
  • Docs site under /docs from MDX

07 · More screens

The rest of the paddock.

Open any screen to see it full size.

Features
Pricing
Public signup events
Documentation
Security
Member dashboard
Events
Team roster
Rounds
Teams in a championship
Workforce and volunteers
Gear inventory
Championship messaging
Championship settings
Venues
Signup events
Account and data export
Sign in