Quick Start
This page takes you from a fresh install to a running local app.
Configure Environment Variables
Section titled “Configure Environment Variables”-
Copy the example file:
Terminal window cp .env.example .env -
Open
.envand set the required values:Terminal window # AppNUXT_PUBLIC_APP_NAME=My SaaSNUXT_PUBLIC_SITE_URL=http://localhost:3000# DatabaseDATABASE_URL=postgresql://postgres:postgres@localhost:5432/core-b2b# Auth — generate a secret with: openssl rand -base64 32BETTER_AUTH_SECRET=your-random-secret-hereBETTER_AUTH_URL=http://localhost:3000
Run Database Migrations
Section titled “Run Database Migrations”Apply the schema to your PostgreSQL database:
pnpm db:migratenpm run db:migrateyarn db:migrateThis uses Drizzle Kit to run all pending migrations from server/database/migrations/.
Start the App
Section titled “Start the App”pnpm devnpm run devyarn devOpen http://localhost:3000 in your browser.
Verify the First Run
Section titled “Verify the First Run”After the app starts, check these basics:
- Homepage loads — you should see the landing page at
/ - Register an account — go to
/registerand create a user - Dashboard works — after login, you land on
/dashboard - Organization created — a default organization is created on first login
Optional Checks
Section titled “Optional Checks”If you configured the corresponding environment variables:
| Feature | What to check |
|---|---|
| Stripe | Go to /pricing and verify the checkout button works |
Check .tmp/email-previews/ for the verification email HTML | |
| AI | Open /ai/chat in the dashboard and send a message |
| Admin | Set INITIAL_ADMIN_EMAIL to your email, restart, then visit /admin |
Grant Platform Admin (Optional)
Section titled “Grant Platform Admin (Optional)”To access the admin panel at /admin, set the env var and restart:
INITIAL_ADMIN_EMAIL=your-email@example.comThe app auto-grants the platform_admin role to this email on startup. The user must register first. This is idempotent — safe to leave set.
Alternatively, use the script:
pnpm admin:grant-platform-admin -- you@example.comnpm run admin:grant-platform-admin -- you@example.comyarn admin:grant-platform-admin -- you@example.comNext Step
Section titled “Next Step”Your app is running locally. Continue to Local Development to learn about the daily development workflow, email testing, and Stripe CLI setup.