Skip to main content

Setting Up Your First Event

End-to-end walkthrough: from an empty account to a seeded race weekend with one car, three sessions, and a working run sheet.

This tutorial assumes you already have the local stack running. See Local Development if not.

0. The easy mode

If you just want to see a fully-set-up event, run:

make seed

You'll get the Sebring 12 Hours event, one car, three sessions (FP1, Qual, Race), 5 laps with full timing data, weather rows, tyre sets, and a populated board. Log in with demo@race.local / demo / demo-racing and you're done.

The rest of this tutorial is for setting up an event from scratch.

1. Create a Championship

Currently a manual API call (the admin screen is roadmap):

TOKEN=$(curl -s -X POST http://localhost:6161/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"demo@race.local","password":"demo","accountSlug":"demo-racing"}' \
| jq -r .token)

curl -X POST http://localhost:6161/championships \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"2026 IMSA SportsCar","season":"2026","series":"IMSA"}'

2. Create the Track

curl -X POST http://localhost:6161/tracks \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"Road America","country":"US","lengthKm":6.515,"cornerCount":14}'

Or use the in-app Admin → Tracks screen.

3. Create the Event

curl -X POST http://localhost:6161/events \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"championshipId":"<from step 1>",
"trackId":"<from step 2>",
"name":"Road America 2026",
"startDate":"2026-08-08",
"endDate":"2026-08-09"
}'

4. Create Sessions

for S in '{"name":"FP1","type":"practice"}' \
'{"name":"Q1","type":"qualifying"}' \
'{"name":"Race","type":"race"}'; do
curl -X POST http://localhost:6161/sessions \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d "$(echo $S | jq --arg eid "<event id>" '. + {eventId: $eid, startsAt: "2026-08-08T14:00:00Z", endsAt: "2026-08-08T15:00:00Z"}')"
done

5. Add the Car

curl -X POST http://localhost:6161/cars \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"eventId":"<event id>",
"number":"57",
"name":"Heart of Racing #57",
"class":"GTD",
"liveryColor":"#FF6B00"
}'

Or use Admin → Cars in the app.

6. Pick the context

Open http://localhost:6166. In the context strip at the top of the shell, pick your Championship → Event → Session → Car in the cascading dropdowns. The status strip flips to CONTEXT SET.

7. Open the Run Sheet

Click the Event ribbon tab → Run Sheets sub-toolbar action. You'll land on the new (empty) run sheet for your session × car.

8. Add a few laps

Click + Add lap in the Main tab. Type the lap time as "1:32.345" and the editor parses it. Add a few more.

Watch the Overview tab summary update as you go.

9. Add weather

Switch the ribbon to Event → Weather. Click + Add row and log the air temp, track temp, wind, condition.

10. You're done

You now have a working event with a car, three sessions, a populated run sheet, and weather data. Next: