Turnpike/frontend
2026-03-04 23:10:00 -06:00
..
.vscode Created Turnpike, event attendee and volunteer management 2026-03-03 18:07:38 -06:00
public Created Turnpike, event attendee and volunteer management 2026-03-03 18:07:38 -06:00
src Added browser-supported timezone lookup. 2026-03-04 23:10:00 -06:00
.gitignore Added build ID to footer. Added check for client-server mismatch. 2026-03-03 18:09:22 -06:00
index.html Created Turnpike, event attendee and volunteer management 2026-03-03 18:07:38 -06:00
jsconfig.json Created Turnpike, event attendee and volunteer management 2026-03-03 18:07:38 -06:00
package-lock.json Added Lucide icons 2026-03-03 18:09:28 -06:00
package.json Added Lucide icons 2026-03-03 18:09:28 -06:00
README.md Updated boilerplate frontend/README.md 2026-03-03 18:07:52 -06:00
svelte.config.js Created Turnpike, event attendee and volunteer management 2026-03-03 18:07:38 -06:00
vite.config.js Added build ID to footer. Added check for client-server mismatch. 2026-03-03 18:09:22 -06:00

Turnpike Frontend

Svelte 5 + Vite PWA. Offline-first with Dexie (IndexedDB) and background sync.

Development

From the repo root with direnv allow (or Node.js 18+ installed):

cd frontend
npm install
npm run dev

Runs on :5173, proxies /api to the Go backend on :8180.

Build

npm run build

Output goes to dist/, which the Go binary embeds at compile time.

Architecture

  • src/db.js — Dexie schema, session management
  • src/api.js — all API calls, injects Authorization: Bearer header
  • src/sync.js — sync pull, SSE stream, outbox flush
  • src/pages/ — page components (one per route)
  • src/components/ — shared UI components
  • src/app.css — global CSS custom properties (colors, spacing, type scale)

All UI reads come from Dexie via liveQuery(), not direct API calls. Styles are scoped per component; no hardcoded color values.