Summary
Generate production-ready NestJS application structure with zero manual configuration required.
Motivation
Forge currently generates individual pieces (DTOs, controllers, services) but not a cohesive application. Developers must manually create app.module.ts, main.ts, configure Swagger, exception handling, etc.
This feature generates a complete executable NestJS application from contracts.
Scope
In Scope
- app.module.ts with all modules imported
- main.ts with app.listen() and graceful shutdown
- Swagger UI on /api/docs
- Global exception filter
- Global validation pipe
- CORS enabled
- Health check endpoint (/health)
- Ready to run:
npm install && npm run start
Out of Scope
- Authentication (future feature)
- Custom business logic
- API key management
Acceptance Criteria
Files to Create/Modify
packages/generators/src/nest/templates/app.module.template.ts (NEW)
packages/generators/src/nest/templates/main.template.ts (NEW)
packages/generators/src/nest/generator.ts (MODIFY)
tests/nest-bootstrap.test.mjs (NEW)
Test Strategy
- Generate NestJS project from contract
- Install dependencies
- Start application (
npm run start)
- Verify Swagger loads at http://localhost:3000/api/docs
- Test health endpoint returns 200
- Verify CORS headers present
- Verify no manual configuration needed
Summary
Generate production-ready NestJS application structure with zero manual configuration required.
Motivation
Forge currently generates individual pieces (DTOs, controllers, services) but not a cohesive application. Developers must manually create app.module.ts, main.ts, configure Swagger, exception handling, etc.
This feature generates a complete executable NestJS application from contracts.
Scope
In Scope
npm install && npm run startOut of Scope
Acceptance Criteria
Files to Create/Modify
packages/generators/src/nest/templates/app.module.template.ts(NEW)packages/generators/src/nest/templates/main.template.ts(NEW)packages/generators/src/nest/generator.ts(MODIFY)tests/nest-bootstrap.test.mjs(NEW)Test Strategy
npm run start)