Getting Started
Install the standalone Next.js template and run it locally with Supabase.
Run the template locally
Use this path first. By the end, you will have:
- Next.js app running on
localhost:3000 - Local Supabase on
localhost:54321
Configure your billing provider after the app runs locally: use Stripe, the default, or Polar.
Prerequisites
Before starting, ensure you have:
- Node.js 22.23.4+ on 22.x or 24.22.1+ on 24.x for the current Supabase client and local tooling
- Bun for dependency installation, the local app, and project CLIs
- Docker for local Supabase
- Stripe CLI for Stripe billing, or Polar CLI for Polar billing
- Git for version control
For Vercel deployment, use its supported 22.x or 24.x runtime; Vercel manages minor and patch updates.
Local setup
Clone and Install
git clone <your-repo-url>
cd your-project
bun installStart Supabase
If another local app or Supabase project is already running, use Run another project as your complete local setup path instead of the remaining setup steps below. After your app runs at its selected origin, continue with Next Steps.
bunx supabase startThis starts PostgreSQL, Auth, and other Supabase services locally.
Do not run supabase init; this template already includes the Supabase config,
migrations, and local auth settings.
Verify Local Migrations
bunx supabase migration list --localEvery checked-in migration should have matching local and remote versions
in the table or JSON output. With --local, remote versions are those applied
to your local database. Healthy local services alone do not confirm the
application schema is ready.
If only applied versions are missing on this new empty local database:
bunx supabase db reset --localReset replaces local database data. Do not run it with data you need to keep. Check the migration list again and stop on an error or missing version before starting the app.
Continue only when all local and applied versions match. For any other mismatch or a command error, stop and inspect the migration history; do not reset merely to make the check pass.
Configure Environment
./coremvp env syncThe template CLI creates .env.local, reads local Supabase status, and writes
the local runtime values.
Start Development
bun run devVisit http://localhost:3000 to see your app.
./coremvp env sync expects local Supabase to already be running. The app
itself runs with bun run dev.
Troubleshooting
If local Supabase fails with
template database "template1" has a collation version mismatch, recreate the
local Supabase data volume:
bunx supabase stop --no-backup
bunx supabase startThis deletes local Supabase data for this template checkout.
Next Steps
Project Structure
Understand the codebase
Configuration
Environment variables
Payments
Choose Stripe or Polar and test billing
Was this page helpful?