Theme
Seed data
A fresh tenant has empty tables. The seed service in backend/seed/api.ts ships two endpoints that populate everything you need to walk through the product end-to-end.
| Endpoint | What it creates |
|---|---|
POST /seed/admin | A single verified admin user, using AdminEmail / AdminPassword from local secrets. |
POST /seed/fleet-south-korea | 20 drivers, 20 trucks and an active route board across 10 Korean cities. |
Internal-only
Both endpoints are declared { expose: false }. They are not reachable from the public gateway — only from the Encore dev dashboard or encore call. This prevents anyone from triggering them in production.
Running the seeds
Option 1 — Encore dev dashboard
While encore run is up:
- Open http://localhost:9400.
- Pick the seed service from the service graph.
- Find
seedAdmin(orseedFleetSouthKorea) in the API explorer. - Click Call with an empty body.
Option 2 — encore call
From any terminal with the backend running:
bash
# Create the admin
encore call seed.seedAdmin --raw
# Populate 20 drivers, 20 trucks and a route board
encore call seed.seedFleetSouthKorea --rawYou should see JSON responses indicating which records were created.
What the fleet seed creates
- Drivers —
Minjun Kim,Seojoon Yoon, … 20 names total. Emails followseed.kr.driver.NN@n2e.local, license numbersKR-SEED-LIC-NN. - Trucks —
KR-SEED-TRK-01throughKR-SEED-TRK-20, mixed Hyundai / Kia / Volvo / MAN / Scania / Xcient models, VINKRSEEDVIN1000NN. - Routes — a board of active and scheduled routes between Seoul, Busan, Incheon, Daegu, Daejeon, Gwangju, Suwon, Ulsan, Changwon and Jeonju.
- Telemetry — minimal initial readings so the AI risk dashboard isn't empty.
After running both seeds, the Dashboard, Drivers, Truck Management, and Dispatch pages all light up with realistic data.
Resetting
The fleet seed is idempotent — it cleans up its own previous data (anything matching seed.kr.driver.% or the KR-SEED-TRK- prefix) before reinserting. You can run it as often as you like.
To wipe everything and start over:
bash
# From backend/
encore db reset auth driver truck dispatch telemetry_store
encore run
encore call seed.seedAdmin --raw
encore call seed.seedFleetSouthKorea --rawSeeded driver password
Every seeded driver gets the password SeedDriver!2026. This is hard-coded in seed/api.ts and is intentional — you can sign in as any seeded driver to test the driver-facing flows.
Do not run in production
Never call these endpoints against a production environment. They wipe and re-insert specific rows. The expose: false flag protects the public gateway, but encore call against a production environment will still execute them.