Docs / Getting started
Getting started
Prerequisites #
- Node 20 or newer
- pnpm 9 or newer
- A Postgres database (local Docker is fine; a managed one is fine)
Create a new app #
pnpm dlx @naeemba/create-next-app my-app
cd my-app
pnpm installThe CLI scaffolds a fresh project, fills in placeholder names, and installs dependencies. You can skip the CLI and clone the repo directly if you prefer, but the CLI is faster and avoids the rename-everything step.
Configure environment #
Copy the example env file:
cp .env.example .env.localThe minimum you need to start the dev server:
DATABASE_URL— Postgres connection stringBETTER_AUTH_SECRET— any long random string (openssl rand -hex 32)BETTER_AUTH_URL—http://localhost:3000in dev
Optional, fill in when you need them:
RESEND_API_KEY— for sending transactional emails
Run migrations #
pnpm db:pushThis applies the Drizzle schema to your database.
Start the dev server #
pnpm devThe app boots at http://localhost:3000. Visit /sign-in to create your first account — passkey if your browser supports it, email/password as the fallback.
What you see #
/— the public marketing site (placeholder content you'll replace)/sign-in— the auth flow/studio— the backoffice (gated; visit it after signing in)