| .. | ||
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| index.html | ||
| jsconfig.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| svelte.config.js | ||
| vite.config.js | ||
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 managementsrc/api.js— all API calls, injectsAuthorization: Bearerheadersrc/sync.js— sync pull, SSE stream, outbox flushsrc/pages/— page components (one per route)src/components/— shared UI componentssrc/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.