Run through this before starting your first Bolt or after cloning the repo on a new machine. Each section must pass before you move to the next.
- .NET 8 SDK installed:
dotnet --version→ must be 8.x - Restore packages:
dotnet restore src/backend/CabinConnect.sln -
appsettings.Development.jsonexists atsrc/backend/CabinConnect.Api/and is not committed (check.gitignore) -
appsettings.Development.jsoncontains:ConnectionStrings.Default— Supabase Postgres connection string (get from project owner ornpx supabase statusif running locally)Supabase.Url— e.g.https://<project>.supabase.coSupabase.AnonKeyandSupabase.ServiceRoleKey
- API starts cleanly:
dotnet run --project src/backend/CabinConnect.Api→ watch for DB connectivity log on startup - API is reachable at
http://localhost:5283/health(or the port inlaunchSettings.json— confirm before setting frontend env vars)
- Node 20+ installed:
node --version→ must be 20.x or higher -
.env.localexists atsrc/frontend/and is not committed -
.env.localcontains:VITE_API_BASE_URL=http://localhost:5283 ← match the API port in launchSettings.json VITE_SUPABASE_URL=https://<project>.supabase.co VITE_SUPABASE_ANON_KEY=<anon key>Common mistake: defaulting
VITE_API_BASE_URLtohttps://localhost:5001(the default ASP.NET dev-cert port). Always checklaunchSettings.jsonfor the actual port. - Install packages:
cd src/frontend && npm install— verify packages appear innode_modules/and are listed inpackage.json - Dev server starts:
npm run dev→ no import resolution errors - If you see a stale import error after a dependency change:
rm -rf node_modules/.vite && npm run dev
| Mode | When to use | How to start |
|---|---|---|
| Cloud (shared) | Default for most development | No setup — credentials from project owner |
| Local | When you need to test migrations or RLS changes in isolation | npx supabase start — run npx supabase status to get local keys, then update .env.local and appsettings.Development.json |
If using local Supabase, the JWT signing key is different from cloud — the
.NET APIand.env.localmust both point to the local project URL (http://127.0.0.1:54321).
- Sign in via the frontend with a test account → dashboard loads (not a redirect loop back to login)
- A cabin list request succeeds in the browser network tab with HTTP 200 (not 401)
- Confirm the API log does not show JWT errors on the first authenticated request
If you see 401 with JWT errors: verify
Supabase.Urlinappsettings.Development.jsonmatches the Supabase project you authenticated against. The.NET APIuses{Supabase.Url}/auth/v1as the JWKS authority — a mismatched URL means the token was issued by a different project.
- Run
git status— confirmappsettings.Development.jsonand.env.localdo not appear in the output - Run
git diff --cachedbefore every commit — confirm no credentials are staged - Never share Supabase keys via chat, email, or a shared doc — use the team password manager
| Need | Command |
|---|---|
| Get local Supabase credentials | npx supabase status |
| Start the API | dotnet run --project src/backend/CabinConnect.Api |
| Start the frontend | cd src/frontend && npm run dev |
| Clear Vite cache | rm -rf src/frontend/node_modules/.vite |
| Run backend tests | dotnet test src/backend/CabinConnect.sln |
| Run frontend lint | cd src/frontend && npm run lint |