Skip to content

Add reusable local Supabase dev stack - #31

Merged
bastislack merged 5 commits into
devfrom
local-db
Jul 15, 2026
Merged

Add reusable local Supabase dev stack#31
bastislack merged 5 commits into
devfrom
local-db

Conversation

@bastislack

@bastislack bastislack commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Use this to have a local DB:

supabase start
supabase db reset
flutter run -d web-server --web-port= 8080 --dart-define=USE_LOCAL_SUPABASE=true

Use admin@local.test (or dev@local.test) / password123 to login.

Provider-agnostic local DB harness so any branch can develop and test
against a local `supabase start` instance instead of prod:

- supabase/config.toml: local stack config (Podman-friendly; analytics
  disabled since its vector shipper can't bind-mount the Docker socket)
- supabase/migrations/: baseline migration (consolidated schema.sql) as the
  CLI source of truth for deterministic `supabase db reset`. Local-only -
  never pushed to prod, which already has this schema
- supabase/seed_users.sql: two throwaway login accounts (dev + admin,
  password123) with auto-created profiles
- SupabaseConfig: USE_LOCAL_SUPABASE dart-define switches local vs prod
  (defaults to prod, same URL/anon key as before)
- .vscode/launch.json: web-server port-8080 launch configs
- docs/DEV_SETUP.md: local stack walkthrough
- .gitignore: ignore CLI runtime artifacts

Seed trick catalog loads from import_tricks2.sql via config.toml. Auth-
provider-specific config stays on feature branches.
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for lively-torte-533cc3 ready!

Name Link
🔨 Latest commit 0effc77
🔍 Latest deploy log https://app.netlify.com/projects/lively-torte-533cc3/deploys/6a578318e0ed7600082e8f63
😎 Deploy Preview https://deploy-preview-31--lively-torte-533cc3.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.

@bastislack
bastislack requested a review from Jmangles July 8, 2026 15:59
Removed comments about auth-provider-specific settings and CLI regeneration.
@Jmangles

Copy link
Copy Markdown
Owner

On the local test db migration sql there's no trick delete permission, shouldn't really matter though. You can just do:

grant insert, update, delete on tricks to authenticated;

Around line 230

@bastislack

Copy link
Copy Markdown
Collaborator Author

I learned about declarative schemas and thought this would be a nice concept for us to use, so I changed this PR accordingly. Hope this is fine :)

@bastislack
bastislack merged commit 7872445 into dev Jul 15, 2026
4 checks passed
@bastislack
bastislack deleted the local-db branch July 16, 2026 13:31
Jmangles pushed a commit that referenced this pull request Jul 16, 2026
* Add reusable local Supabase dev stack (#31)

Use declarative schemas for future migrations

* chore: Remove delete grant (#32)

* fix: Mirror actual prod state of tricks in local db (#35)

* feat: Port consistency slider from old Highline Freestyle app (#28)

* feat: Port consistency slider from old Highline Freestyle app

* fix: Make sure first and last label in consistency slider have enough padding from the edges of the screen

* fix: Use declarative schema

* chore: Add delete-trick grant (#34)

* Allow users to provide feedback (#29)

* feat (Draft): Allow users to provide feedback

* feat: Allow users to provide feedback

* Quick user switch in local-db mode

* Add multiple attachments + download them

* chore: Remove stale draft feedback SQL superseded by migration

* fix: hide feedback icon when logged out (#36)

* feat: Long press trick-card to change consistency (#37)
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.

2 participants