create-du-app
v0.3.1
Published
CLI generator: pick templates (Mobile/FE/BE) and scaffold a product monorepo
Readme
create-du-app
Scaffold a standalone product monorepo from company templates — in one command.
Run it, answer a couple of prompts (project name + which stacks), and you get a ready-to-run pnpm monorepo with only the stacks you picked.
Quick start
No install needed. In a real terminal (Terminal.app / iTerm):
npx create-du-appYou'll be asked:
- Project name? → e.g.
my-shop - Select the groups → press
Spaceto tick Mobile / Frontend / Admin / Backend, thenEnter - Pick one technology per group → ↑ / ↓ then
Enter
Then bootstrap it — one command installs deps, builds @repo/shared, and
verifies every app can import it:
cd my-shop
pnpm bootstrap
pnpm devDone. 🎉
Non-interactive (CI / IDE terminals)
Pass everything as flags — no prompts, works anywhere:
npx create-du-app --name my-shop --mobile expo --fe nextjs --admin nextjs --be nestjs| Flag | Values | Required |
|------|--------|----------|
| --name | your project name | ✅ |
| --mobile | rn · expo · flutter | optional |
| --fe | nextjs · reactjs | optional |
| --admin | nextjs | optional |
| --be | nodejs · nestjs · php · supabase | optional |
Install globally (optional)
Scaffold often? Install once so you don't re-download it each time:
npm install -g create-du-app # or: pnpm add -g create-du-app
create-du-app # same as npx create-du-appAvailable stacks
| Group | Technologies | Output folder |
|----------|-------------------------------|----------------|
| Mobile | React Native · Expo · Flutter | apps/mobile |
| Frontend | Next.js · ReactJS | apps/web |
| Admin | Next.js | apps/admin |
| Backend | Node.js · NestJS · PHP · Supabase | apps/backend |
packages/shared (@repo/shared — shared data contracts, built with tsup) is added
automatically when you pick ≥ 2 JS/TS stacks, and every JS/TS app is wired to it
as a workspace:* dependency.
For maintainers
Working on the CLI source or the templates? See the repository README and CONTRIBUTING.md.
| File | Responsibility |
|---------------|----------------|
| src/index.js | Entry point. Parses flags, runs interactive or non-interactive, then generates. |
| src/registry.js | Data declaration of groups, technologies, templatePath, and lang. Edit this to add/remove a stack. |
| src/prompts.js | Interactive prompts (@clack/prompts). |
| src/generate.js | Copies templates, renames _package.json → package.json, substitutes {{PROJECT_NAME}}, emits the root config (package.json, pnpm-workspace.yaml, turbo.json, tsconfig.base.json, .gitignore, .npmrc, scripts/bootstrap.mjs), and wires JS/TS apps to @repo/shared. |
| scripts/validate-templates.mjs | Validates every registered template (gates prepack/publish). Run with pnpm validate. |
Before publishing, prepack runs template validation automatically. Run the full
check (validate + generate smoke test) from the repo root with pnpm test.
Release a new version: pnpm release (see scripts/release.mjs).
