add-project-scaffolding
Guide Node.js project scaffolding — Starter monolith, Scale monorepo, Starter→Scale migration.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guide Node.js project scaffolding — Starter monolith, Scale monorepo, Starter→Scale migration.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Consolidated view of the add-pro ecosystem - commands, skills, relationships and dependencies. Loaded by /add as source of truth.
Source of truth for ADD doc rules, depth floors, IDs, refs, validation gate. Load before any doc write.
Use when running agent-judged QA validation (read-PNG by default; the playwright plugin adds live driving) — the Level C judge rubric, severity taxonomy, dual-judge (@ux-agent review ∥ @qa-agent) method, report schema/template, and the config.json/screens.json formats. Consumed by /add.qa and both judges.
Use when a state-materializing command starts or is asked to upgrade — reads the setup receipt, compares the recorded contract against the shipped one, executes the declared upgrade deltas sequentially, and rewrites the receipt even on a verified-current no-op. Consumed by /add.qa-setup STEP 1.5 and STEP 11.
Internal skill for developing ADD framework artefacts (commands, skills, agents, scripts). Use when add-framework--plan analyzes viability of new framework features, when add-framework--build implements framework artefacts, or when creating/modifying commands, skills, or agents. Always use this skill before proposing or implementing changes to the framework itself.
Use when building, styling, or theming UI components, pages, layouts, dashboards, charts, tables, or forms for SaaS products.
| name | add-project-scaffolding |
| description | Guide Node.js project scaffolding — Starter monolith, Scale monorepo, Starter→Scale migration. |
Guide AI-assisted creation of Node.js projects from scratch with consistent architecture across stacks.
Use for: Creating new projects, choosing stack, scaffolding folder structure, migrating Starter to Scale Not for:
Principle: This skill is KNOWLEDGE that guides the AI — not a CLI generator or static templates. The AI generates the actual files using its knowledge of each framework, guided by these architectural decisions.
Two tiers exist. Choose based on project needs:
| Criteria | Starter | Scale |
|---|---|---|
| Team size | 1-3 devs | 3+ devs |
| Complexity | Single domain or few modules | Multiple domains, shared libs |
| Deploy targets | Single service | Multiple services/workers |
| When to choose | MVP, learning, prototyping | Production SaaS, multi-app |
Starter is the default. Only recommend Scale when the project clearly needs multiple apps or shared packages from day one. Starter can always migrate to Scale later.
Single src/ directory organized by domain modules. Every module contains ALL its artifacts (controller/routes, service, repository, DTOs, entities). This co-location makes future extraction to packages trivial.
Legend: NestJS uses
*.controller.ts/*.module.ts(decorator-based). Other stacks (Express/Fastify/Bun-Hono/Bun-Elysia) use*.routes.tsfor handlers andindex.tsas barrel/plugin export.
project/
├── src/
│ ├── modules/ # One directory per domain
│ │ ├── users/
│ │ │ ├── users.controller.ts
│ │ │ ├── users.service.ts
│ │ │ ├── users.repository.ts
│ │ │ ├── users.module.ts
│ │ │ ├── dtos/
│ │ │ │ ├── create-user.dto.ts
│ │ │ │ └── user-response.dto.ts
│ │ │ └── entities/
│ │ │ └── user.entity.ts
│ │ └── auth/
│ │ ├── auth.controller.ts
│ │ ├── auth.service.ts
│ │ └── ...
│ ├── shared/ # Cross-module code
│ │ ├── database/
│ │ │ ├── database.module.ts
│ │ │ ├── migrations/
│ │ │ └── types/
│ │ ├── config/
│ │ │ └── env.ts
│ │ ├── middlewares/
│ │ ├── guards/
│ │ └── utils/
│ ├── app.module.ts
│ └── main.ts # Entry point
├── tests/
│ ├── unit/
│ └── integration/
├── docs/
│ └── owner.md
├── package.json
├── tsconfig.json
├── .eslintrc.js
├── .env.example
├── docker-compose.dev.yml
└── README.md
| Stack | Controller | Service | Module | Barrel |
|---|---|---|---|---|
| nestjs | *.controller.ts | *.service.ts | *.module.ts | index.ts (in libs/) |
| express | *.routes.ts | *.service.ts | index.ts (exports) | index.ts |
| fastify | *.routes.ts | *.service.ts | index.ts (plugin) | index.ts |
| bun-hono | *.routes.ts | *.service.ts | index.ts | index.ts |
| bun-elysia | *.routes.ts | *.service.ts | index.ts (plugin) | index.ts |
Multiple apps sharing packages. Each package has clear responsibility. Modules INSIDE apps follow the same structure as Starter.
project/
├── apps/
│ ├── api/ # HTTP server
│ │ ├── src/
│ │ │ ├── modules/ # Same module structure as Starter
│ │ │ ├── app.module.ts
│ │ │ └── main.ts
│ │ ├── package.json
│ │ └── tsconfig.json
│ └── worker/ # Background jobs (optional)
│ ├── src/
│ ├── package.json
│ └── tsconfig.json
├── packages/
│ ├── core/ # Entities, enums, interfaces
│ │ ├── src/
│ │ │ ├── entities/
│ │ │ ├── enums/
│ │ │ └── interfaces/
│ │ └── package.json
│ ├── database/ # ORM, migrations, repositories
│ │ ├── src/
│ │ │ ├── migrations/
│ │ │ ├── repositories/
│ │ │ └── types/
│ │ └── package.json
│ ├── services/ # Shared business logic
│ │ └── package.json
│ ├── shared/ # Utils, configs, middlewares
│ │ └── package.json
│ └── adapters/ # External integrations
│ └── package.json
├── docs/
├── infra/ # Docker, CI/CD, IaC
├── package.json # Workspace root
├── turbo.json # or nx.json, or bun workspace
└── tsconfig.base.json
When creating a new project, follow this sequence:
Ask the user (or infer from context):
1. Stack: express | fastify | nestjs | bun-hono | bun-elysia
2. Database: postgresql | mysql | sqlite | mongodb | none (default: postgresql)
3. ORM: prisma | drizzle | kysely | typeorm | none (default: prisma)
4. Frontend: react | vue | svelte | none (default: none)
5. Tier: starter | scale (default: starter)
6. Package manager: npm | pnpm | yarn | bun (default: pnpm)
Create the directory structure matching the chosen tier. Use the framework-specific naming conventions from the tables above.
For each stack, generate appropriate configs:
| Scope | Options |
|---|---|
Base compilerOptions | target: ES2022, module/moduleResolution: NodeNext, strict: true, esModuleInterop, skipLibCheck, forceConsistentCasingInFileNames, resolveJsonModule, declaration, declarationMap, sourceMap, outDir: ./dist |
| NestJS additions | emitDecoratorMetadata: true, experimentalDecorators: true |
| Bun override | types: ["bun-types"] |
Every project gets a docker-compose.dev.yml for local database:
services:
db:
image: postgres:16-alpine # or mysql:8, mongo:7
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: app_dev
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
volumes:
db_data:
.env.example with documented variables:
# Server
PORT=3000
NODE_ENV=development
# Database
DATABASE_URL=postgresql://dev:dev@localhost:5432/app_dev
# Auth (if applicable)
JWT_SECRET=change-me-in-production
JWT_EXPIRES_IN=7d
Create main.ts with the framework's bootstrap pattern. The AI knows each framework's bootstrap — use idiomatic code for the chosen stack.
If the user mentions a domain (e.g., "user management app"), create the first module following the structure. Otherwise, leave modules/ empty with a .gitkeep.
When a Starter project outgrows its structure, migrate to Scale. The module-based organization makes this mechanical:
| Starter (from) | Scale (to) | Action |
|---|---|---|
src/modules/*/entities/ | packages/core/src/entities/ | Move, update imports |
src/modules/*/ (services, repos) | apps/api/src/modules/*/ | Move controller/service, extract repo to packages/database |
src/shared/database/ | packages/database/ | Extract as package |
src/shared/config/ | packages/shared/src/config/ | Extract as package |
src/shared/utils/ | packages/shared/src/utils/ | Extract as package |
src/main.ts | apps/api/src/main.ts | Move, adjust imports |
package.json | Root package.json + apps/api/package.json | Split dependencies |
tsconfig.json | tsconfig.base.json + apps/api/tsconfig.json | Config inheritance |
apps/, packages/, root workspace configpackages/core/packages/database/packages/shared/src/modules/ and main.ts to apps/api/src/@project/core, @project/database)Each module/ and shared/ from Starter maps 1:1 to a package/ or apps/ in Scale. The NestJS-like module organization ensures this is a mechanical process, not an architectural redesign.
main.ts) registers modules, not individual routesshared/config/ — never process.env in modulesshared/database/ — shared across modulesapp.tsindex.ts exports the router/plugin for registrationindex.ts or use lightweight container (tsyringe, awilix)@Module, @Controller, @InjectableAppModuleapp.route() or Elysia's .use() plugin to mount modulesindex.ts exports the sub-app/pluginshared/ contains: database, config, middlewares, utilstests/ directory exists with unit/ and integration/tsconfig.json exists with strict mode enabledpackage.json has correct scripts (dev, build, start, test, migrate).env.example exists with documented variablesdocker-compose.dev.yml exists for local database.eslintrc.js existsshared/, not scattered across modulesAfter the project structure is created, run /add.wiki to generate:
.codeadd/project/stack-context.md — stack key-value file consumed by dev skills{{addpath:wiki/index.md}} and {{addpath:wiki/domains/}} pages — portable project wiki with backend, frontend, database area pagesCLAUDE.md / AGENTS.md / GEMINI.md — context files with architecture contract and technical spec