Skip to content

KSN: run the dev server against local or production Supabase - #45

Merged
codebend3r merged 4 commits into
mainfrom
local-dev-server
Nov 8, 2026
Merged

codebend3r merged 4 commits into
mainfrom
local-dev-server

Conversation

@codebend3r

Copy link
Copy Markdown
Owner
  • bun run dev:local: starts local Supabase in Docker, copies production public + auth data into it, serves the app against 127.0.0.1:54321
  • bun run dev:local -- --keep: reuse local data, skip the copy
  • bun run dev:production: serves against production, imports nothing
  • resolveSupabaseTarget uses EXPO_PUBLIC_SUPABASE_* only when both are set, else production
  • build:web now passes --clear so Metro cannot inline a cached local URL into a production export
  • copy needs SUPABASE_DB_URL in scripts/.env.local (gitignored)
  • new dev-server skill documents setup and troubleshooting

- add `resolveSupabaseTarget`, override only when URL and key are both set
- fall back to `PRODUCTION_SUPABASE_URL` and key otherwise
- test production fallback, half-set and empty overrides
- `supabase init` with `project_id = "kasane"`
- gitignore `supabase/.snapshots` for copied production data
- `scripts/dev.sh local` starts Docker and `supabase start`
- copy production `public` and `auth` data into local via `SUPABASE_DB_URL`
- load after `db reset` in one transaction; `--keep` skips the copy
- `production` runs `expo start` with the overrides unset
- pass `--clear` when the target changes; `build:web` always clears
- document `local` vs `production`, setup of `scripts/.env.local`
- cover Metro cache inlining, troubleshooting, and register in `CLAUDE.md`
@netlify

netlify Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kasane-guide ready!

Name Link
🔨 Latest commit 4d82c24
🔍 Latest deploy log https://app.netlify.com/projects/kasane-guide/deploys/6aef55bbecf0861fc2d74182
😎 Deploy Preview https://deploy-preview-45--kasane-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codebend3r
codebend3r merged commit 5a870f0 into main Nov 8, 2026
8 checks passed
@codebend3r
codebend3r deleted the local-dev-server branch November 8, 2026 13:42
codebend3r added a commit that referenced this pull request Nov 8, 2026
- Set `package.json` and `app.json` to 1.3.5
- Add the 1.3.5 entry to `CHANGELOG.md`
- Patch: dev server against local or production Supabase (#45), catalog-aware search, infinite home grid, MangaDex proxy and cache (#46)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant