Core app and Supabase
For local setup, keep secrets in
.env.local. npm run env:check now reads .env and .env.local the same way Next.js does, so the output is closer to the app’s real behavior.Feature toggles
If a toggle is not set, the repository treats that feature as enabled. Setfalse, 0, no, or off to disable it.
For auth, setting the toggle to
true is not enough by itself. If NEXT_PUBLIC_SUPABASE_URL or NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY is empty, the auth pages will fall back to a notice state instead of forcing a broken client initialization.Payments
Email and contact
Admin and access control
ADMIN_EMAILS is not the final source of truth. After the user signs in, the repository manages real access through the user_roles table.
AI
Optional env for operations
Common toggle profiles
This section helps when you want to start from a realistic feature combination instead of keeping everything enabled at once.Waitlist first, app later
Waitlist first, app later
Good when you are still validating demand.You still need
NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY because waitlist depends on Supabase. If contact is enabled, you also need RESEND_API_KEY.Subscription SaaS without AI
Subscription SaaS without AI
Good for most classic SaaS products.Make sure Supabase public env,
SUPABASE_SERVICE_ROLE_KEY, and the chosen payment provider credentials are filled in.AI SaaS with paid plans
AI SaaS with paid plans
Good when AI is a core product feature.In addition to payment env, you also need
OPENAI_API_KEY or ANTHROPIC_API_KEY depending on the default provider.Member portal or client portal without public billing
Member portal or client portal without public billing
Good for gated product areas, internal dashboards, or client workspaces.The minimum setup is just Supabase. You can enable admin later if you need an internal operations panel.
Minimal .env.local example
Use this if you only want auth, dashboard, and one payment provider:
Quick way to verify env values
- Make sure the latest values are already in
.env.localor.env. - Run
npm run env:check. - Read the status for each feature:
ready,fallback mode, ordisabled by .... - After the app is live, open
GET /api/healthfor a more detailed readiness summary. - If you just changed env values, restart
npm run devand check again.