Hikari by CoreMVP

Environment variables

Configure Local, Preview and Production settings, origins and Stripe credentials.

Choose where your app runs, then save its settings in the matching location. .env.example defines the variable names; keep actual credentials out of Git.

EnvironmentSettings locationAPP_URL
LocalIgnored .env.local in your clonehttp://localhost:3000
PreviewVercel Preview, scoped to your test branchStable HTTPS Preview origin
ProductionVercel ProductionFinal HTTPS application origin

Vercel's environment scopes select which settings a deployment receives. A Preview setting does not update Production. Vercel also has a Development scope; Hikari's local quickstart derives .env.local from local Supabase instead of downloading hosted settings.

Set APP_URL to an origin only, without a path, query or embedded credentials. Hosted origins require HTTPS.

Variable reference

VariableSource and purpose
APP_URLApplication origin used for Auth, billing returns, and canonical URLs
NEXT_PUBLIC_SUPABASE_URLSelected Supabase project’s API URL
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYSelected Supabase project’s public client key
DATABASE_URLServer Postgres connection; use TLS and transaction pooling when hosted
STRIPE_SECRET_KEYServer key for the selected Stripe account
STRIPE_WEBHOOK_SECRETSigning secret for this environment’s webhook endpoint

Local values

Follow Run locally to start Supabase, apply migrations and run ./coremvp env sync. The local CLI writes the local Supabase and database settings to ignored .env.local, preserving existing Stripe settings and a configured APP_URL. ./coremvp env list reports set/missing status without displaying values. These commands do not configure Vercel.

Use http://localhost:3000 for the documented local Auth and E2E path. Authentication works before you add Stripe. For billing, use a test key and the signing secret from your running local stripe listen session.

Preview values

Use a separate hosted Supabase project for Preview so test accounts and migrations stay separate from Production. Save its API URL, publishable key and database URL in Vercel's Preview scope for the branch you test.

Choose a stable HTTPS Preview origin before the branch's first build, then save it as APP_URL and test through that origin. Hikari needs this value during the build and reads it explicitly; it does not derive it from Vercel's generated deployment URL. Reusing the Production origin sends recovery links and billing returns to Production. Supabase's Site URL, Auth redirect allowlist and Stripe webhook destination must match the Preview origin. Follow Configure a Preview deployment to choose the origin and configure settings before deploying.

Use a Stripe test key and the signing secret for the Preview webhook endpoint. Each endpoint has its own signing secret, even when Local, Preview and Production use the same test catalog.

Production values

Save your Production Supabase project's settings and final HTTPS APP_URL in Vercel's Production scope. Configure Auth and the hosted Stripe endpoint for that origin using Deploy to Vercel. Hosted database connections use Supabase's transaction pooler with TLS; Hikari sets prepare: false for transaction pooling.

Vercel Production means the deployment serving your application. It does not select Stripe live mode. Hikari's public Try pricing flow requests test Checkout and rejects live-mode prices, including on a Production deployment. Follow the documented Stripe test setup to exercise it.

Pricing configuration

Product IDs, monthly/yearly Price IDs and displayed amounts live in src/config/pricing.config.ts. There is one source catalog, with no automatic Local/Preview/Production selection. The deployed STRIPE_SECRET_KEY must belong to the account and test/live mode that owns those prices; changing the key does not translate their IDs.

For the included test journey, use the same matching Stripe test catalog across your environments. When using your own account, replace the example IDs and displayed amounts in source, then deploy that configuration with matching credentials. Public cards show those configured amounts. Stripe charges the selected Price's amount, so keep both in agreement. Configure your recurring prices before testing Checkout.

Apply a settings change

Restart bun run dev after changing .env.local. After changing hosted variables or source pricing, create a new deployment in the affected scope. Existing deployments keep their previous settings. NEXT_PUBLIC_* values are included during the Next.js build; rebuild before testing a changed Supabase project. See Next.js environment variables.

The Supabase URL and publishable key are public configuration. Keep DATABASE_URL, STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET server-only; never prefix them with NEXT_PUBLIC_ or copy a complete environment file into a support report.

On this page