Rewrite of the Electric Servers TF2 panel (SvelteKit 2, Svelte 5, Tailwind 4).
Product and architecture specs live in docs/. Start there before adding features.
bun install
bun run devbun run build
bun run previewThe app runs on @sveltejs/adapter-node. Copy .env.example to .env and fill in real values first — SESSION_SECRET, STEAM_API_KEY, STEAM_REALM, STEAM_RETURN_URL, and one SOURCE_*_URL per MySQL source you'll add from /admin/sources.
docker compose up --build -dThis builds the image, starts the app on port 3000, and persists the panel SQLite file in a named volume mounted at /app/data (PANEL_DB_URL=file:./data/panel.db), so it survives container recreation. Game data (MySQL) is never in this volume — it's connected to from the DSNs your .env supplies.
Your local data/panel.db is not uploaded with the image. A new deploy starts with an empty panel DB (no owners, no sources, default site settings).
- Mount a persistent volume at
/app/dataand keepPANEL_DB_URL=file:./data/panel.dbso users/sources survive redeploys. - Set
OWNER_STEAM_IDto your Steam64. Log in once; that account becomesowner. - Set each source's MySQL URL env vars (
SOURCE_*_URL), then recreate sources from/admin/sources(thedsnEnvpointer only, never the DSN itself in SQLite). - Point
STEAM_REALM/STEAM_RETURN_URLat the public Railway URL.
If mgemod_stats.name (or duel map/arena strings) were written through a non-utf8mb4 MySQL connection, dry-run then apply:
bun run db:fix-mojibake
bun run db:fix-mojibake -- --applyRequires PANEL_DB_URL plus each source's SOURCE_*_URL, or pass --dsn-env SOURCE_ELECTRIC_AR_URL explicitly. See docs/modules/mge.md.