1. Verify authentication works

The boilerplate ships with magic-link + OTP authentication via Supabase Auth. Templates are wired through Brevo / Mailjet. In dev, you can also bypass email by reading the link from the Supabase dashboard.

  1. Go to /en-US/login and request a magic link.
  2. If you set up Brevo/Mailjet, the email arrives in your inbox. If you chose noop during the init wizard, open the Supabase dashboard → Authentication → Users → click your user → send magic link and copy the URL.
  3. Click the link / enter the 6-digit OTP. You should land on the private dashboard.
  4. Because your email matches app_settings.admin_email, the row in profiles now has is_admin=true. Visit /en-US/admin-dashboard — it should load.

2. Connect Stripe in test mode

  1. Sign into your Stripe Dashboard and toggle test mode (top-right).
  2. Open Developers → API keys and copy the publishable and secret keys.
  3. Paste them in .env.local (see code block below).
  4. Restart the dev server so it picks the new env vars up.
env
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...

3. Configure your test prices

Plans live in config/pricing.ts — the database does not store them. For each plan you want to sell:

  1. In Stripe, create a Product with a recurring Price.
  2. Copy the price_... ID.
  3. Paste it into config/pricing.ts under that plan's monthly/yearly entry.

Free plans without a Stripe price ID work fine — they go through /api/billing/subscribe-free and create a subscription row directly.

4. Forward webhooks locally

Stripe webhooks are how the app learns about completed checkouts and subscription renewals. In dev, use the Stripe CLI to forward them:

bash
stripe login
stripe listen --forward-to localhost:3777/api/stripe/webhook

Copy the whsec_... signing secret the CLI prints and paste it into .env.local as STRIPE_WEBHOOK_SECRET. Restart the dev server.

5. Complete a test purchase

  1. Open /en-US/pricing.
  2. Click Subscribe on a paid plan. Stripe Checkout opens.
  3. Use the canonical test card: 4242 4242 4242 4242, any future date, any CVC, any postal code. Submit.
  4. You return to the success page. Behind the scenes the webhook fires.
  5. Open the Supabase dashboard → table subscriptions — you should see a row with your plan_id. Then check credit_transactions — the initial credits should be there too.

6. Add one LLM provider

Edit .env.local and add at least one of:

env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_AI_API_KEY=...

Restart the dev server, then go to /en-US/private-dashboard/chat and send a test message. The response should stream token-by-token. Once it finishes, check credit_transactions again — you should see a debit equal to the provider's reported token count.

You can move on when…
  • You can log in with magic link / OTP and reach /admin-dashboard
  • A Stripe test checkout creates a row in subscriptions and credits land in credit_transactions
  • A chat message streams back from your LLM provider and decrements credits
  • The Stripe CLI keeps running in a separate terminal while you test

For deeper details on any of the services above, jump to Authentication, Payments & Billing, or AI Integration.