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.
- Go to /en-US/login and request a magic link.
- If you set up Brevo/Mailjet, the email arrives in your inbox. If you chose
noopduring the init wizard, open the Supabase dashboard → Authentication → Users → click your user → send magic link and copy the URL. - Click the link / enter the 6-digit OTP. You should land on the private dashboard.
- Because your email matches
app_settings.admin_email, the row inprofilesnow hasis_admin=true. Visit /en-US/admin-dashboard — it should load.
2. Connect Stripe in test mode
- Sign into your Stripe Dashboard and toggle test mode (top-right).
- Open Developers → API keys and copy the publishable and secret keys.
- Paste them in
.env.local(see code block below). - Restart the dev server so it picks the new env vars up.
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:
- In Stripe, create a Product with a recurring Price.
- Copy the
price_...ID. - Paste it into
config/pricing.tsunder 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:
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
- Open /en-US/pricing.
- Click Subscribe on a paid plan. Stripe Checkout opens.
- Use the canonical test card:
4242 4242 4242 4242, any future date, any CVC, any postal code. Submit. - You return to the success page. Behind the scenes the webhook fires.
- Open the Supabase dashboard → table
subscriptions— you should see a row with yourplan_id. Then checkcredit_transactions— the initial credits should be there too.
6. Add one LLM provider
Edit .env.local and add at least one of:
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 log in with magic link / OTP and reach
/admin-dashboard - A Stripe test checkout creates a row in
subscriptionsand credits land incredit_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.