ai-flow-dev 1.2.0 → 1.3.0
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 +14 -8
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/prompts/backend/flow-bootstrap-phase-8.md +608 -1
- package/templates/shared/AGENT.template.md +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ AI Flow is an interactive CLI that creates comprehensive professional documentat
|
|
|
10
10
|
|
|
11
11
|
**Key Features:**
|
|
12
12
|
|
|
13
|
-
- 🚀 Complete professional documentation (Backend:
|
|
13
|
+
- 🚀 Complete professional documentation (Backend: 17 docs, Frontend: 15 docs, Mobile: 14 docs, Fullstack: 4+ docs)
|
|
14
14
|
- ⚡ **Two modes:** Interactive (90-120 min, full control) or Smart Auto-Suggest (15-25 min, 6 questions)
|
|
15
15
|
- 🌍 Universal support - 12 languages, 60+ frameworks, 35+ ORMs (98% coverage)
|
|
16
16
|
- 🤖 Multi-AI support with slash commands
|
|
@@ -19,6 +19,8 @@ AI Flow is an interactive CLI that creates comprehensive professional documentat
|
|
|
19
19
|
|
|
20
20
|
**Quick Start:**
|
|
21
21
|
|
|
22
|
+
**Requirements:** Node.js ≥20.0.0
|
|
23
|
+
|
|
22
24
|
```bash
|
|
23
25
|
npm install -g ai-flow-dev
|
|
24
26
|
ai-flow init .
|
|
@@ -35,7 +37,7 @@ Transforma tu idea en un proyecto listo para producción y documentado para IA e
|
|
|
35
37
|
|
|
36
38
|
**Características:**
|
|
37
39
|
|
|
38
|
-
- 🚀 Documentación profesional completa (Backend:
|
|
40
|
+
- 🚀 Documentación profesional completa (Backend: 17 docs, Frontend: 15 docs, Mobile: 14 docs, Fullstack: 4+ docs)
|
|
39
41
|
- ⚡ **Dos modos:** Interactivo (90-120 min, control total) o Auto-Sugerido (15-25 min, 6 preguntas)
|
|
40
42
|
- 🌍 Soporte universal - 12 lenguajes, 60+ frameworks, 35+ ORMs
|
|
41
43
|
- 🤖 Compatible con Claude, Copilot, Cursor, Gemini
|
|
@@ -44,6 +46,8 @@ Transforma tu idea en un proyecto listo para producción y documentado para IA e
|
|
|
44
46
|
|
|
45
47
|
**Inicio rápido:**
|
|
46
48
|
|
|
49
|
+
**Requisitos:** Node.js ≥20.0.0
|
|
50
|
+
|
|
47
51
|
```bash
|
|
48
52
|
npm install -g ai-flow-dev
|
|
49
53
|
ai-flow init .
|
|
@@ -59,7 +63,7 @@ ai-flow init .
|
|
|
59
63
|
Transforme sua ideia em um projeto pronto para produção e documentado para IA em minutos.
|
|
60
64
|
**Características:**
|
|
61
65
|
|
|
62
|
-
- 🚀 Documentação profissional completa (
|
|
66
|
+
- 🚀 Documentação profissional completa (Backend: 17, Frontend: 15, Mobile: 14, Fullstack: 4+ docs)
|
|
63
67
|
- ⚡ **Dois modos:** Interativo (90-120 min, controle total) ou Auto-Sugestão (15-25 min, 6 perguntas)
|
|
64
68
|
- 🌍 Suporte universal - 12 linguagens, 60+ frameworks, 35+ ORMs
|
|
65
69
|
- 🤖 Compatível com Claude, Copilot, Cursor, Gemini
|
|
@@ -69,6 +73,8 @@ Transforme sua ideia em um projeto pronto para produção e documentado para IA
|
|
|
69
73
|
|
|
70
74
|
**Início Rápido:**
|
|
71
75
|
|
|
76
|
+
**Requisitos:** Node.js ≥20.0.0
|
|
77
|
+
|
|
72
78
|
```bash
|
|
73
79
|
npm install -g ai-flow-dev
|
|
74
80
|
ai-flow init .
|
|
@@ -97,7 +103,7 @@ The result is interconnected documentation that guides AI assistants and human d
|
|
|
97
103
|
|
|
98
104
|
- 🌍 **Universal Support** - 12 languages, 60+ frameworks, 35+ ORMs (98% coverage)
|
|
99
105
|
- 🤖 **AI-Agnostic** - Claude, Copilot, Cursor, Gemini, any AI tool
|
|
100
|
-
- 📚 **Professional Documentation** -
|
|
106
|
+
- 📚 **Professional Documentation** - Backend: 17, Frontend: 15, Mobile: 14, Fullstack: 4+ docs
|
|
101
107
|
- ⚡ **Two Questionnaire Modes:**
|
|
102
108
|
- **Interactive Mode:** Full control, 71 questions (90-120 min)
|
|
103
109
|
- **Smart Auto-Suggest:** Only 6 critical questions, AI suggests best practices (15-25 min)
|
|
@@ -167,8 +173,8 @@ ai-flow --help # Show help
|
|
|
167
173
|
--type <type> # backend, frontend, mobile, fullstack (interactive if omitted)
|
|
168
174
|
--name <name> # Project name (interactive if omitted)
|
|
169
175
|
--description <desc> # Project description (interactive if omitted)
|
|
170
|
-
--verbose # Detailed logging
|
|
171
|
-
--dry-run # Simulate without writing
|
|
176
|
+
--verbose # Detailed logging (init only)
|
|
177
|
+
--dry-run # Simulate without writing (init only)
|
|
172
178
|
```
|
|
173
179
|
|
|
174
180
|
**Examples:**
|
|
@@ -276,7 +282,7 @@ After initialization, use these slash commands in your AI tool:
|
|
|
276
282
|
|
|
277
283
|
1. **Smart Detection** - Analyzes existing projects in 3 layers (15s to 5min)
|
|
278
284
|
2. **Interactive Questionnaire** - Guides you through 8-9 phases (choose mode)
|
|
279
|
-
3. **Template Generation** - Creates
|
|
285
|
+
3. **Template Generation** - Creates 15-17 professional documents per project type
|
|
280
286
|
4. **Implementation Roadmap** - Optional Phase 9 generates Story Point estimates
|
|
281
287
|
5. **AI Integration** - Configures your AI tool with project context
|
|
282
288
|
6. **Slash Command Setup** - Installs prompts to tool-specific paths (.github/prompts/, .claude/commands/, etc.)
|
|
@@ -304,7 +310,7 @@ After initialization, use these slash commands in your AI tool:
|
|
|
304
310
|
|
|
305
311
|
**Mobile** (14 docs): AGENT.md, ai-instructions.md, project-brief.md, README.md, 8 technical docs, 2 specs
|
|
306
312
|
|
|
307
|
-
**Fullstack** (
|
|
313
|
+
**Fullstack** (4+ docs): ai-instructions.md, project-brief.md, README.md, configuration spec + inherits from backend/frontend as needed
|
|
308
314
|
|
|
309
315
|
---
|
|
310
316
|
|
package/dist/cli.js
CHANGED
|
@@ -649,7 +649,7 @@ async function initializeProject(targetPath, aiTool, projectType, projectName, p
|
|
|
649
649
|
program
|
|
650
650
|
.name('ai-flow')
|
|
651
651
|
.description('AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance.')
|
|
652
|
-
.version('1.
|
|
652
|
+
.version('1.3.0');
|
|
653
653
|
program
|
|
654
654
|
.command('init')
|
|
655
655
|
.description('Initialize AI Flow in current directory')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-flow-dev",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "AI-powered development workflow from idea to production. Generate specs, plan features, and build with AI assistance throughout your project lifecycle.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli.js",
|
|
@@ -212,6 +212,614 @@ You can initialize manually later with:
|
|
|
212
212
|
Proceeding to documentation generation...
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
+
### 8.2.6: Complete Project Structure Setup
|
|
216
|
+
|
|
217
|
+
**Set up complete development environment based on framework from Phase 3:**
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
🔧 Setting up complete development environment...
|
|
221
|
+
|
|
222
|
+
Framework detected: [FRAMEWORK_NAME]
|
|
223
|
+
Creating additional configurations according to documentation:
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Based on the selected framework and ORM/database from previous phases:**
|
|
227
|
+
|
|
228
|
+
**Install latest stable NestJS dependencies:**
|
|
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
|
+
```
|
|
249
|
+
|
|
250
|
+
**Update package.json scripts:**
|
|
251
|
+
|
|
252
|
+
```json
|
|
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
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Create enhanced tsconfig.json:**
|
|
276
|
+
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"compilerOptions": {
|
|
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
|
+
```
|
|
305
|
+
|
|
306
|
+
**Create complete Prisma configuration:**
|
|
307
|
+
|
|
308
|
+
```prisma
|
|
309
|
+
// prisma/schema.prisma
|
|
310
|
+
generator client {
|
|
311
|
+
provider = "prisma-client-js"
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
datasource db {
|
|
315
|
+
provider = "postgresql"
|
|
316
|
+
url = env("DATABASE_URL")
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Basic User model (additional entities will be added in development phases)
|
|
320
|
+
model User {
|
|
321
|
+
id Int @id @default(autoincrement())
|
|
322
|
+
email String @unique
|
|
323
|
+
name String?
|
|
324
|
+
createdAt DateTime @default(now())
|
|
325
|
+
updatedAt DateTime @updatedAt
|
|
326
|
+
|
|
327
|
+
@@map("users")
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Create .env file:**
|
|
332
|
+
|
|
333
|
+
```env
|
|
334
|
+
# Database
|
|
335
|
+
DATABASE_URL="postgresql://postgres:password@localhost:5432/myapp_dev?schema=public"
|
|
336
|
+
|
|
337
|
+
# JWT
|
|
338
|
+
JWT_SECRET="your-super-secret-jwt-key-change-in-production"
|
|
339
|
+
JWT_EXPIRES_IN="24h"
|
|
340
|
+
|
|
341
|
+
# App
|
|
342
|
+
NODE_ENV="development"
|
|
343
|
+
PORT=3000
|
|
344
|
+
|
|
345
|
+
# Cors
|
|
346
|
+
CORS_ORIGIN="http://localhost:3000"
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
**Create docker-compose.yml for PostgreSQL:**
|
|
350
|
+
|
|
351
|
+
```yaml
|
|
352
|
+
version: "3.8"
|
|
353
|
+
services:
|
|
354
|
+
postgres:
|
|
355
|
+
image: postgres:15-alpine
|
|
356
|
+
restart: always
|
|
357
|
+
environment:
|
|
358
|
+
POSTGRES_DB: myapp_dev
|
|
359
|
+
POSTGRES_USER: postgres
|
|
360
|
+
POSTGRES_PASSWORD: password
|
|
361
|
+
ports:
|
|
362
|
+
- "5432:5432"
|
|
363
|
+
volumes:
|
|
364
|
+
- postgres_data:/var/lib/postgresql/data
|
|
365
|
+
|
|
366
|
+
volumes:
|
|
367
|
+
postgres_data:
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Create complete ESLint + Prettier configuration:**
|
|
371
|
+
|
|
372
|
+
```json
|
|
373
|
+
// .eslintrc.js
|
|
374
|
+
module.exports = {
|
|
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
|
+
```
|
|
401
|
+
|
|
402
|
+
```json
|
|
403
|
+
// .prettierrc
|
|
404
|
+
{
|
|
405
|
+
"singleQuote": true,
|
|
406
|
+
"trailingComma": "all",
|
|
407
|
+
"tabWidth": 2,
|
|
408
|
+
"semi": true,
|
|
409
|
+
"printWidth": 80
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Update main.ts with complete configuration:**
|
|
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();
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
**Create basic folder structure:**
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
src/
|
|
461
|
+
├── common/
|
|
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**
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
✅ Complete NestJS development environment ready!
|
|
480
|
+
✅ PostgreSQL configured with Docker Compose
|
|
481
|
+
✅ Prisma ORM configured with basic User model
|
|
482
|
+
✅ ESLint + Prettier configured
|
|
483
|
+
✅ JWT authentication structure ready
|
|
484
|
+
✅ Swagger API documentation enabled
|
|
485
|
+
✅ All development scripts configured
|
|
486
|
+
|
|
487
|
+
🎯 Project is ready for development - entity modules should be created during development phases
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
**Install dependencies:**
|
|
491
|
+
|
|
492
|
+
```bash
|
|
493
|
+
npm install
|
|
494
|
+
|
|
495
|
+
# Generate Prisma client
|
|
496
|
+
npx prisma generate
|
|
497
|
+
|
|
498
|
+
# Start database
|
|
499
|
+
docker-compose up -d
|
|
500
|
+
|
|
501
|
+
# Run migrations (creates User table)
|
|
502
|
+
npx prisma db push
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
🔄 Installing dependencies...
|
|
507
|
+
📦 Generating Prisma client...
|
|
508
|
+
🐘 Starting PostgreSQL container...
|
|
509
|
+
🗄️ Creating database tables...
|
|
510
|
+
|
|
511
|
+
✅ All configurations applied successfully!
|
|
512
|
+
|
|
513
|
+
Next steps for development:
|
|
514
|
+
1. Start development server: npm run start:dev
|
|
515
|
+
2. Open API docs: http://localhost:3000/api/docs
|
|
516
|
+
3. Access database: npx prisma studio
|
|
517
|
+
4. Create entity modules as needed during development
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
#### **FastAPI (Python) Complete Setup:**
|
|
521
|
+
|
|
522
|
+
**Install latest stable dependencies:**
|
|
523
|
+
|
|
524
|
+
```bash
|
|
525
|
+
# Install latest stable FastAPI and dependencies
|
|
526
|
+
pip install fastapi uvicorn[standard] sqlalchemy alembic psycopg2-binary
|
|
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
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
**Create requirements.txt (use after installation to lock versions):**
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
pip freeze > requirements.txt
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Create complete project structure:**
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
app/
|
|
544
|
+
├── __init__.py
|
|
545
|
+
├── main.py
|
|
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
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**Create docker-compose.yml:**
|
|
563
|
+
|
|
564
|
+
```yaml
|
|
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
|
|
577
|
+
|
|
578
|
+
volumes:
|
|
579
|
+
postgres_data:
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
#### **Express.js (Node.js) Complete Setup:**
|
|
583
|
+
|
|
584
|
+
**Install latest stable dependencies:**
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
# Install production dependencies (latest stable)
|
|
588
|
+
npm install express cors helmet express-rate-limit jsonwebtoken bcrypt @prisma/client dotenv
|
|
589
|
+
|
|
590
|
+
# Install development dependencies (latest stable)
|
|
591
|
+
npm install -D @types/express @types/cors @types/bcrypt @types/jsonwebtoken
|
|
592
|
+
npm install -D typescript nodemon ts-node jest @types/jest prisma
|
|
593
|
+
|
|
594
|
+
# Update package.json scripts
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**Configure package.json scripts:**
|
|
598
|
+
|
|
599
|
+
```json
|
|
600
|
+
{
|
|
601
|
+
"scripts": {
|
|
602
|
+
"dev": "nodemon src/app.ts",
|
|
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
|
+
}
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
#### **Django (Python) Complete Setup:**
|
|
614
|
+
|
|
615
|
+
**Install latest stable dependencies:**
|
|
616
|
+
|
|
617
|
+
```bash
|
|
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
|
|
622
|
+
|
|
623
|
+
# Create requirements.txt after installation
|
|
624
|
+
pip freeze > requirements.txt
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
**Create settings structure:**
|
|
628
|
+
|
|
629
|
+
```
|
|
630
|
+
config/
|
|
631
|
+
├── __init__.py
|
|
632
|
+
├── settings/
|
|
633
|
+
│ ├── __init__.py
|
|
634
|
+
│ ├── base.py
|
|
635
|
+
│ ├── development.py
|
|
636
|
+
│ └── production.py
|
|
637
|
+
├── urls.py
|
|
638
|
+
└── wsgi.py
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
#### **Spring Boot (Java) Complete Setup:**
|
|
642
|
+
|
|
643
|
+
**Create Spring Boot project with latest stable dependencies:**
|
|
644
|
+
|
|
645
|
+
```bash
|
|
646
|
+
# Use Spring Initializr or Spring Boot CLI for latest stable versions
|
|
647
|
+
spring init --dependencies=web,data-jpa,security,postgresql --build=maven .
|
|
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:**
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
# Create Laravel project with latest stable version
|
|
697
|
+
composer create-project laravel/laravel .
|
|
698
|
+
|
|
699
|
+
# Install additional packages (latest stable)
|
|
700
|
+
composer require laravel/sanctum
|
|
701
|
+
composer require --dev laravel/pint
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
**Create .env configuration:**
|
|
705
|
+
|
|
706
|
+
```env
|
|
707
|
+
DB_CONNECTION=pgsql
|
|
708
|
+
DB_HOST=127.0.0.1
|
|
709
|
+
DB_PORT=5432
|
|
710
|
+
DB_DATABASE=myapp_dev
|
|
711
|
+
DB_USERNAME=postgres
|
|
712
|
+
DB_PASSWORD=password
|
|
713
|
+
|
|
714
|
+
SANCTUM_STATEFUL_DOMAINS=localhost:3000
|
|
715
|
+
SESSION_DOMAIN=localhost
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
#### **Go (Gin Framework) Complete Setup:**
|
|
719
|
+
|
|
720
|
+
**Initialize Go module and install dependencies:**
|
|
721
|
+
|
|
722
|
+
```bash
|
|
723
|
+
# Initialize Go module
|
|
724
|
+
go mod init myapp
|
|
725
|
+
|
|
726
|
+
# Install latest stable dependencies
|
|
727
|
+
go get github.com/gin-gonic/gin
|
|
728
|
+
go get github.com/golang-jwt/jwt/v5
|
|
729
|
+
go get gorm.io/gorm
|
|
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
|
|
733
|
+
|
|
734
|
+
# Tidy dependencies
|
|
735
|
+
go mod tidy
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
**Generated go.mod will use latest compatible versions**
|
|
739
|
+
|
|
740
|
+
**Create basic structure:**
|
|
741
|
+
|
|
742
|
+
```
|
|
743
|
+
cmd/
|
|
744
|
+
├── server/
|
|
745
|
+
│ └── main.go
|
|
746
|
+
internal/
|
|
747
|
+
├── config/
|
|
748
|
+
├── handlers/
|
|
749
|
+
├── middleware/
|
|
750
|
+
├── models/
|
|
751
|
+
└── services/
|
|
752
|
+
pkg/
|
|
753
|
+
└── database/
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
#### **Ruby on Rails Complete Setup:**
|
|
757
|
+
|
|
758
|
+
**Create new Rails project and install dependencies:**
|
|
759
|
+
|
|
760
|
+
```bash
|
|
761
|
+
# Create new Rails API project
|
|
762
|
+
rails new myapp --api --skip-git --database=postgresql
|
|
763
|
+
|
|
764
|
+
# Navigate to project
|
|
765
|
+
cd myapp
|
|
766
|
+
|
|
767
|
+
# Install latest stable gems
|
|
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
|
|
774
|
+
|
|
775
|
+
# Install all dependencies
|
|
776
|
+
bundle install
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
**Generated Gemfile will use latest compatible versions**
|
|
780
|
+
|
|
781
|
+
#### **.NET Core Complete Setup:**
|
|
782
|
+
|
|
783
|
+
**Create project and install latest stable packages:**
|
|
784
|
+
|
|
785
|
+
```bash
|
|
786
|
+
# Create new Web API project
|
|
787
|
+
dotnet new webapi -n MyApp
|
|
788
|
+
cd MyApp
|
|
789
|
+
|
|
790
|
+
# Install latest stable Entity Framework packages
|
|
791
|
+
dotnet add package Microsoft.EntityFrameworkCore.Design
|
|
792
|
+
dotnet add package Microsoft.EntityFrameworkCore.Tools
|
|
793
|
+
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL
|
|
794
|
+
|
|
795
|
+
# Install latest authentication packages
|
|
796
|
+
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer
|
|
797
|
+
|
|
798
|
+
# Restore packages
|
|
799
|
+
dotnet restore
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
**IMPORTANT FOR ALL FRAMEWORKS:**
|
|
803
|
+
|
|
804
|
+
- **DO NOT create entity-specific controllers/routes** (users, products, orders, etc.)
|
|
805
|
+
- **Only create basic project structure with configurations**
|
|
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.)**
|
|
809
|
+
|
|
810
|
+
```
|
|
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
|
+
|
|
820
|
+
🎯 Project ready for development - entity-specific modules/controllers should be created during development phases
|
|
821
|
+
```
|
|
822
|
+
|
|
215
823
|
---
|
|
216
824
|
|
|
217
825
|
## 8.3: Generate Final Documentation
|
|
@@ -908,4 +1516,3 @@ Happy coding! 🚀
|
|
|
908
1516
|
|
|
909
1517
|
**SUCCESS:** Project fully documented and ready for development! 🚀
|
|
910
1518
|
```
|
|
911
|
-
|