Local Setup
Local Setup
Section titled “Local Setup”1. Worker API
Section titled “1. Worker API”cd workers/bookmarks/apiyarn installwrangler d1 create bookmarks# Paste returned database_id into wrangler.tomlApply all migrations in order:
wrangler d1 migrations apply bookmarks --localSeed local data:
wrangler d1 execute bookmarks --local --file=./seeds/seed.sqlwrangler dev2. Flutter App
Section titled “2. Flutter App”cd apps/bookmarks/appflutter pub getflutter run --dart-define=API_BASE_URL=http://127.0.0.1:8787If logo assets changed, regenerate native launcher icons:
cd apps/bookmarks/appdart run flutter_launcher_icons3. Astro Site
Section titled “3. Astro Site”cd apps/bookmarks/siteyarn installyarn devEnvironment references
Section titled “Environment references”- Flutter:
apps/bookmarks/app/.env.example - Astro:
apps/bookmarks/site/.env.example - Worker:
workers/bookmarks/api/.dev.vars.example
Keep local URLs aligned across app and worker so auth and API calls resolve consistently.
Local verification checklist
Section titled “Local verification checklist”GET /healthreturnsok: true- Login succeeds (
/v1/auth/loginor/v1/auth/dev-loginin dev mode) GET /v1/clubsreturns data for authenticated user- Creating a club succeeds and returns
clubId - Club websocket stream connects for a member
- Closing/reopening app resumes by reconnecting websocket stream