@octavius2929-personal/scaffold-generator
v0.11.0
Published
Opinionated project scaffolder CLI (React, TypeScript library, React component library, NestJS API)
Maintainers
Readme
@octavius2929-personal/scaffold-generator
Opinionated project scaffolder CLI. Generate production-shaped projects (React, Expo, TypeScript libraries, React component libraries, NestJS APIs) with DDD / hexagonal architecture baked in.
Quickstart
npx @octavius2929-personal/scaffold-generatorThe CLI walks you through picking a template and answering a few prompts, then writes a ready-to-run project.
Templates
| Template | What you get |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| react | React SPA + Vite + TypeScript with DDD/hexagonal. Optional Tailwind, optional routing, optional bounded contexts. |
| expo | Expo app + Expo Router + TypeScript with DDD/hexagonal. Development build via expo-dev-client, StyleSheet + tokens, AsyncStorage, jest-expo. Optional bounded contexts, optional i18n, Context or Zustand. |
| library | TypeScript library with DDD/hexagonal, tsup (ESM + CJS), Vitest, Biome. |
| react-library | React component library with styles in TS (vanilla-extract) and a theming system. |
| nestjs | NestJS API + TypeScript, modular monolith with hexagonal per module: selectable persistence (in-memory · prisma-postgres · typeorm-postgres · typeorm-sqlite), JWT auth + RBAC, validation, RFC 7807 errors, Pino, Prometheus, health, Swagger, throttler, Docker, Vitest. |
Every template can optionally include a Claude Code setup (.claude/ + CLAUDE.md).
Why this?
- Real architecture, not a hello-world. Every template ships with DDD / hexagonal structure (domain, application, infrastructure, presentation) wired correctly — not a flat
src/you have to reorganize later. - One coherent toolchain across stacks. Web, mobile, libraries, and APIs follow the same conventions (TypeScript strict, Biome, Vitest, conventional commits, CI/CD), so switching stacks doesn't mean relearning the setup.
- Opinionated but optional. Prompts let you toggle the heavy pieces (bounded contexts, i18n, routing, persistence driver) so you only pay for what you use.
- Non-interactive by design. Every prompt is reachable via flags, so the same generator works in your terminal and in CI.
Requirements
- Node.js >= 22
Flags
| Flag | Default | Description |
| --------------------- | -------- | ------------------------------------------------------- |
| --template <id> | (prompt) | Skip template selection |
| --target <dir> | cwd | Base directory where the project is created |
| --yes / -y | off | Non-interactive mode: use defaults for anything missing |
| --set <key>=<value> | — | (repeatable) answer for a prompt; requires --yes |
Non-interactive mode
# discover templates and their prompts (JSON)
npx @octavius2929-personal/scaffold-generator list --json
# generate without prompts (react)
npx @octavius2929-personal/scaffold-generator \
--template react --target . --yes \
--set projectName=my-app --set tailwind=true --set router=none \
--set boundedContexts=false --set claudeSetup=true
# generate a NestJS API with Postgres + TypeORM
npx @octavius2929-personal/scaffold-generator \
--template nestjs --target . --yes \
--set projectName=my-api --set database=typeorm-postgres --set claudeSetup=true
# generate an Expo app (Expo Router + DDD) with i18n and Zustand
npx @octavius2929-personal/scaffold-generator \
--template expo --target . --yes \
--set projectName=my-app --set boundedContexts=false \
--set i18n=true --set zustand=true --set claudeSetup=trueArchitecture
DDD + Hexagonal (ports & adapters). See docs/superpowers/specs/2026-05-11-scaffold-generator-design.md.
Adding a template
- Create
src/templates/<id>/template.jsonfollowing the Zod schema insrc/infrastructure/repositories/template-manifest.schema.ts. - Create
src/templates/<id>/files/with the project content. Use{{key}}for placeholders. - You don't touch anything else — the engine discovers it automatically.
See CONTRIBUTING.md for the full workflow.
License
MIT © Justin
