Local Setup
Local Setup
Section titled “Local Setup”1. Worker API
Section titled “1. Worker API”cd workers/bookmarks-api-workeryarn 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:87873. 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-worker/.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