Quick Start
Quick Start
Requirements
| Tool | Version | Purpose |
|---|---|---|
| Node.js | 24.x | Run the generator and generated project |
| pnpm | 10.x | Install dependencies, run checks, and build |
| PostgreSQL | Depends on full-mode selection | Required only when the full project selects database features; demo mode does not need it |
Choose a mode
Full project
Generate a project with the capabilities selected by a preset:
pnpm dlx create-nextdevtpl@4.0.0 my-app --preset saas --target vercel
cd my-app
The default mode is full. It retains modules, service adapters, and deployment files from a
preset or custom selection. When --preset is omitted, the generator uses minimal. See the
generator guide to customize the selection.
Frontend demo
Generate a demo project that can be browsed and exercised locally:
pnpm dlx create-nextdevtpl@4.0.0 my-demo --mode demo --target server
cd my-demo
pnpm dev
Demo mode supports only server and retains 17 user-facing routes and 20 skin views. It has no
real authentication, payments, APIs, database, or provider services. Profile, plan, and ticket
actions update sample state in the current tab's memory. Refreshing or opening another tab
restores the default sample. Demo mode needs no business environment variables or database and
rejects preset, module, and service-adapter selections.
Inspect the generated selection
Both modes create nextdevtpl.generated.json. Check mode, target, modules, and adapters
to see what the project retained. A demo project's backend capability lists are empty; its
frontend pages and views are still present.
Configure a full project locally
Create a local configuration from the generated .env.example:
Copy-Item .env.example .env.local
On macOS or Linux:
cp .env.example .env.local
Every full project requires NEXT_PUBLIC_APP_URL. When database and authentication are selected,
also configure the database URL, auth secret, and BETTER_AUTH_URL. For example:
DATABASE_URL="replace-with-your-database-url"
BETTER_AUTH_SECRET="replace-with-a-long-random-secret"
BETTER_AUTH_URL="http://localhost:3000"
NEXT_PUBLIC_APP_URL="http://localhost:3000"
The generated .env.example is selection-specific. Configure only the retained OAuth, payment,
mail, storage, AI, jobs, rate-limit, and analytics services. See Configuration
for the variable map. Demo projects do not need an .env file.
Initialize and run a full project
For a new local database, push the schema and start the app:
pnpm db:push
pnpm dev
Use migrations for shared and production databases:
pnpm db:generate:init
pnpm db:migrate
Review generated SQL before committing migration files. Projects without a database selection do not need database commands.
First verification
| Mode | Check | Expected result |
|---|---|---|
| Full | Pages and auth | Check selected pages; when auth is selected, an email/password user can reach the workspace |
| Full with auth and a database | Health | After configuring the generated environment and initializing the database, /api/health returns HTTP 200 with healthy |
| Full | Optional services | Verify only adapters listed in the generated selection |
| Demo | Pages and actions | Workspace, settings, and tickets are browsable; actions change only this tab's demo state |
| Demo | Backend boundary | No database or secrets are required; there are no business APIs, and refresh restores the default sample |
The current health probe always checks auth configuration and database connectivity. Validate custom full projects without a database through their selected pages, build, and adapters; this probe does not establish readiness for those selections.
Before committing, run the project checks:
pnpm format
pnpm lint
pnpm typecheck
pnpm test:run
pnpm build
See Deployment for a full project. Demo mode provides only the server target.