Configuration
Running create-stackr always prompts for the shape of your monorepo — there
are no presets to memorize. This page documents every prompt, the flags that skip
them, and what the CLI generates.
The interactive wizard
npx create-stackr@latest my-app
The wizard asks, in order:
- Project name — directory and package name.
- Include a dedicated auth service? (default: yes) — the trust anchor. If
you say yes, you're then asked for:
- OAuth providers — Google, Apple, GitHub (any combination).
- Auth features — email verification, password reset (default on), and two-factor authentication.
- Additional user fields — extra columns on the user record.
- Include the Next.js admin dashboard? (default: yes) — a ready-made UI to manage users and roles.
- Base service(s) — for each one:
- Name (default:
core). - Platforms — add a Next.js web frontend and/or an Expo mobile app (both optional).
- Event queue — a BullMQ + Redis worker (default: off).
- Auth middleware flavor (when an auth service exists) —
standard,role-gated(you supply the allowed roles),flexible, ornone. See Cross-Service Auth. - Add another base service? — loops until you're done.
- Name (default:
- ORM — Drizzle (default) or Prisma, locked across the whole monorepo.
- AI coding tools — Claude Code, Codex, Cursor, Windsurf. Your selection decides which harness artifacts are generated (see The Context Harness).
- Package manager — npm, yarn, or bun.
The ORM is monorepo-wide
You pick Drizzle or Prisma once. Every service uses the same ORM — mixing them per service is intentionally not supported, so tooling and conventions stay uniform.
Non-interactive generation
Pass --defaults to skip every prompt and generate the default shape: Drizzle, an
auth service with the admin dashboard, and one core base service.
npx create-stackr@latest my-app --defaultsYou can shape a non-interactive run further with flags:
| Flag | Effect |
|---|---|
| --defaults | Skip all prompts; use the built-in default config |
| --service-name <name> | Rename the initial base service (default: core) |
| --no-auth | Skip the auth service entirely |
| --with-services <list> | Comma-separated extra base services, e.g. scout,manage |
| --no-tests | Skip the Vitest scaffolding |
| --ci-workflow | Generate .github/workflows/test.yml |
| --verbose | Detailed generation output |
# Default config plus two extra services and a CI workflow
npx create-stackr@latest my-app --defaults --with-services scout,manage --ci-workflow
# Backend-only project, no auth, base service named "api"
npx create-stackr@latest my-app --no-auth --service-name apiGenerated environment & credentials
stackr generates .env files (root and per-service backend/.env) at init, filled
with strong random credentials — a 24-character database password and a
64-character hex BETTER_AUTH_SECRET. A committed .env.example holds placeholders.
# Generated, never committed
POSTGRES_PASSWORD=<24-char random>
BETTER_AUTH_SECRET=<64 hex chars>
AUTH_SERVICE_URL=http://auth:8888Never commit .env
The real .env files hold live secrets and are git-ignored. Commit
only .env.example.
OAuth client IDs and secrets (Google, Apple, GitHub) go into the auth service's
environment — they are placeholders in .env.example until you fill them in.
Ports
Ports are allocated deterministically so generated scripts, Docker Compose, and CI are reproducible:
| Port | Assignment |
|---|---|
| 8888 | Auth backend (fixed) |
| 3333 | Auth admin dashboard (fixed) |
| 8080, 8081, 8082, … | Base service backends (contiguous) |
| 3000, 3001, 3002, … | Base service web frontends (contiguous) |
| +10000 offset | Test profile (e.g. db 15432, redis 16379, app 18080) |
stackr.config.json
The generated stackr.config.json is the source of truth for the monorepo's
shape — the service list, ORM, package manager, ports, and any pending migrations.
The stackr CLI reads and updates it.
Don't hand-edit it
To add a service, run stackr add service
rather than editing stackr.config.json directly — the command keeps
Docker Compose, the root .env, and each backend/package.json
in sync.