apps/web)Your hosted Supabase project still holds:
The Supabase CLI can download that schema into this repo as SQL migrations:
cd /path/to/podzooka-boom
# 1) Log in (opens browser) — one-time per machine
npx supabase login
# 2) Link this folder to your cloud project
# Project ref: Dashboard → Project Settings → General → "Reference ID"
# (also visible in the project URL: https://supabase.com/dashboard/project/<ref>)
npx supabase link --project-ref YOUR_PROJECT_REF
# If prompted, use the database password from: Project Settings → Database
# 3) Pull the live schema into a new migration file under supabase/migrations/
npm run db:pull
# (same as: npx supabase db pull remote_schema)
After db pull, open supabase/migrations/*_remote_schema.sql — that file is your recovered database definition you can commit, review, and reuse (e.g. to bootstrap another environment with supabase db push on a fresh project, or as documentation).
npx supabase gen types typescript --linked > packages/shared/src/database.types.ts
(Adjust the output path to match how you want to consume types.)
Deleting apps/web removed Next.js source: app/, app/api/**, server components, etc. That code was never stored inside Supabase—only your data and DB schema live there.
To get API/UI code back you need one of:
git log, git checkout an old commit, or a fork/backup)What you still have in this repo as a partial stand-in for /api/* when the web app is gone:
scripts/dev-api-stub.mjs — implements many /api/... routes against Supabase for local mobile dev.| Goal | Command / action |
|---|---|
| Link repo → cloud project | npx supabase link --project-ref <ref> |
| Dump remote schema to SQL | npx supabase db pull <migration_name> |
| Types from linked project | npx supabase gen types typescript --linked |
| Local Postgres + migrations | npx supabase start (Docker required) |
db pull fails: “migration history does not match”Your remote DB was migrated with SQL files that are not in this workspace (e.g. after removing apps/web). Until those files are restored, use a schema dump instead of pull:
npm run db:dump
Writes supabase/schema.remote.sql from the linked project (requires npm run db:link first).
Optional: supabase migration repair ... can reconcile history on the server—only use if you know what you’re doing.
supabase/config.toml — local Supabase CLI config (from supabase init)supabase/migrations/ — see supabase/migrations/README.mdsupabase/schema.remote.sql — optional; regenerate with npm run db:dumpDo not commit database passwords or service role keys; keep those in .env / CI secrets only.
Note: Linking with the CLI does not change Expo or apps/mobile/.env.local. The app still needs correct EXPO_PUBLIC_* vars and a running /api server (see docs/MOBILE_SUPABASE_CONNECT.md).