ai-flow-dev 1.3.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -30
- package/dist/cli.js +94 -110
- package/dist/cli.js.map +1 -1
- package/package.json +6 -2
- package/prompts/backend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +5 -3
- package/prompts/backend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +36 -41
- package/prompts/backend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +80 -68
- package/prompts/backend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +82 -61
- package/prompts/backend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +10 -9
- package/prompts/backend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +8 -7
- package/prompts/backend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +5 -3
- package/prompts/backend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +410 -543
- package/prompts/backend/{flow-bootstrap-phase-9.md → flow-build-phase-9.md} +472 -91
- package/prompts/backend/{flow-bootstrap.md → flow-build.md} +212 -140
- package/prompts/backend/flow-dev-feature.md +447 -68
- package/prompts/backend/flow-dev-fix.md +81 -8
- package/prompts/backend/flow-docs-sync.md +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
- package/prompts/frontend/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +4 -2
- package/prompts/frontend/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
- package/prompts/frontend/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +238 -22
- package/prompts/frontend/{flow-bootstrap.md → flow-build.md} +108 -25
- package/prompts/frontend/flow-docs-sync.md +3 -2
- package/prompts/mobile/{flow-bootstrap-phase-0.md → flow-build-phase-0.md} +3 -2
- package/prompts/mobile/{flow-bootstrap-phase-1.md → flow-build-phase-1.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-2.md → flow-build-phase-2.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-3.md → flow-build-phase-3.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-5.md → flow-build-phase-5.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-6.md → flow-build-phase-6.md} +2 -1
- package/prompts/mobile/{flow-bootstrap-phase-8.md → flow-build-phase-8.md} +249 -23
- package/prompts/mobile/{flow-bootstrap.md → flow-build.md} +107 -26
- package/prompts/mobile/flow-docs-sync.md +3 -2
- package/templates/{mobile/AGENT.template.md → AGENT.template.md} +2 -17
- package/templates/backend/.clauderules.template +1 -1
- package/templates/backend/.cursorrules.template +1 -1
- package/templates/shared/AGENT.template.md +0 -252
- /package/prompts/backend/{flow-bootstrap-phase-4.md → flow-build-phase-4.md} +0 -0
- /package/prompts/frontend/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
- /package/prompts/mobile/{flow-bootstrap-phase-7.md → flow-build-phase-7.md} +0 -0
|
@@ -84,7 +84,7 @@ B) ⏭️ Skip for now (manual setup later)
|
|
|
84
84
|
📦 Preparing for framework initialization...
|
|
85
85
|
|
|
86
86
|
Creating backup of AI Flow documentation:
|
|
87
|
-
→ Moving
|
|
87
|
+
→ Moving project root docs to .ai-flow/temp-backup/
|
|
88
88
|
|
|
89
89
|
Files to backup:
|
|
90
90
|
✅ project-brief.md
|
|
@@ -103,69 +103,97 @@ Backup complete! Safe to initialize framework.
|
|
|
103
103
|
|
|
104
104
|
### 8.2.3: Execute Framework CLI
|
|
105
105
|
|
|
106
|
-
**
|
|
106
|
+
**IMPORTANT:** Use Bash tool to execute the framework's official CLI command. This ensures the project gets the latest stable versions and official project structure.
|
|
107
107
|
|
|
108
|
-
**
|
|
108
|
+
**Based on framework detected in Phase 3, execute ONE of these commands:**
|
|
109
|
+
|
|
110
|
+
**NestJS:**
|
|
109
111
|
|
|
110
112
|
```bash
|
|
111
|
-
# NestJS
|
|
112
113
|
npx @nestjs/cli new . --skip-git --package-manager npm
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Express:**
|
|
113
117
|
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
```bash
|
|
119
|
+
# Initialize package.json
|
|
120
|
+
npm init -y
|
|
121
|
+
|
|
122
|
+
# Install core dependencies with latest versions
|
|
123
|
+
npm install express cors helmet dotenv
|
|
116
124
|
|
|
117
|
-
#
|
|
118
|
-
npm
|
|
125
|
+
# Install dev dependencies
|
|
126
|
+
npm install -D typescript @types/node @types/express ts-node nodemon
|
|
119
127
|
|
|
120
|
-
#
|
|
121
|
-
npx create-next-app@latest . --typescript --eslint --tailwind --app --src-dir --import-alias "@/*"
|
|
128
|
+
# Create src/app.ts from template (see section 8.2.6.4)
|
|
122
129
|
```
|
|
123
130
|
|
|
124
|
-
**
|
|
131
|
+
**Django:**
|
|
125
132
|
|
|
126
133
|
```bash
|
|
127
|
-
# Django
|
|
128
134
|
django-admin startproject config .
|
|
135
|
+
```
|
|
129
136
|
|
|
130
|
-
|
|
131
|
-
# Create main.py, requirements.txt, project structure
|
|
132
|
-
mkdir -p app/api app/models app/schemas app/services
|
|
133
|
-
touch main.py requirements.txt
|
|
134
|
-
# Generate starter files
|
|
137
|
+
**FastAPI:**
|
|
135
138
|
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
```bash
|
|
140
|
+
# Install FastAPI with latest stable
|
|
141
|
+
pip install "fastapi[standard]" uvicorn[standard]
|
|
142
|
+
|
|
143
|
+
# Create app/main.py from template (see section 8.2.6.4)
|
|
138
144
|
```
|
|
139
145
|
|
|
140
|
-
**
|
|
146
|
+
**Spring Boot:**
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
spring init --dependencies=web,data-jpa --build=maven --name=[ProjectName] .
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Laravel:**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
composer create-project laravel/laravel .
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Go (Gin):**
|
|
141
159
|
|
|
142
160
|
```bash
|
|
143
|
-
# Go
|
|
144
161
|
go mod init [module-name]
|
|
162
|
+
go get -u github.com/gin-gonic/gin
|
|
163
|
+
```
|
|
145
164
|
|
|
146
|
-
|
|
147
|
-
dotnet new webapi -n [ProjectName]
|
|
165
|
+
**Ruby on Rails:**
|
|
148
166
|
|
|
149
|
-
|
|
150
|
-
rails new . --api --skip-git
|
|
167
|
+
```bash
|
|
168
|
+
rails new . --api --skip-git --database=postgresql
|
|
169
|
+
```
|
|
151
170
|
|
|
152
|
-
|
|
153
|
-
composer create-project laravel/laravel .
|
|
171
|
+
**.NET Core:**
|
|
154
172
|
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
```bash
|
|
174
|
+
dotnet new webapi -n [ProjectName] -o .
|
|
157
175
|
```
|
|
158
176
|
|
|
159
|
-
**Show progress:**
|
|
177
|
+
**Show progress as command executes:**
|
|
160
178
|
|
|
161
179
|
```
|
|
162
|
-
🚀
|
|
180
|
+
🚀 Executing: npx @nestjs/cli new . --skip-git
|
|
163
181
|
|
|
164
|
-
[
|
|
182
|
+
[Real CLI output from Bash tool]
|
|
165
183
|
|
|
166
184
|
✅ Framework initialized successfully!
|
|
167
185
|
```
|
|
168
186
|
|
|
187
|
+
**Result:** Framework CLI creates:
|
|
188
|
+
|
|
189
|
+
- ✅ package.json / requirements.txt / pom.xml (with latest versions)
|
|
190
|
+
- ✅ tsconfig.json / pyproject.toml (optimized configs)
|
|
191
|
+
- ✅ Basic src/ structure
|
|
192
|
+
- ✅ Test setup
|
|
193
|
+
- ✅ Linting/formatting configs
|
|
194
|
+
|
|
195
|
+
**Next:** Only add what framework doesn't include (see 8.2.6)
|
|
196
|
+
|
|
169
197
|
### 8.2.4: Restore AI Flow Documentation
|
|
170
198
|
|
|
171
199
|
```
|
|
@@ -212,613 +240,391 @@ You can initialize manually later with:
|
|
|
212
240
|
Proceeding to documentation generation...
|
|
213
241
|
```
|
|
214
242
|
|
|
215
|
-
### 8.2.6:
|
|
243
|
+
### 8.2.6: Minimal Post-Init Enhancements
|
|
216
244
|
|
|
217
|
-
**
|
|
245
|
+
**IMPORTANT:** Only add what the framework CLI doesn't include. **DO NOT** create business logic, entity modules, or complete features.
|
|
218
246
|
|
|
219
247
|
```
|
|
220
|
-
|
|
248
|
+
📦 Adding minimal enhancements...
|
|
221
249
|
|
|
222
|
-
Framework
|
|
223
|
-
|
|
250
|
+
Framework base created by CLI ✅
|
|
251
|
+
Now adding only essential files that framework doesn't include...
|
|
224
252
|
```
|
|
225
253
|
|
|
226
|
-
**Based on
|
|
254
|
+
**Based on selected framework and database from previous phases:**
|
|
227
255
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
# Install NestJS CLI globally (latest stable)
|
|
232
|
-
npm install -g @nestjs/cli
|
|
233
|
-
|
|
234
|
-
# Initialize with latest stable dependencies
|
|
235
|
-
npm install @nestjs/common @nestjs/core @nestjs/platform-express
|
|
236
|
-
npm install @nestjs/config @nestjs/jwt @nestjs/passport @nestjs/swagger
|
|
237
|
-
npm install @prisma/client bcrypt class-transformer class-validator
|
|
238
|
-
npm install passport passport-jwt passport-local reflect-metadata rxjs swagger-ui-express
|
|
239
|
-
|
|
240
|
-
# Install development dependencies (latest stable)
|
|
241
|
-
npm install -D @nestjs/cli @nestjs/schematics @nestjs/testing
|
|
242
|
-
npm install -D @types/bcrypt @types/express @types/jest @types/node
|
|
243
|
-
npm install -D @types/passport-jwt @types/passport-local @types/supertest
|
|
244
|
-
npm install -D @typescript-eslint/eslint-plugin @typescript-eslint/parser
|
|
245
|
-
npm install -D eslint eslint-config-prettier eslint-plugin-prettier
|
|
246
|
-
npm install -D jest prettier prisma source-map-support supertest
|
|
247
|
-
npm install -D ts-jest ts-loader ts-node tsconfig-paths typescript
|
|
248
|
-
```
|
|
256
|
+
### 8.2.6.1: Environment Variables Template
|
|
249
257
|
|
|
250
|
-
**
|
|
258
|
+
**Copy `.env.example` template to project root:**
|
|
251
259
|
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
"scripts": {
|
|
255
|
-
"build": "nest build",
|
|
256
|
-
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
257
|
-
"start": "nest start",
|
|
258
|
-
"start:dev": "nest start --watch",
|
|
259
|
-
"start:debug": "nest start --debug --watch",
|
|
260
|
-
"start:prod": "node dist/main",
|
|
261
|
-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
|
262
|
-
"test": "jest",
|
|
263
|
-
"test:watch": "jest --watch",
|
|
264
|
-
"test:cov": "jest --coverage",
|
|
265
|
-
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
266
|
-
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
267
|
-
"db:generate": "prisma generate",
|
|
268
|
-
"db:push": "prisma db push",
|
|
269
|
-
"db:migrate": "prisma migrate dev",
|
|
270
|
-
"db:studio": "prisma studio"
|
|
271
|
-
}
|
|
272
|
-
}
|
|
260
|
+
```bash
|
|
261
|
+
# Copy from .ai-flow/templates/.env.example.template to .env.example
|
|
273
262
|
```
|
|
274
263
|
|
|
275
|
-
**
|
|
264
|
+
**Template content (adapt based on framework and database):**
|
|
276
265
|
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
"module": "commonjs",
|
|
281
|
-
"declaration": true,
|
|
282
|
-
"removeComments": true,
|
|
283
|
-
"emitDecoratorMetadata": true,
|
|
284
|
-
"experimentalDecorators": true,
|
|
285
|
-
"allowSyntheticDefaultImports": true,
|
|
286
|
-
"target": "ES2021",
|
|
287
|
-
"sourceMap": true,
|
|
288
|
-
"outDir": "./dist",
|
|
289
|
-
"baseUrl": "./",
|
|
290
|
-
"incremental": true,
|
|
291
|
-
"skipLibCheck": true,
|
|
292
|
-
"strictNullChecks": true,
|
|
293
|
-
"noImplicitAny": true,
|
|
294
|
-
"strictBindCallApply": true,
|
|
295
|
-
"forceConsistentCasingInFileNames": true,
|
|
296
|
-
"noFallthroughCasesInSwitch": true,
|
|
297
|
-
"paths": {
|
|
298
|
-
"@/*": ["src/*"],
|
|
299
|
-
"@/common/*": ["src/common/*"],
|
|
300
|
-
"@/config/*": ["src/config/*"]
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
```
|
|
266
|
+
```env
|
|
267
|
+
# Database
|
|
268
|
+
DATABASE_URL="postgresql://postgres:password@localhost:5432/{{PROJECT_NAME}}_dev?schema=public"
|
|
305
269
|
|
|
306
|
-
|
|
270
|
+
# JWT Authentication
|
|
271
|
+
JWT_SECRET="your-secret-key-here-change-in-production"
|
|
272
|
+
JWT_EXPIRES_IN="24h"
|
|
307
273
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
274
|
+
# Application
|
|
275
|
+
NODE_ENV="development"
|
|
276
|
+
PORT=3000
|
|
277
|
+
API_PREFIX="/api"
|
|
313
278
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
url = env("DATABASE_URL")
|
|
317
|
-
}
|
|
279
|
+
# CORS
|
|
280
|
+
CORS_ORIGIN="http://localhost:3000"
|
|
318
281
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
email String @unique
|
|
323
|
-
name String?
|
|
324
|
-
createdAt DateTime @default(now())
|
|
325
|
-
updatedAt DateTime @updatedAt
|
|
282
|
+
# Redis (if using)
|
|
283
|
+
REDIS_HOST="localhost"
|
|
284
|
+
REDIS_PORT=6379
|
|
326
285
|
|
|
327
|
-
|
|
328
|
-
|
|
286
|
+
# Email (if using)
|
|
287
|
+
SMTP_HOST=""
|
|
288
|
+
SMTP_PORT=587
|
|
289
|
+
SMTP_USER=""
|
|
290
|
+
SMTP_PASS=""
|
|
329
291
|
```
|
|
330
292
|
|
|
331
|
-
**
|
|
293
|
+
**User must copy to `.env` manually:**
|
|
332
294
|
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
|
|
295
|
+
```
|
|
296
|
+
📝 Created .env.example template
|
|
297
|
+
⚠️ User must copy to .env and configure: cp .env.example .env
|
|
298
|
+
```
|
|
336
299
|
|
|
337
|
-
|
|
338
|
-
JWT_SECRET="your-super-secret-jwt-key-change-in-production"
|
|
339
|
-
JWT_EXPIRES_IN="24h"
|
|
300
|
+
### 8.2.6.2: Docker Compose (Optional)
|
|
340
301
|
|
|
341
|
-
|
|
342
|
-
NODE_ENV="development"
|
|
343
|
-
PORT=3000
|
|
302
|
+
**Only if user selected Docker in Phase 7.**
|
|
344
303
|
|
|
345
|
-
|
|
346
|
-
CORS_ORIGIN="http://localhost:3000"
|
|
347
|
-
```
|
|
304
|
+
**Copy appropriate docker-compose template based on database:**
|
|
348
305
|
|
|
349
|
-
**
|
|
306
|
+
**PostgreSQL:**
|
|
350
307
|
|
|
351
308
|
```yaml
|
|
309
|
+
# Copy from templates/docker-compose/postgres.template.yml
|
|
352
310
|
version: "3.8"
|
|
311
|
+
|
|
353
312
|
services:
|
|
354
313
|
postgres:
|
|
355
314
|
image: postgres:15-alpine
|
|
356
|
-
restart:
|
|
315
|
+
restart: unless-stopped
|
|
357
316
|
environment:
|
|
358
|
-
POSTGRES_DB: myapp_dev
|
|
359
|
-
POSTGRES_USER: postgres
|
|
360
|
-
POSTGRES_PASSWORD: password
|
|
317
|
+
POSTGRES_DB: ${DB_NAME:-myapp_dev}
|
|
318
|
+
POSTGRES_USER: ${DB_USER:-postgres}
|
|
319
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
361
320
|
ports:
|
|
362
|
-
- "5432:5432"
|
|
321
|
+
- "${DB_PORT:-5432}:5432"
|
|
363
322
|
volumes:
|
|
364
323
|
- postgres_data:/var/lib/postgresql/data
|
|
324
|
+
healthcheck:
|
|
325
|
+
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
326
|
+
interval: 10s
|
|
327
|
+
timeout: 5s
|
|
328
|
+
retries: 5
|
|
365
329
|
|
|
366
330
|
volumes:
|
|
367
331
|
postgres_data:
|
|
368
332
|
```
|
|
369
333
|
|
|
370
|
-
**
|
|
334
|
+
**MySQL:**
|
|
371
335
|
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
parser: '@typescript-eslint/parser',
|
|
376
|
-
parserOptions: {
|
|
377
|
-
project: 'tsconfig.json',
|
|
378
|
-
tsconfigRootDir: __dirname,
|
|
379
|
-
sourceType: 'module',
|
|
380
|
-
},
|
|
381
|
-
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
382
|
-
extends: [
|
|
383
|
-
'@nestjs',
|
|
384
|
-
'plugin:@typescript-eslint/recommended',
|
|
385
|
-
'plugin:prettier/recommended',
|
|
386
|
-
],
|
|
387
|
-
root: true,
|
|
388
|
-
env: {
|
|
389
|
-
node: true,
|
|
390
|
-
jest: true,
|
|
391
|
-
},
|
|
392
|
-
ignorePatterns: ['.eslintrc.js'],
|
|
393
|
-
rules: {
|
|
394
|
-
'@typescript-eslint/interface-name-prefix': 'off',
|
|
395
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
396
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
397
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
398
|
-
},
|
|
399
|
-
};
|
|
400
|
-
```
|
|
336
|
+
```yaml
|
|
337
|
+
# Copy from templates/docker-compose/mysql.template.yml
|
|
338
|
+
version: "3.8"
|
|
401
339
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
|
|
340
|
+
services:
|
|
341
|
+
mysql:
|
|
342
|
+
image: mysql:8-oracle
|
|
343
|
+
restart: unless-stopped
|
|
344
|
+
environment:
|
|
345
|
+
MYSQL_DATABASE: ${DB_NAME:-myapp_dev}
|
|
346
|
+
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-password}
|
|
347
|
+
ports:
|
|
348
|
+
- "${DB_PORT:-3306}:3306"
|
|
349
|
+
volumes:
|
|
350
|
+
- mysql_data:/var/lib/mysql
|
|
412
351
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
```typescript
|
|
416
|
-
import { NestFactory } from "@nestjs/core";
|
|
417
|
-
import { ValidationPipe } from "@nestjs/common";
|
|
418
|
-
import { SwaggerModule, DocumentBuilder } from "@nestjs/swagger";
|
|
419
|
-
import { AppModule } from "./app.module";
|
|
420
|
-
|
|
421
|
-
async function bootstrap() {
|
|
422
|
-
const app = await NestFactory.create(AppModule);
|
|
423
|
-
|
|
424
|
-
// Global validation pipe
|
|
425
|
-
app.useGlobalPipes(
|
|
426
|
-
new ValidationPipe({
|
|
427
|
-
whitelist: true,
|
|
428
|
-
forbidNonWhitelisted: true,
|
|
429
|
-
transform: true,
|
|
430
|
-
})
|
|
431
|
-
);
|
|
432
|
-
|
|
433
|
-
// CORS
|
|
434
|
-
app.enableCors({
|
|
435
|
-
origin: process.env.CORS_ORIGIN || "http://localhost:3000",
|
|
436
|
-
credentials: true,
|
|
437
|
-
});
|
|
438
|
-
|
|
439
|
-
// Swagger API Documentation
|
|
440
|
-
const config = new DocumentBuilder()
|
|
441
|
-
.setTitle("API Documentation")
|
|
442
|
-
.setDescription("The API description")
|
|
443
|
-
.setVersion("1.0")
|
|
444
|
-
.addBearerAuth()
|
|
445
|
-
.build();
|
|
446
|
-
const document = SwaggerModule.createDocument(app, config);
|
|
447
|
-
SwaggerModule.setup("api/docs", app, document);
|
|
448
|
-
|
|
449
|
-
const port = process.env.PORT || 3000;
|
|
450
|
-
await app.listen(port);
|
|
451
|
-
console.log(`🚀 Application is running on: http://localhost:${port}`);
|
|
452
|
-
console.log(`📚 Swagger documentation: http://localhost:${port}/api/docs`);
|
|
453
|
-
}
|
|
454
|
-
bootstrap();
|
|
352
|
+
volumes:
|
|
353
|
+
mysql_data:
|
|
455
354
|
```
|
|
456
355
|
|
|
457
|
-
**
|
|
356
|
+
**MongoDB:**
|
|
458
357
|
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
│ ├── decorators/
|
|
463
|
-
│ ├── filters/
|
|
464
|
-
│ ├── guards/
|
|
465
|
-
│ ├── interceptors/
|
|
466
|
-
│ └── pipes/
|
|
467
|
-
├── config/
|
|
468
|
-
│ ├── database.config.ts
|
|
469
|
-
│ └── jwt.config.ts
|
|
470
|
-
└── health/
|
|
471
|
-
├── health.controller.ts
|
|
472
|
-
└── health.module.ts
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
**IMPORTANT: Do NOT create entity-specific modules** (User, Product, Order, etc.)
|
|
476
|
-
**Only create the basic NestJS structure with configurations**
|
|
358
|
+
```yaml
|
|
359
|
+
# Copy from templates/docker-compose/mongodb.template.yml
|
|
360
|
+
version: "3.8"
|
|
477
361
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
362
|
+
services:
|
|
363
|
+
mongodb:
|
|
364
|
+
image: mongo:7
|
|
365
|
+
restart: unless-stopped
|
|
366
|
+
environment:
|
|
367
|
+
MONGO_INITDB_DATABASE: ${DB_NAME:-myapp_dev}
|
|
368
|
+
MONGO_INITDB_ROOT_USERNAME: ${DB_USER:-root}
|
|
369
|
+
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD:-password}
|
|
370
|
+
ports:
|
|
371
|
+
- "${DB_PORT:-27017}:27017"
|
|
372
|
+
volumes:
|
|
373
|
+
- mongodb_data:/data/db
|
|
486
374
|
|
|
487
|
-
|
|
375
|
+
volumes:
|
|
376
|
+
mongodb_data:
|
|
488
377
|
```
|
|
489
378
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
```bash
|
|
493
|
-
npm install
|
|
494
|
-
|
|
495
|
-
# Generate Prisma client
|
|
496
|
-
npx prisma generate
|
|
379
|
+
### 8.2.6.3: ORM Setup (If Framework Doesn't Include)
|
|
497
380
|
|
|
498
|
-
|
|
499
|
-
docker-compose up -d
|
|
381
|
+
**Only for frameworks that don't auto-configure ORM:**
|
|
500
382
|
|
|
501
|
-
|
|
502
|
-
npx prisma db push
|
|
503
|
-
```
|
|
383
|
+
**NestJS + Prisma:**
|
|
504
384
|
|
|
385
|
+
```bash
|
|
386
|
+
npx prisma init
|
|
387
|
+
# Creates prisma/schema.prisma automatically with DATABASE_URL from .env
|
|
505
388
|
```
|
|
506
|
-
🔄 Installing dependencies...
|
|
507
|
-
📦 Generating Prisma client...
|
|
508
|
-
🐘 Starting PostgreSQL container...
|
|
509
|
-
🗄️ Creating database tables...
|
|
510
389
|
|
|
511
|
-
|
|
390
|
+
**Express + Prisma:**
|
|
512
391
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
3. Access database: npx prisma studio
|
|
517
|
-
4. Create entity modules as needed during development
|
|
392
|
+
```bash
|
|
393
|
+
npm install prisma @prisma/client
|
|
394
|
+
npx prisma init
|
|
518
395
|
```
|
|
519
396
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
**Install latest stable dependencies:**
|
|
397
|
+
**FastAPI + SQLAlchemy:**
|
|
523
398
|
|
|
524
399
|
```bash
|
|
525
|
-
#
|
|
526
|
-
|
|
527
|
-
pip install python-jose[cryptography] passlib[bcrypt] python-multipart
|
|
528
|
-
pip install pydantic pydantic-settings
|
|
529
|
-
|
|
530
|
-
# Install development dependencies (latest stable)
|
|
531
|
-
pip install pytest pytest-asyncio black flake8 mypy
|
|
400
|
+
# SQLAlchemy setup (create app/core/database.py)
|
|
401
|
+
# Follow FastAPI documentation: https://fastapi.tiangolo.com/tutorial/sql-databases/
|
|
532
402
|
```
|
|
533
403
|
|
|
534
|
-
**
|
|
404
|
+
**Django:**
|
|
535
405
|
|
|
536
406
|
```bash
|
|
537
|
-
|
|
407
|
+
# ORM already configured by django-admin startproject
|
|
408
|
+
# Just configure DATABASE settings in config/settings/base.py
|
|
538
409
|
```
|
|
539
410
|
|
|
540
|
-
**
|
|
411
|
+
**Result:**
|
|
541
412
|
|
|
542
413
|
```
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
├── core/
|
|
547
|
-
│ ├── __init__.py
|
|
548
|
-
│ ├── config.py
|
|
549
|
-
│ ├── security.py
|
|
550
|
-
│ └── database.py
|
|
551
|
-
├── api/
|
|
552
|
-
│ ├── __init__.py
|
|
553
|
-
│ └── deps.py
|
|
554
|
-
├── models/
|
|
555
|
-
│ ├── __init__.py
|
|
556
|
-
│ └── user.py
|
|
557
|
-
└── schemas/
|
|
558
|
-
├── __init__.py
|
|
559
|
-
└── user.py
|
|
414
|
+
✅ ORM initialized
|
|
415
|
+
✅ schema.prisma created (or equivalent)
|
|
416
|
+
✅ Migrations ready to run
|
|
560
417
|
```
|
|
561
418
|
|
|
562
|
-
|
|
419
|
+
### 8.2.6.4: Starter Files for Express/FastAPI (Optional)
|
|
563
420
|
|
|
564
|
-
|
|
565
|
-
version: "3.8"
|
|
566
|
-
services:
|
|
567
|
-
postgres:
|
|
568
|
-
image: postgres:15-alpine
|
|
569
|
-
environment:
|
|
570
|
-
POSTGRES_DB: myapp_dev
|
|
571
|
-
POSTGRES_USER: postgres
|
|
572
|
-
POSTGRES_PASSWORD: password
|
|
573
|
-
ports:
|
|
574
|
-
- "5432:5432"
|
|
575
|
-
volumes:
|
|
576
|
-
- postgres_data:/var/lib/postgresql/data
|
|
421
|
+
**Only if user needs a basic starting point. Otherwise, skip and let them follow official docs.**
|
|
577
422
|
|
|
578
|
-
|
|
579
|
-
postgres_data:
|
|
580
|
-
```
|
|
423
|
+
**Express:**
|
|
581
424
|
|
|
582
|
-
|
|
425
|
+
- Create `src/app.ts` with basic Express setup (middleware, health endpoint)
|
|
426
|
+
- Reference: https://expressjs.com/en/starter/hello-world.html
|
|
583
427
|
|
|
584
|
-
**
|
|
428
|
+
**FastAPI:**
|
|
585
429
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
npm install express cors helmet express-rate-limit jsonwebtoken bcrypt @prisma/client dotenv
|
|
430
|
+
- Create `app/main.py` with basic FastAPI setup (CORS, health endpoint)
|
|
431
|
+
- Reference: https://fastapi.tiangolo.com/tutorial/first-steps/
|
|
589
432
|
|
|
590
|
-
|
|
591
|
-
npm install -D @types/express @types/cors @types/bcrypt @types/jsonwebtoken
|
|
592
|
-
npm install -D typescript nodemon ts-node jest @types/jest prisma
|
|
433
|
+
**Docker Compose (if needed):**
|
|
593
434
|
|
|
594
|
-
|
|
595
|
-
|
|
435
|
+
- Reference official Docker Hub documentation:
|
|
436
|
+
- PostgreSQL: https://hub.docker.com/_/postgres
|
|
437
|
+
- MySQL: https://hub.docker.com/_/mysql
|
|
438
|
+
- MongoDB: https://hub.docker.com/_/mongo
|
|
596
439
|
|
|
597
|
-
|
|
440
|
+
### 8.2.6.5: Generate .gitignore
|
|
598
441
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
"build": "tsc",
|
|
604
|
-
"start": "node dist/app.js",
|
|
605
|
-
"lint": "eslint src/**/*.ts",
|
|
606
|
-
"test": "jest",
|
|
607
|
-
"db:generate": "prisma generate",
|
|
608
|
-
"db:migrate": "prisma migrate dev"
|
|
609
|
-
}
|
|
610
|
-
}
|
|
442
|
+
**IMPORTANT:** Generate a comprehensive `.gitignore` file based on the framework, language, and tools selected in previous phases.
|
|
443
|
+
|
|
444
|
+
```
|
|
445
|
+
📝 Generating .gitignore for your tech stack...
|
|
611
446
|
```
|
|
612
447
|
|
|
613
|
-
|
|
448
|
+
**Strategy:**
|
|
614
449
|
|
|
615
|
-
**
|
|
450
|
+
1. **Detect framework from Phase 3** (NestJS, Express, Django, FastAPI, etc.)
|
|
451
|
+
2. **Detect language** (Node.js, Python, Go, etc.)
|
|
452
|
+
3. **Detect tools from Phase 7** (Docker, Prisma, etc.)
|
|
453
|
+
4. **Combine relevant patterns**
|
|
616
454
|
|
|
617
|
-
|
|
618
|
-
# Install Django and DRF (latest stable)
|
|
619
|
-
pip install Django djangorestframework django-cors-headers
|
|
620
|
-
pip install celery redis psycopg2-binary python-decouple
|
|
621
|
-
pip install djangorestframework-simplejwt django-filter
|
|
455
|
+
**Base patterns by technology:**
|
|
622
456
|
|
|
623
|
-
|
|
624
|
-
pip freeze > requirements.txt
|
|
625
|
-
```
|
|
457
|
+
**Node.js projects (NestJS, Express):**
|
|
626
458
|
|
|
627
|
-
|
|
459
|
+
```gitignore
|
|
460
|
+
# Dependencies
|
|
461
|
+
node_modules/
|
|
462
|
+
npm-debug.log*
|
|
463
|
+
yarn-debug.log*
|
|
464
|
+
yarn-error.log*
|
|
465
|
+
.pnpm-debug.log*
|
|
628
466
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
│ ├── __init__.py
|
|
634
|
-
│ ├── base.py
|
|
635
|
-
│ ├── development.py
|
|
636
|
-
│ └── production.py
|
|
637
|
-
├── urls.py
|
|
638
|
-
└── wsgi.py
|
|
639
|
-
```
|
|
467
|
+
# Build outputs
|
|
468
|
+
dist/
|
|
469
|
+
build/
|
|
470
|
+
*.tsbuildinfo
|
|
640
471
|
|
|
641
|
-
|
|
472
|
+
# Environment variables
|
|
473
|
+
.env
|
|
474
|
+
.env.local
|
|
475
|
+
.env.*.local
|
|
642
476
|
|
|
643
|
-
|
|
477
|
+
# IDE
|
|
478
|
+
.vscode/
|
|
479
|
+
.idea/
|
|
480
|
+
*.swp
|
|
481
|
+
*.swo
|
|
482
|
+
*~
|
|
644
483
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
# Or add dependencies manually (latest stable versions)
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
**Add JWT dependency to pom.xml:**
|
|
653
|
-
|
|
654
|
-
```xml
|
|
655
|
-
<dependencies>
|
|
656
|
-
<!-- Spring Boot starters (managed versions) -->
|
|
657
|
-
<dependency>
|
|
658
|
-
<groupId>org.springframework.boot</groupId>
|
|
659
|
-
<artifactId>spring-boot-starter-web</artifactId>
|
|
660
|
-
</dependency>
|
|
661
|
-
<dependency>
|
|
662
|
-
<groupId>org.springframework.boot</groupId>
|
|
663
|
-
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
664
|
-
</dependency>
|
|
665
|
-
<dependency>
|
|
666
|
-
<groupId>org.springframework.boot</groupId>
|
|
667
|
-
<artifactId>spring-boot-starter-security</artifactId>
|
|
668
|
-
</dependency>
|
|
669
|
-
<dependency>
|
|
670
|
-
<groupId>org.postgresql</groupId>
|
|
671
|
-
<artifactId>postgresql</artifactId>
|
|
672
|
-
</dependency>
|
|
673
|
-
<!-- Use latest stable JWT library -->
|
|
674
|
-
<dependency>
|
|
675
|
-
<groupId>io.jsonwebtoken</groupId>
|
|
676
|
-
<artifactId>jjwt-api</artifactId>
|
|
677
|
-
</dependency>
|
|
678
|
-
<dependency>
|
|
679
|
-
<groupId>io.jsonwebtoken</groupId>
|
|
680
|
-
<artifactId>jjwt-impl</artifactId>
|
|
681
|
-
<scope>runtime</scope>
|
|
682
|
-
</dependency>
|
|
683
|
-
<dependency>
|
|
684
|
-
<groupId>io.jsonwebtoken</groupId>
|
|
685
|
-
<artifactId>jjwt-jackson</artifactId>
|
|
686
|
-
<scope>runtime</scope>
|
|
687
|
-
</dependency>
|
|
688
|
-
</dependencies>
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
#### **Laravel (PHP) Complete Setup:**
|
|
692
|
-
|
|
693
|
-
**Install Laravel with latest stable version:**
|
|
484
|
+
# OS
|
|
485
|
+
.DS_Store
|
|
486
|
+
Thumbs.db
|
|
694
487
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
488
|
+
# Testing
|
|
489
|
+
coverage/
|
|
490
|
+
.nyc_output/
|
|
698
491
|
|
|
699
|
-
#
|
|
700
|
-
|
|
701
|
-
|
|
492
|
+
# Logs
|
|
493
|
+
logs/
|
|
494
|
+
*.log
|
|
495
|
+
|
|
496
|
+
# Prisma (if using)
|
|
497
|
+
prisma/migrations/dev.db
|
|
498
|
+
prisma/*.db
|
|
499
|
+
|
|
500
|
+
# TypeScript
|
|
501
|
+
*.tsbuildinfo
|
|
702
502
|
```
|
|
703
503
|
|
|
704
|
-
**
|
|
504
|
+
**Python projects (Django, FastAPI):**
|
|
705
505
|
|
|
706
|
-
```
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
506
|
+
```gitignore
|
|
507
|
+
# Python
|
|
508
|
+
__pycache__/
|
|
509
|
+
*.py[cod]
|
|
510
|
+
*$py.class
|
|
511
|
+
*.so
|
|
512
|
+
.Python
|
|
713
513
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
514
|
+
# Virtual environments
|
|
515
|
+
venv/
|
|
516
|
+
env/
|
|
517
|
+
ENV/
|
|
518
|
+
.venv
|
|
717
519
|
|
|
718
|
-
|
|
520
|
+
# Django
|
|
521
|
+
*.log
|
|
522
|
+
db.sqlite3
|
|
523
|
+
db.sqlite3-journal
|
|
524
|
+
media/
|
|
525
|
+
staticfiles/
|
|
719
526
|
|
|
720
|
-
|
|
527
|
+
# FastAPI
|
|
528
|
+
.pytest_cache/
|
|
721
529
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
530
|
+
# Environment
|
|
531
|
+
.env
|
|
532
|
+
.env.local
|
|
725
533
|
|
|
726
|
-
#
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
go get gorm.io/driver/postgres
|
|
731
|
-
go get github.com/golang-migrate/migrate/v4
|
|
732
|
-
go get github.com/go-playground/validator/v10
|
|
534
|
+
# IDE
|
|
535
|
+
.vscode/
|
|
536
|
+
.idea/
|
|
537
|
+
*.swp
|
|
733
538
|
|
|
734
|
-
#
|
|
735
|
-
|
|
539
|
+
# OS
|
|
540
|
+
.DS_Store
|
|
736
541
|
```
|
|
737
542
|
|
|
738
|
-
**
|
|
543
|
+
**Go projects:**
|
|
739
544
|
|
|
740
|
-
|
|
545
|
+
```gitignore
|
|
546
|
+
# Binaries
|
|
547
|
+
*.exe
|
|
548
|
+
*.exe~
|
|
549
|
+
*.dll
|
|
550
|
+
*.so
|
|
551
|
+
*.dylib
|
|
552
|
+
bin/
|
|
741
553
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
├── server/
|
|
745
|
-
│ └── main.go
|
|
746
|
-
internal/
|
|
747
|
-
├── config/
|
|
748
|
-
├── handlers/
|
|
749
|
-
├── middleware/
|
|
750
|
-
├── models/
|
|
751
|
-
└── services/
|
|
752
|
-
pkg/
|
|
753
|
-
└── database/
|
|
754
|
-
```
|
|
554
|
+
# Test binary
|
|
555
|
+
*.test
|
|
755
556
|
|
|
756
|
-
|
|
557
|
+
# Output
|
|
558
|
+
*.out
|
|
757
559
|
|
|
758
|
-
|
|
560
|
+
# Go workspace
|
|
561
|
+
go.work
|
|
759
562
|
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
rails new myapp --api --skip-git --database=postgresql
|
|
563
|
+
# Environment
|
|
564
|
+
.env
|
|
763
565
|
|
|
764
|
-
#
|
|
765
|
-
|
|
566
|
+
# IDE
|
|
567
|
+
.vscode/
|
|
568
|
+
.idea/
|
|
569
|
+
```
|
|
766
570
|
|
|
767
|
-
|
|
768
|
-
bundle add jwt
|
|
769
|
-
bundle add bcrypt
|
|
770
|
-
bundle add rack-cors
|
|
771
|
-
bundle add rspec-rails --group development,test
|
|
772
|
-
bundle add factory_bot_rails --group development,test
|
|
773
|
-
bundle add byebug --group development,test
|
|
571
|
+
**Docker additions (if Docker selected in Phase 7):**
|
|
774
572
|
|
|
775
|
-
|
|
776
|
-
|
|
573
|
+
```gitignore
|
|
574
|
+
# Docker
|
|
575
|
+
docker-compose.override.yml
|
|
576
|
+
.docker/
|
|
777
577
|
```
|
|
778
578
|
|
|
779
|
-
|
|
579
|
+
**📝 Action:** Generate and write `.gitignore` to project root.
|
|
780
580
|
|
|
781
|
-
|
|
581
|
+
**Selection logic:**
|
|
782
582
|
|
|
783
|
-
|
|
583
|
+
- If NestJS/Express → Use Node.js patterns
|
|
584
|
+
- If Django/FastAPI → Use Python patterns
|
|
585
|
+
- If Go/Gin → Use Go patterns
|
|
586
|
+
- If Prisma detected in Phase 3 → Add Prisma patterns
|
|
587
|
+
- If Docker selected in Phase 7 → Add Docker patterns
|
|
784
588
|
|
|
785
|
-
```
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
589
|
+
```
|
|
590
|
+
✅ Generated: .gitignore
|
|
591
|
+
Patterns included: [Node.js | Python | Go] + [Prisma] + [Docker]
|
|
592
|
+
```
|
|
789
593
|
|
|
790
|
-
|
|
791
|
-
dotnet add package Microsoft.EntityFrameworkCore.Design
|
|
792
|
-
dotnet add package Microsoft.EntityFrameworkCore.Tools
|
|
793
|
-
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL
|
|
594
|
+
---
|
|
794
595
|
|
|
795
|
-
|
|
796
|
-
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer
|
|
596
|
+
### 8.2.6.6: Final Summary
|
|
797
597
|
|
|
798
|
-
# Restore packages
|
|
799
|
-
dotnet restore
|
|
800
598
|
```
|
|
599
|
+
✅ Minimal enhancements complete!
|
|
801
600
|
|
|
802
|
-
|
|
601
|
+
Files created (3-4 max):
|
|
602
|
+
✅ .env.example (environment template)
|
|
603
|
+
✅ .gitignore (ignore patterns for your stack)
|
|
604
|
+
✅ docker-compose.yml (if Docker selected)
|
|
605
|
+
✅ prisma/schema.prisma (if Prisma ORM)
|
|
803
606
|
|
|
804
|
-
-
|
|
805
|
-
|
|
806
|
-
- **Authentication structure ready but no specific endpoints**
|
|
807
|
-
- **Database configured with basic table (if ORM used)**
|
|
808
|
-
- **All development tools configured (linting, testing, etc.)**
|
|
607
|
+
🎯 Total: 3-4 files (vs 40-60 files in old approach)
|
|
608
|
+
📚 For Express/FastAPI starter code, refer to official documentation
|
|
809
609
|
|
|
610
|
+
Next steps:
|
|
611
|
+
1. Copy .env.example to .env and configure
|
|
612
|
+
2. Start database: docker-compose up -d (if applicable)
|
|
613
|
+
3. Run migrations: npm run db:migrate or equivalent
|
|
614
|
+
4. Start dev server: npm run start:dev or equivalent
|
|
615
|
+
5. Create features with /feature command
|
|
810
616
|
```
|
|
811
|
-
✅ Complete [FRAMEWORK] development environment ready!
|
|
812
|
-
✅ Database configured with Docker Compose
|
|
813
|
-
✅ ORM/Database layer configured
|
|
814
|
-
✅ Authentication structure ready
|
|
815
|
-
✅ API documentation configured (where applicable)
|
|
816
|
-
✅ Linting and formatting configured
|
|
817
|
-
✅ Testing framework configured
|
|
818
|
-
✅ All development scripts configured
|
|
819
617
|
|
|
820
|
-
|
|
821
|
-
|
|
618
|
+
**CRITICAL RULES:**
|
|
619
|
+
|
|
620
|
+
- ❌ **DO NOT** create entity modules (User, Product, Order, etc.)
|
|
621
|
+
- ❌ **DO NOT** create controllers/routes for business logic
|
|
622
|
+
- ❌ **DO NOT** create authentication endpoints
|
|
623
|
+
- ❌ **DO NOT** create complete folder structures
|
|
624
|
+
- ❌ **DO NOT** install 40+ packages manually
|
|
625
|
+
- ✅ **ONLY** create .env.example, .gitignore, docker-compose (optional), ORM init
|
|
626
|
+
- ✅ **LET** framework CLI handle structure, configs, dependencies
|
|
627
|
+
- ✅ **REFER** to official docs for starter code when needed
|
|
822
628
|
|
|
823
629
|
---
|
|
824
630
|
|
|
@@ -883,6 +689,14 @@ Generating...
|
|
|
883
689
|
[Generate mermaid sequence diagram]
|
|
884
690
|
```
|
|
885
691
|
|
|
692
|
+
**📝 Action:** Write the complete file to `docs/business-flows.md`
|
|
693
|
+
|
|
694
|
+
```
|
|
695
|
+
✅ Generated: docs/business-flows.md
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
---
|
|
699
|
+
|
|
886
700
|
### 8.3.2: Generate docs/api.md
|
|
887
701
|
|
|
888
702
|
- **Template:** `.ai-flow/templates/docs/api.template.md`
|
|
@@ -959,6 +773,12 @@ We use [workflow from Phase 5]
|
|
|
959
773
|
[Format from Phase 5.2]
|
|
960
774
|
````
|
|
961
775
|
|
|
776
|
+
**📝 Action:** Write the complete file to `docs/contributing.md`
|
|
777
|
+
|
|
778
|
+
```
|
|
779
|
+
✅ Generated: docs/contributing.md
|
|
780
|
+
```
|
|
781
|
+
|
|
962
782
|
---
|
|
963
783
|
|
|
964
784
|
## 8.4: Generate AGENT.md (Master Index)
|
|
@@ -1110,16 +930,51 @@ The API will be available at `http://localhost:3000`
|
|
|
1110
930
|
|
|
1111
931
|
````
|
|
1112
932
|
|
|
1113
|
-
|
|
933
|
+
**📝 Action:** Write the complete file to `.ai-flow/README.md`
|
|
1114
934
|
|
|
1115
935
|
```
|
|
1116
|
-
✅ README.md
|
|
936
|
+
✅ Generated: .ai-flow/README.md
|
|
1117
937
|
[If merged] Merged with framework's setup instructions
|
|
1118
938
|
```
|
|
1119
939
|
|
|
1120
940
|
---
|
|
1121
941
|
|
|
1122
|
-
## 8.6:
|
|
942
|
+
## 8.6: Generate AGENT.md (Master Index)
|
|
943
|
+
|
|
944
|
+
**CRITICAL:** Before generating AGENT.md, re-read ALL previously generated documents to have complete context.
|
|
945
|
+
|
|
946
|
+
**📝 Action:**
|
|
947
|
+
|
|
948
|
+
```
|
|
949
|
+
🔄 Re-reading all generated documents for AGENT.md generation...
|
|
950
|
+
|
|
951
|
+
✅ Reading project-brief.md
|
|
952
|
+
✅ Reading ai-instructions.md
|
|
953
|
+
✅ Reading docs/data-model.md
|
|
954
|
+
✅ Reading docs/architecture.md
|
|
955
|
+
✅ Reading docs/code-standards.md
|
|
956
|
+
✅ Reading docs/testing.md
|
|
957
|
+
✅ Reading docs/operations.md
|
|
958
|
+
✅ Reading specs/security.md
|
|
959
|
+
✅ Reading specs/configuration.md
|
|
960
|
+
✅ Reading docs/business-flows.md
|
|
961
|
+
✅ Reading docs/api.md
|
|
962
|
+
✅ Reading docs/contributing.md
|
|
963
|
+
|
|
964
|
+
✅ All context loaded!
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
Now generate AGENT.md with complete information from all documents.
|
|
968
|
+
|
|
969
|
+
**📝 Action:** Write the complete file to `.ai-flow/AGENT.md`
|
|
970
|
+
|
|
971
|
+
```
|
|
972
|
+
✅ Generated: .ai-flow/AGENT.md (Master Index)
|
|
973
|
+
```
|
|
974
|
+
|
|
975
|
+
---
|
|
976
|
+
|
|
977
|
+
## 8.7: Create Tool-Specific Configs
|
|
1123
978
|
|
|
1124
979
|
**Based on AI tool selection from Phase 3 (question 3.8):**
|
|
1125
980
|
|
|
@@ -1140,18 +995,18 @@ Read `.ai-flow/AGENT.md` first for complete documentation index.
|
|
|
1140
995
|
|
|
1141
996
|
- Project overview: `.ai-flow/project-brief.md`
|
|
1142
997
|
- AI instructions: `.ai-flow/ai-instructions.md`
|
|
1143
|
-
- Architecture:
|
|
1144
|
-
- API reference:
|
|
1145
|
-
- Code standards:
|
|
998
|
+
- Architecture: `docs/architecture.md`
|
|
999
|
+
- API reference: `docs/api.md`
|
|
1000
|
+
- Code standards: `docs/code-standards.md`
|
|
1146
1001
|
|
|
1147
1002
|
## Working Instructions
|
|
1148
1003
|
|
|
1149
1004
|
When writing code:
|
|
1150
1005
|
|
|
1151
|
-
1. Follow patterns in
|
|
1152
|
-
2. Reference data model in
|
|
1153
|
-
3. Implement security rules from
|
|
1154
|
-
4. Write tests per
|
|
1006
|
+
1. Follow patterns in `docs/code-standards.md`
|
|
1007
|
+
2. Reference data model in `docs/data-model.md`
|
|
1008
|
+
3. Implement security rules from `specs/security.md`
|
|
1009
|
+
4. Write tests per `docs/testing.md`
|
|
1155
1010
|
|
|
1156
1011
|
## Critical Rules
|
|
1157
1012
|
|
|
@@ -1174,9 +1029,9 @@ See `.ai-flow/AGENT.md` for complete document list.
|
|
|
1174
1029
|
## Quick Reference
|
|
1175
1030
|
|
|
1176
1031
|
- Tech Stack: [from Phase 3]
|
|
1177
|
-
- Architecture:
|
|
1178
|
-
- Code Standards:
|
|
1179
|
-
- API Conventions:
|
|
1032
|
+
- Architecture: `docs/architecture.md`
|
|
1033
|
+
- Code Standards: `docs/code-standards.md`
|
|
1034
|
+
- API Conventions: `docs/api.md`
|
|
1180
1035
|
|
|
1181
1036
|
## Code Generation Rules
|
|
1182
1037
|
|
|
@@ -1206,11 +1061,11 @@ Master index: `.ai-flow/AGENT.md`
|
|
|
1206
1061
|
|
|
1207
1062
|
## Key References
|
|
1208
1063
|
|
|
1209
|
-
- Architecture:
|
|
1210
|
-
- Data Model:
|
|
1211
|
-
- API:
|
|
1212
|
-
- Code Standards:
|
|
1213
|
-
- Testing:
|
|
1064
|
+
- Architecture: `docs/architecture.md`
|
|
1065
|
+
- Data Model: `docs/data-model.md`
|
|
1066
|
+
- API: `docs/api.md`
|
|
1067
|
+
- Code Standards: `docs/code-standards.md`
|
|
1068
|
+
- Testing: `docs/testing.md`
|
|
1214
1069
|
|
|
1215
1070
|
## Code Generation Guidelines
|
|
1216
1071
|
|
|
@@ -1225,13 +1080,21 @@ Master index: `.ai-flow/AGENT.md`
|
|
|
1225
1080
|
[Extract from code-standards.md]
|
|
1226
1081
|
```
|
|
1227
1082
|
|
|
1228
|
-
|
|
1083
|
+
**📝 Action:** Generate the tool-specific config files based on selection:
|
|
1229
1084
|
|
|
1230
|
-
|
|
1085
|
+
- If Claude → Write `.clauderules`
|
|
1086
|
+
- If Cursor → Write `.cursorrules`
|
|
1087
|
+
- If Copilot → Write `.github/copilot-instructions.md`
|
|
1088
|
+
- If "All" → Write all three files
|
|
1089
|
+
|
|
1090
|
+
```
|
|
1091
|
+
✅ Generated tool-specific configs:
|
|
1092
|
+
[List generated files based on selection]
|
|
1093
|
+
```
|
|
1231
1094
|
|
|
1232
1095
|
---
|
|
1233
1096
|
|
|
1234
|
-
## 8.
|
|
1097
|
+
## 8.8: Final Validation & Success Message
|
|
1235
1098
|
|
|
1236
1099
|
```
|
|
1237
1100
|
🔍 Validating all generated files...
|
|
@@ -1249,7 +1112,7 @@ All validations passed!
|
|
|
1249
1112
|
```
|
|
1250
1113
|
🎉 AI Flow Complete!
|
|
1251
1114
|
|
|
1252
|
-
Generated
|
|
1115
|
+
Generated 16 documents successfully:
|
|
1253
1116
|
|
|
1254
1117
|
Phase 1:
|
|
1255
1118
|
✅ project-brief.md
|
|
@@ -1281,6 +1144,7 @@ Phase 8:
|
|
|
1281
1144
|
✅ docs/contributing.md
|
|
1282
1145
|
✅ README.md
|
|
1283
1146
|
✅ AGENT.md
|
|
1147
|
+
✅ .gitignore
|
|
1284
1148
|
|
|
1285
1149
|
[If framework initialized:]
|
|
1286
1150
|
✅ [FRAMEWORK_NAME] project initialized
|
|
@@ -1310,13 +1174,14 @@ your-project/
|
|
|
1310
1174
|
│ │ ├── testing.md
|
|
1311
1175
|
│ │ ├── operations.md
|
|
1312
1176
|
│ │ └── contributing.md
|
|
1313
|
-
|
|
1314
|
-
│
|
|
1315
|
-
│
|
|
1177
|
+
├── specs/
|
|
1178
|
+
│ ├── security.md
|
|
1179
|
+
│ └── configuration.md
|
|
1316
1180
|
│ └── templates/ # Original templates
|
|
1317
1181
|
├── [framework files] # If initialized
|
|
1318
1182
|
├── README.md
|
|
1319
1183
|
├── .env.example
|
|
1184
|
+
├── .gitignore
|
|
1320
1185
|
└── [tool configs] # .clauderules, .cursorrules, etc.
|
|
1321
1186
|
|
|
1322
1187
|
````
|
|
@@ -1388,11 +1253,12 @@ When executing Phase 8:
|
|
|
1388
1253
|
- [ ] Generate docs/business-flows.md (from Phase 1)
|
|
1389
1254
|
- [ ] Generate docs/api.md (from Phase 2 + Phase 3)
|
|
1390
1255
|
- [ ] Generate docs/contributing.md (from Phase 5 + Phase 7)
|
|
1256
|
+
- [ ] Generate .gitignore (based on framework and tools)
|
|
1391
1257
|
|
|
1392
1258
|
**8.4 Generate AGENT.md:**
|
|
1393
1259
|
|
|
1394
1260
|
- [ ] Re-read ALL documents again to ensure accuracy
|
|
1395
|
-
- [ ] Create master index listing all
|
|
1261
|
+
- [ ] Create master index listing all 16 documents
|
|
1396
1262
|
- [ ] Include quick reference (tech stack, rules, commands)
|
|
1397
1263
|
- [ ] Validate all links
|
|
1398
1264
|
|
|
@@ -1487,7 +1353,7 @@ Your choice (A/B): \_\_
|
|
|
1487
1353
|
|
|
1488
1354
|
```
|
|
1489
1355
|
|
|
1490
|
-
**If choice A:** Continue to Phase 9 (flow-
|
|
1356
|
+
**If choice A:** Continue to Phase 9 (flow-build-phase-9.md)
|
|
1491
1357
|
|
|
1492
1358
|
**If choice B:** Show completion message:
|
|
1493
1359
|
|
|
@@ -1516,3 +1382,4 @@ Happy coding! 🚀
|
|
|
1516
1382
|
|
|
1517
1383
|
**SUCCESS:** Project fully documented and ready for development! 🚀
|
|
1518
1384
|
```
|
|
1385
|
+
|