Setup
This chapter explains how to connect NuxtBase to the services that make the template work in real projects.
The goal is simple: after finishing Getting Started, you should be able to configure the template with confidence instead of guessing which .env values matter, which providers are optional, or which URLs must match exactly.
Reading Order
Section titled “Reading Order” Environment Variables Understand which variables are required, optional, and validated at startup.
Database Setup Create PostgreSQL, run Drizzle migrations, and verify the schema.
Authentication Setup Configure Better Auth, OAuth callbacks, trusted origins, and passkeys.
Billing Setup Connect Stripe, map price IDs, and forward billing webhooks.
Email Setup Choose between preview, SMTP, and Resend for transactional emails.
Storage Setup Start with local uploads, then move to S3 or R2 when shared storage is needed.
AI Setup Configure OpenAI or OpenRouter for the built-in AI chat flow.
Analytics Setup Enable GA4, Umami, or Plausible only when you are ready to load tracking scripts.
i18n Setup Understand English and Chinese route prefixes, locale files, and docs collections.
What This Chapter Covers
Section titled “What This Chapter Covers”| Area | Why it matters | Can you skip it for first local run? |
|---|---|---|
| Environment variables | Controls every provider and runtime toggle | No |
| Database | Required for auth, organizations, billing state, and content-backed flows | No |
| Authentication | Required for login, registration, invitations, and dashboard access | No |
| Billing | Required only if you want real Stripe checkout and subscription sync | Yes |
| Required for real email delivery in shared or production environments | Usually |
Suggested Setup Strategy
Section titled “Suggested Setup Strategy”- Get the app running with the smallest valid
.env - Confirm the database migrates cleanly
- Register a user and verify auth works
- Add email delivery beyond preview mode
- Connect Stripe only after auth and database are stable
Coming Next
Section titled “Coming Next”These pages are intentionally separate so you can configure one provider area at a time instead of changing everything in one pass.