Resources

How Spartan Comp was built

A SvelteKit app on Google Cloud Run, a Supabase database, sign-in through the Spartans Hub, The Blue Alliance for official data, and separate workers that read match video. This page lists the pieces, shows how they connect, and explains how the app was put together.

How the pieces connect

Phones and laptopsscouts, analysts, drive teamsigned-in requestsSpartan CompSvelteKit on Cloud Runpages and /apiSupabasePostgres · Auth · StorageRealtimeSpartans Hubaccounts and rolesThe Blue Allianceschedule, teams, scoresVision workersArgon · DGX Spark · claim runs, post results
Browsers only talk to Spartan Comp. The app signs people in through the Spartans Hub, stores everything in Supabase, and fetches official data from The Blue Alliance. Vision workers run elsewhere and pick up queued runs through the app.

The stack

01Front end

  • Svelte 5 and SvelteKit 2Pages, components and server routes in one app
  • Vite 6Dev server with hot reload, and the production build
  • lucide-svelteIcons
  • svelte-dnd-actionDrag to reorder the Picklist
  • three.js and RapierThe 3D field for vision autos, loaded only when opened

02Server and hosting

  • SvelteKit server routesThe API under /api, called with the signed-in user's token
  • adapter-node in DockerA Node 22 image, pinned by digest
  • Google Cloud RunBuilt and deployed by Cloud Build on every push to main
  • Secret ManagerKeys reach the server at runtime, never the repo

03Data and accounts

  • Supabase PostgresEvery report, run and setting, with row-level security
  • Supabase Auth via the Spartans HubPeople sign in with their Spartans Hub account
  • Supabase StoragePit photos and vision clips
  • Supabase RealtimeWakes vision workers when a run is queued

04Outside services

  • The Blue Alliance APISchedules, teams, rankings and official scores
  • Slack Web APIPit problems and approvals in the team Slack
  • GeminiRobot detection and actions on the Argon vision worker

05Vision

  • Python workersArgon, and the team-run DGX Spark reached only over Tailscale
  • OpenCV ball trackerBall counting with no AI model
  • Field calibrationCarpet landmarks map camera pixels to field metres
  • TBA-linked match videoThe only footage vision reads

06Checks

  • VitestAbout 1,800 tests, run by hand before every PR
  • svelte-check and ESLintTypes and lint, with warnings treated as errors

A report's trip, start to finish

Venue Wi-Fi is unreliable, so a report is saved on the phone first and sent when it can be. Once it is in the database, every analysis page sees it on its next refresh.

  1. 1Scout fills the formOn a phone in the stands
  2. 2Saved on the phoneKept while offline
  3. 3Sent to /apiWhen the phone is back online
  4. 4StoredAs the signed-in user, in Postgres
  5. 5Read by analysisTeam View, EPA, Strategy, Picklist

How it was built

Spartan Comp started in October 2026 as a standalone scouting app and grew through four major versions and about 300 releases, every one listed in VERSION.md. It builds on the Spartans Hub for accounts, the database and its look; the 3D field comes from the frc-game project.

  1. V1
    Standalone scouting app3 Oct 2026

    Its own Supabase schema and the first match and pit forms.

  2. V2
    On the Spartans Hub6 Oct 2026

    Moved onto the Hub database: Hub people sign in with their Hub account.

  3. V3
    Scout roles14 Oct 2026

    Match scouting split into Data, Performance and Robot tabs, each with its own role.

  4. V4
    Phone screens22 Oct 2026

    Separate phone screens, a new app shell, then vision, EPA, Strategy and this site.

See it in use

The Project tab walks through each part of the app, starting with a real match's autos read by vision.

Open Project