CoreMVP

Run Locally

View as Markdown

After Quickstart, start local Supabase, refresh the app's connection settings, then run Vite.

Daily development

Start Supabase

bunx supabase start

Keep Docker running. This reuses the checkout's local database.

Sync the app

./coremvp env sync

Run from the repository root. The CLI derives local connection settings from the already-running Supabase instance and writes .

Start the app

bun run dev

Open http://localhost:3000. Source edits hot reload. Restart this process after changing environment settings.

Use ./coremvp env list to inspect redacted key presence. The terminal running bun run dev contains the web logs. The CLI does not start or stop the app.

Update a retained database

After pulling an update with new migrations, apply them without resetting your local data:

bunx supabase migration up --local
bunx supabase migration list --local

Continue when every checked-in migration matches its applied local version. Stop and inspect any mismatch or migration error. Do not reset retained data to install a feature.

Run the local build

bun run build

The script compiles the app and runs TypeScript checking. Nitro writes the server entry, traced dependencies and public assets under .output/.

Before sending email from the built app, set EMAIL_DELIVERY_MODE in ignored to test_capture with a private TEST_EMAIL_CAPTURE_TOKEN, or to real with RESEND_API_KEY and RESEND_FROM_EMAIL. The built app rejects mock when a send is attempted. Signed-in purchase confirmations are suppressed in mock and test_capture before send validation; guest capture requires its setup link and test run ID. Follow Email Delivery for the mode requirements.

Stop the development process so port 3000 is free, then start the Node output:

NODE_ENV=production node --env-file=.env.local .output/server/index.mjs

Open the local app and repeat your sign-in and page checks. Keep outside build artifacts. Vite embeds NEXT_PUBLIC_* settings at build time; changing a public setting requires another build. See the Start hosted deployment status for hosted deployment.

Check the application

Keep the app and Supabase running in their existing terminals, then choose the check for your change:

ChangeLocal command
Auth forms, cookies or admission./coremvp e2e auth
Organizations and permissions./coremvp e2e organizations
Projects and persistence./coremvp e2e projects
File validation and controlled Storage failuresbun test src/tests/storage.test.ts

The Auth testing guide explains the local browser boundary and OAuth limits. Storage also describes the separate checks needed for real Storage policies.

Billing needs the selected provider's configured test catalog or offers and an active listener. Complete the matching setup in Billing before running its checkout tests; the commands stay in that shared guide.

Stop or reset

Stop the app with Ctrl+C in its terminal. Stop local Supabase when you finish:

bunx supabase stop

When you intentionally want a clean local database, keep Supabase running and use:

bunx supabase db reset --local

Reset replaces local data and reapplies the checked-in migrations. Seeding is off, so it does not create sample records or a provider catalog. Follow the matching Billing setup to configure your offers.

If Supabase reports template database "template1" has a collation version mismatch, recreating local Supabase data is a destructive recovery. Preserve any data you need before running:

bunx supabase stop --no-backup
bunx supabase start

Then verify migrations and sync the local environment again before starting the app.

What's next

Was this page helpful?

On this page