nestcraftx 0.2.4 → 0.2.6

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.
Files changed (63) hide show
  1. package/.gitattributes +6 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  4. package/.github/ISSUE_TEMPLATE/pull_request_template.md +24 -0
  5. package/CHANGELOG.fr.md +97 -97
  6. package/CHANGELOG.md +98 -98
  7. package/CLI_USAGE.fr.md +331 -331
  8. package/CLI_USAGE.md +364 -364
  9. package/DEMO.fr.md +292 -292
  10. package/DEMO.md +294 -294
  11. package/LICENSE +21 -21
  12. package/MIGRATION_GUIDE.fr.md +127 -127
  13. package/MIGRATION_GUIDE.md +124 -124
  14. package/QUICK_START.fr.md +152 -152
  15. package/QUICK_START.md +169 -169
  16. package/README.fr.md +653 -659
  17. package/SECURITY.md +10 -0
  18. package/bin/nestcraft.js +84 -64
  19. package/commands/demo.js +333 -330
  20. package/commands/generate.js +93 -0
  21. package/commands/generateConf.js +91 -0
  22. package/commands/help.js +78 -78
  23. package/commands/info.js +48 -48
  24. package/commands/new.js +338 -335
  25. package/commands/start.js +19 -19
  26. package/commands/test.js +7 -7
  27. package/package.json +41 -41
  28. package/readme.md +638 -643
  29. package/utils/cliParser.js +133 -76
  30. package/utils/colors.js +62 -62
  31. package/utils/configs/configureDocker.js +120 -120
  32. package/utils/configs/setupCleanArchitecture.js +563 -557
  33. package/utils/configs/setupLightArchitecture.js +701 -660
  34. package/utils/envGenerator.js +122 -122
  35. package/utils/file-utils/packageJsonUtils.js +49 -55
  36. package/utils/file-utils/saveProjectConfig.js +36 -0
  37. package/utils/fullModeInput.js +607 -607
  38. package/utils/generators/application/dtoUpdater.js +54 -0
  39. package/utils/generators/cleanModuleGenerator.js +475 -0
  40. package/utils/generators/database/setupDatabase.js +31 -0
  41. package/utils/generators/domain/entityUpdater.js +78 -0
  42. package/utils/generators/infrastructure/mapperUpdater.js +65 -0
  43. package/utils/generators/lightModuleGenerator.js +131 -0
  44. package/utils/generators/relation/relation.engine.js +64 -0
  45. package/utils/interactive/askEntityInputs.js +165 -0
  46. package/utils/lightModeInput.js +460 -460
  47. package/utils/loggers/logError.js +7 -7
  48. package/utils/loggers/logInfo.js +7 -7
  49. package/utils/loggers/logSuccess.js +7 -7
  50. package/utils/loggers/logWarning.js +7 -7
  51. package/utils/setups/orms/typeOrmSetup.js +630 -630
  52. package/utils/setups/projectSetup.js +46 -46
  53. package/utils/setups/setupAuth.js +973 -926
  54. package/utils/setups/setupDatabase.js +75 -75
  55. package/utils/setups/setupLogger.js +69 -59
  56. package/utils/setups/setupMongoose.js +377 -432
  57. package/utils/setups/setupPrisma.js +802 -630
  58. package/utils/setups/setupSwagger.js +97 -88
  59. package/utils/shell.js +32 -32
  60. package/utils/spinner.js +57 -57
  61. package/utils/systemCheck.js +124 -124
  62. package/utils/userInput.js +421 -421
  63. package/utils/utils.js +2197 -1762
@@ -1,127 +1,127 @@
1
- # Guide de Migration NestCraftX : v0.1.x → v0.2.4
2
-
3
- ## Vue d'ensemble
4
-
5
- La version **0.2.4** marque une étape majeure dans la maturité de NestCraftX. Nous passons d'un simple script de génération à un véritable outil CLI professionnel avec une expérience utilisateur (UX) totalement repensée.
6
-
7
- **Points clés de la mise à jour :**
8
-
9
- - **Nouvelle Interface :** Navigation par flèches avec `Inquirer.js` (plus de saisie manuelle).
10
- - **Gestionnaire de Paquets :** Support natif de `npm`, `yarn` et `pnpm`.
11
- - **Architecture Hybrid :** Choix entre le mode **LIGHT** (MVP) et **FULL** (Clean Architecture).
12
- - **Sécurité Renforcée :** Secrets JWT de 64 caractères auto-générés via `crypto.randomBytes`.
13
-
14
- ---
15
-
16
- ## 1. Changements de Syntaxe
17
-
18
- ### La commande `start` est dépréciée
19
-
20
- Bien que le mode interactif reste accessible pour la compatibilité, la commande sémantique recommandée est désormais `new`.
21
-
22
- - **Ancien (v0.1.x) :** `nestcraftx start`
23
- - **Nouveau (v0.2.4) :** `nestcraftx new mon-projet`
24
-
25
- ### Nouveaux Flags Professionnels
26
-
27
- Vous pouvez désormais tout configurer en une seule ligne sans répondre à une seule question :
28
-
29
- ```bash
30
- # Exemple : Un projet ultra-rapide avec pnpm et Prisma
31
- nestcraftx new mon-api --light --orm=prisma --pm=pnpm --auth --swagger
32
-
33
- ```
34
-
35
- ---
36
-
37
- ## 2. Comparaison des Architectures
38
-
39
- Le choix du mode impacte directement la structure de vos dossiers sous `src/`.
40
-
41
- ### Mode LIGHT (Nouveauté v0.2.0+)
42
-
43
- Idéal pour la rapidité et les prototypes. On élimine les mappers et les use-cases pour une communication directe.
44
-
45
- - **Structure :** `src/[entity]/[controllers|services|repositories|entities|dtos]`
46
- - **Flux :** `Controller` ➔ `Service` ➔ `Repository` ➔ `DB`
47
-
48
- ### Mode FULL (Standard Clean Code)
49
-
50
- C'est l'architecture robuste de la v0.1.x, mais affinée. Les services sont maintenant isolés dans la couche `application` pour respecter strictement les principes DDD.
51
-
52
- - **Structure :** Séparation en `domain`, `application`, `infrastructure` et `presentation`.
53
- - **Flux :** `Controller` ➔ `Use-Case` ➔ `Service` ➔ `Repository/Adapter` ➔ `DB`
54
-
55
- ---
56
-
57
- ## 3. Gestionnaire de Paquets (Nouveauté v0.2.4)
58
-
59
- Le flag `--pm` (ou `--packageManager`) vous permet de définir votre outil favori. Si vous ne le spécifiez pas, le CLI vous proposera une liste de choix interactive.
60
-
61
- | Outil | Flag | Commande d'installation lancée |
62
- | -------- | ----------- | ------------------------------ |
63
- | **npm** | `--pm=npm` | `npm install` |
64
- | **Yarn** | `--pm=yarn` | `yarn install` |
65
- | **pnpm** | `--pm=pnpm` | `pnpm install` |
66
-
67
- ---
68
-
69
- ## 4. Génération Automatique du .env
70
-
71
- Le système de génération de secrets a été renforcé pour utiliser des algorithmes cryptographiques plus sûrs.
72
-
73
- **Ancien comportement :** Saisie manuelle ou secrets courts.
74
- **Nouveau comportement (v0.2.4) :** - `JWT_SECRET` : 64 caractères hexadécimaux uniques.
75
-
76
- - `DATABASE_URL` : Auto-construit selon l'ORM choisi (Prisma/TypeORM/Mongoose).
77
-
78
- ---
79
-
80
- ## Checklist de Migration Rapide
81
-
82
- - [ ] **Mise à jour globale :** `npm install -g nestcraftx@latest`
83
- - [ ] **Vérification environnement :** Lancez `nestcraftx test` pour vérifier la présence de `pnpm` ou `yarn`.
84
- - [ ] **Test de la Démo :** Testez la nouvelle commande `nestcraftx demo --light` pour voir la nouvelle structure simplifiée.
85
- - [ ] **Secrets JWT :** Si vous migrez manuellement un ancien projet, générez un secret pro :
86
-
87
- ```bash
88
- node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
89
-
90
- ```
91
-
92
- ## FAQ de Migration
93
-
94
- **Q : Mes anciens projets vont-ils casser ?** R : Non. NestCraftX est un générateur de code. Une fois le code généré, il est indépendant. La mise à jour du CLI n'impacte que les _prochains_ projets que vous créerez.
95
-
96
- **Q : Pourquoi passer à Inquirer.js ?** R : Pour éviter les erreurs de frappe (ex: taper "prismm" au lieu de "prisma"). La sélection par liste avec les flèches du clavier est plus rapide et plus fiable.
97
-
98
- **Q : Comment choisir entre LIGHT et FULL ?** R :
99
-
100
- - Utilisez **LIGHT** pour des MVPs, des microservices simples ou si vous débutez.
101
- - Utilisez **FULL** pour des applications d'entreprise, des projets à longue durée de vie ou des architectures complexes.
102
-
103
- ## Support
104
-
105
- Si vous rencontrez des problemes lors de la migration :
106
-
107
- 1. Verifiez la documentation : `CLI_USAGE.md`
108
-
109
- 2. Consultez le changelog : `CHANGELOG.md`
110
-
111
- 3. Ouvrez une issue sur GitHub : https://github.com/august-dev-pro/NestCraftX/issues
112
-
113
- ## Ressources
114
-
115
- - [CLI Usage Guide](./CLI_USAGE.md)
116
-
117
- - [Changelog](./CHANGELOG.md)
118
-
119
- - [GitHub Repository](https://github.com/august-dev-pro/NestCratfX)
120
-
121
- ```
122
- Seriez-vous intéressé par un script d'automatisation pour mettre à jour vos variables d'environnement sur plusieurs serveurs ?
123
- ```
124
-
125
- ---
126
-
127
- **NestCraftX v0.2.4** — _Clean Architecture Made Simple._ [Accéder au Dépôt GitHub](https://github.com/august-dev-pro/NestCraftX)
1
+ # Guide de Migration NestCraftX : v0.1.x → v0.2.5
2
+
3
+ ## Vue d'ensemble
4
+
5
+ La version **0.2.5** marque une étape majeure dans la maturité de NestCraftX. Nous passons d'un simple script de génération à un véritable outil CLI professionnel avec une expérience utilisateur (UX) totalement repensée.
6
+
7
+ **Points clés de la mise à jour :**
8
+
9
+ - **Nouvelle Interface :** Navigation par flèches avec `Inquirer.js` (plus de saisie manuelle).
10
+ - **Gestionnaire de Paquets :** Support natif de `npm`, `yarn` et `pnpm`.
11
+ - **Architecture Hybrid :** Choix entre le mode **LIGHT** (MVP) et **FULL** (Clean Architecture).
12
+ - **Sécurité Renforcée :** Secrets JWT de 64 caractères auto-générés via `crypto.randomBytes`.
13
+
14
+ ---
15
+
16
+ ## 1. Changements de Syntaxe
17
+
18
+ ### La commande `start` est dépréciée
19
+
20
+ Bien que le mode interactif reste accessible pour la compatibilité, la commande sémantique recommandée est désormais `new`.
21
+
22
+ - **Ancien (v0.1.x) :** `nestcraftx start`
23
+ - **Nouveau (v0.2.5) :** `nestcraftx new mon-projet`
24
+
25
+ ### Nouveaux Flags Professionnels
26
+
27
+ Vous pouvez désormais tout configurer en une seule ligne sans répondre à une seule question :
28
+
29
+ ```bash
30
+ # Exemple : Un projet ultra-rapide avec pnpm et Prisma
31
+ nestcraftx new mon-api --light --orm=prisma --pm=pnpm --auth --swagger
32
+
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 2. Comparaison des Architectures
38
+
39
+ Le choix du mode impacte directement la structure de vos dossiers sous `src/`.
40
+
41
+ ### Mode LIGHT (Nouveauté v0.2.0+)
42
+
43
+ Idéal pour la rapidité et les prototypes. On élimine les mappers et les use-cases pour une communication directe.
44
+
45
+ - **Structure :** `src/[entity]/[controllers|services|repositories|entities|dtos]`
46
+ - **Flux :** `Controller` ➔ `Service` ➔ `Repository` ➔ `DB`
47
+
48
+ ### Mode FULL (Standard Clean Code)
49
+
50
+ C'est l'architecture robuste de la v0.1.x, mais affinée. Les services sont maintenant isolés dans la couche `application` pour respecter strictement les principes DDD.
51
+
52
+ - **Structure :** Séparation en `domain`, `application`, `infrastructure` et `presentation`.
53
+ - **Flux :** `Controller` ➔ `Use-Case` ➔ `Service` ➔ `Repository/Adapter` ➔ `DB`
54
+
55
+ ---
56
+
57
+ ## 3. Gestionnaire de Paquets (Nouveauté v0.2.5)
58
+
59
+ Le flag `--pm` (ou `--packageManager`) vous permet de définir votre outil favori. Si vous ne le spécifiez pas, le CLI vous proposera une liste de choix interactive.
60
+
61
+ | Outil | Flag | Commande d'installation lancée |
62
+ | -------- | ----------- | ------------------------------ |
63
+ | **npm** | `--pm=npm` | `npm install` |
64
+ | **Yarn** | `--pm=yarn` | `yarn install` |
65
+ | **pnpm** | `--pm=pnpm` | `pnpm install` |
66
+
67
+ ---
68
+
69
+ ## 4. Génération Automatique du .env
70
+
71
+ Le système de génération de secrets a été renforcé pour utiliser des algorithmes cryptographiques plus sûrs.
72
+
73
+ **Ancien comportement :** Saisie manuelle ou secrets courts.
74
+ **Nouveau comportement (v0.2.5) :** - `JWT_SECRET` : 64 caractères hexadécimaux uniques.
75
+
76
+ - `DATABASE_URL` : Auto-construit selon l'ORM choisi (Prisma/TypeORM/Mongoose).
77
+
78
+ ---
79
+
80
+ ## Checklist de Migration Rapide
81
+
82
+ - [ ] **Mise à jour globale :** `npm install -g nestcraftx@latest`
83
+ - [ ] **Vérification environnement :** Lancez `nestcraftx test` pour vérifier la présence de `pnpm` ou `yarn`.
84
+ - [ ] **Test de la Démo :** Testez la nouvelle commande `nestcraftx demo --light` pour voir la nouvelle structure simplifiée.
85
+ - [ ] **Secrets JWT :** Si vous migrez manuellement un ancien projet, générez un secret pro :
86
+
87
+ ```bash
88
+ node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
89
+
90
+ ```
91
+
92
+ ## FAQ de Migration
93
+
94
+ **Q : Mes anciens projets vont-ils casser ?** R : Non. NestCraftX est un générateur de code. Une fois le code généré, il est indépendant. La mise à jour du CLI n'impacte que les _prochains_ projets que vous créerez.
95
+
96
+ **Q : Pourquoi passer à Inquirer.js ?** R : Pour éviter les erreurs de frappe (ex: taper "prismm" au lieu de "prisma"). La sélection par liste avec les flèches du clavier est plus rapide et plus fiable.
97
+
98
+ **Q : Comment choisir entre LIGHT et FULL ?** R :
99
+
100
+ - Utilisez **LIGHT** pour des MVPs, des microservices simples ou si vous débutez.
101
+ - Utilisez **FULL** pour des applications d'entreprise, des projets à longue durée de vie ou des architectures complexes.
102
+
103
+ ## Support
104
+
105
+ Si vous rencontrez des problemes lors de la migration :
106
+
107
+ 1. Verifiez la documentation : `CLI_USAGE.md`
108
+
109
+ 2. Consultez le changelog : `CHANGELOG.md`
110
+
111
+ 3. Ouvrez une issue sur GitHub : https://github.com/august-dev-pro/NestCraftX/issues
112
+
113
+ ## Ressources
114
+
115
+ - [CLI Usage Guide](./CLI_USAGE.md)
116
+
117
+ - [Changelog](./CHANGELOG.md)
118
+
119
+ - [GitHub Repository](https://github.com/august-dev-pro/NestCratfX)
120
+
121
+ ```
122
+ Seriez-vous intéressé par un script d'automatisation pour mettre à jour vos variables d'environnement sur plusieurs serveurs ?
123
+ ```
124
+
125
+ ---
126
+
127
+ **NestCraftX v0.2.5** — _Clean Architecture Made Simple._ [Accéder au Dépôt GitHub](https://github.com/august-dev-pro/NestCraftX)
@@ -1,124 +1,124 @@
1
- # NestCraftX Migration Guide: v0.1.x → v0.2.4
2
-
3
- ## Overview
4
-
5
- Version **0.2.4** marks a major milestone in NestCraftX's maturity. We are moving from a simple generation script to a truly professional CLI tool with a completely redesigned User Experience (UX).
6
-
7
- **Update Key Points:**
8
-
9
- - **New Interface:** Arrow-key navigation using `Inquirer.js` (no more manual typing).
10
- - **Package Manager:** Native support for `npm`, `yarn`, and `pnpm`.
11
- - **Hybrid Architecture:** Choice between **LIGHT** mode (MVP) and **FULL** mode (Clean Architecture).
12
- - **Enhanced Security:** 64-character JWT secrets auto-generated via `crypto.randomBytes`.
13
-
14
- ---
15
-
16
- ## 1. Syntax Changes
17
-
18
- ### The `start` command is deprecated
19
-
20
- While interactive mode remains accessible for compatibility, the recommended semantic command is now `new`.
21
-
22
- - **Old (v0.1.x):** `nestcraftx start`
23
- - **New (v0.2.4):** `nestcraftx new my-project`
24
-
25
- ### New Professional Flags
26
-
27
- You can now configure everything in a single line without answering a single question:
28
-
29
- ```bash
30
- # Example: An ultra-fast project with pnpm and Prisma
31
- nestcraftx new my-api --light --orm=prisma --pm=pnpm --auth --swagger
32
-
33
- ```
34
-
35
- ---
36
-
37
- ## 2. Architecture Comparison
38
-
39
- The choice of mode directly impacts your folder structure under `src/`.
40
-
41
- ### LIGHT Mode (New in v0.2.0+)
42
-
43
- Ideal for speed and prototyping. We eliminate mappers and use-cases for direct communication.
44
-
45
- - **Structure:** `src/[entity]/[controllers|services|repositories|entities|dtos]`
46
- - **Flow:** `Controller` ➔ `Service` ➔ `Repository` ➔ `DB`
47
-
48
- ### FULL Mode (Clean Code Standard)
49
-
50
- This is the robust architecture from v0.1.x, but refined. Services are now isolated in the `application` layer to strictly follow DDD principles.
51
-
52
- - **Structure:** Separated into `domain`, `application`, `infrastructure`, and `presentation`.
53
- - **Flow:** `Controller` ➔ `Use-Case` ➔ `Service` ➔ `Repository/Adapter` ➔ `DB`
54
-
55
- ---
56
-
57
- ## 3. Package Manager (New in v0.2.4)
58
-
59
- The `--pm` (or `--packageManager`) flag allows you to define your favorite tool. If you don't specify it, the CLI will provide an interactive list of choices.
60
-
61
- | Tool | Flag | Installation command executed |
62
- | -------- | ----------- | ----------------------------- |
63
- | **npm** | `--pm=npm` | `npm install` |
64
- | **Yarn** | `--pm=yarn` | `yarn install` |
65
- | **pnpm** | `--pm=pnpm` | `pnpm install` |
66
-
67
- ---
68
-
69
- ## 4. Automatic .env Generation
70
-
71
- The secret generation system has been strengthened to use more secure cryptographic algorithms.
72
-
73
- **Old behavior:** Manual input or short secrets.
74
- **New behavior (v0.2.4):** - `JWT_SECRET`: 64 unique hexadecimal characters.
75
-
76
- - `DATABASE_URL`: Auto-built based on the chosen ORM (Prisma/TypeORM/Mongoose).
77
-
78
- ---
79
-
80
- ## Quick Migration Checklist
81
-
82
- - [ ] **Global Update:** `npm install -g nestcraftx@latest`
83
- - [ ] **Environment Check:** Run `nestcraftx test` to verify the presence of `pnpm` or `yarn`.
84
- - [ ] **Demo Test:** Try the new `nestcraftx demo --light` command to see the new simplified structure.
85
- - [ ] **JWT Secrets:** If you are manually migrating an old project, generate a professional secret:
86
-
87
- ```bash
88
- node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
89
-
90
- ```
91
-
92
- ## Migration FAQ
93
-
94
- **Q: Will my old projects break?** A: No. NestCraftX is a code generator. Once the code is generated, it is independent. Updating the CLI only impacts the _next_ projects you create.
95
-
96
- **Q: Why switch to Inquirer.js?** A: To avoid typos (e.g., typing "prismm" instead of "prisma"). List selection with arrow keys is faster and more reliable.
97
-
98
- **Q: How to choose between LIGHT and FULL?** A:
99
-
100
- - Use **LIGHT** for MVPs, simple microservices, or if you are a beginner.
101
- - Use **FULL** for enterprise applications, long-lived projects, or complex architectures.
102
-
103
- ## Support
104
-
105
- If you encounter issues during migration:
106
-
107
- 1. Check the documentation: `CLI_USAGE.md`
108
- 2. Consult the changelog: `CHANGELOG.md`
109
- 3. Open an issue on GitHub: [https://github.com/august-dev-pro/NestCraftX/issues](https://github.com/august-dev-pro/NestCraftX/issues)
110
-
111
- ## Resources
112
-
113
- - [CLI Usage Guide](https://www.google.com/search?q=./CLI_USAGE.md)
114
- - [Changelog](https://www.google.com/search?q=./CHANGELOG.md)
115
- - [GitHub Repository](https://github.com/august-dev-pro/NestCraftX)
116
-
117
- ```
118
- Would you be interested in an automation script to update your environment variables across multiple servers?
119
-
120
- ```
121
-
122
- ---
123
-
124
- **NestCraftX v0.2.4** — _Clean Architecture Made Simple._ [Access the GitHub Repository](https://github.com/august-dev-pro/NestCraftX)
1
+ # NestCraftX Migration Guide: v0.1.x → v0.2.5
2
+
3
+ ## Overview
4
+
5
+ Version **0.2.5** marks a major milestone in NestCraftX's maturity. We are moving from a simple generation script to a truly professional CLI tool with a completely redesigned User Experience (UX).
6
+
7
+ **Update Key Points:**
8
+
9
+ - **New Interface:** Arrow-key navigation using `Inquirer.js` (no more manual typing).
10
+ - **Package Manager:** Native support for `npm`, `yarn`, and `pnpm`.
11
+ - **Hybrid Architecture:** Choice between **LIGHT** mode (MVP) and **FULL** mode (Clean Architecture).
12
+ - **Enhanced Security:** 64-character JWT secrets auto-generated via `crypto.randomBytes`.
13
+
14
+ ---
15
+
16
+ ## 1. Syntax Changes
17
+
18
+ ### The `start` command is deprecated
19
+
20
+ While interactive mode remains accessible for compatibility, the recommended semantic command is now `new`.
21
+
22
+ - **Old (v0.1.x):** `nestcraftx start`
23
+ - **New (v0.2.5):** `nestcraftx new my-project`
24
+
25
+ ### New Professional Flags
26
+
27
+ You can now configure everything in a single line without answering a single question:
28
+
29
+ ```bash
30
+ # Example: An ultra-fast project with pnpm and Prisma
31
+ nestcraftx new my-api --light --orm=prisma --pm=pnpm --auth --swagger
32
+
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 2. Architecture Comparison
38
+
39
+ The choice of mode directly impacts your folder structure under `src/`.
40
+
41
+ ### LIGHT Mode (New in v0.2.0+)
42
+
43
+ Ideal for speed and prototyping. We eliminate mappers and use-cases for direct communication.
44
+
45
+ - **Structure:** `src/[entity]/[controllers|services|repositories|entities|dtos]`
46
+ - **Flow:** `Controller` ➔ `Service` ➔ `Repository` ➔ `DB`
47
+
48
+ ### FULL Mode (Clean Code Standard)
49
+
50
+ This is the robust architecture from v0.1.x, but refined. Services are now isolated in the `application` layer to strictly follow DDD principles.
51
+
52
+ - **Structure:** Separated into `domain`, `application`, `infrastructure`, and `presentation`.
53
+ - **Flow:** `Controller` ➔ `Use-Case` ➔ `Service` ➔ `Repository/Adapter` ➔ `DB`
54
+
55
+ ---
56
+
57
+ ## 3. Package Manager (New in v0.2.5)
58
+
59
+ The `--pm` (or `--packageManager`) flag allows you to define your favorite tool. If you don't specify it, the CLI will provide an interactive list of choices.
60
+
61
+ | Tool | Flag | Installation command executed |
62
+ | -------- | ----------- | ----------------------------- |
63
+ | **npm** | `--pm=npm` | `npm install` |
64
+ | **Yarn** | `--pm=yarn` | `yarn install` |
65
+ | **pnpm** | `--pm=pnpm` | `pnpm install` |
66
+
67
+ ---
68
+
69
+ ## 4. Automatic .env Generation
70
+
71
+ The secret generation system has been strengthened to use more secure cryptographic algorithms.
72
+
73
+ **Old behavior:** Manual input or short secrets.
74
+ **New behavior (v0.2.5):** - `JWT_SECRET`: 64 unique hexadecimal characters.
75
+
76
+ - `DATABASE_URL`: Auto-built based on the chosen ORM (Prisma/TypeORM/Mongoose).
77
+
78
+ ---
79
+
80
+ ## Quick Migration Checklist
81
+
82
+ - [ ] **Global Update:** `npm install -g nestcraftx@latest`
83
+ - [ ] **Environment Check:** Run `nestcraftx test` to verify the presence of `pnpm` or `yarn`.
84
+ - [ ] **Demo Test:** Try the new `nestcraftx demo --light` command to see the new simplified structure.
85
+ - [ ] **JWT Secrets:** If you are manually migrating an old project, generate a professional secret:
86
+
87
+ ```bash
88
+ node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
89
+
90
+ ```
91
+
92
+ ## Migration FAQ
93
+
94
+ **Q: Will my old projects break?** A: No. NestCraftX is a code generator. Once the code is generated, it is independent. Updating the CLI only impacts the _next_ projects you create.
95
+
96
+ **Q: Why switch to Inquirer.js?** A: To avoid typos (e.g., typing "prismm" instead of "prisma"). List selection with arrow keys is faster and more reliable.
97
+
98
+ **Q: How to choose between LIGHT and FULL?** A:
99
+
100
+ - Use **LIGHT** for MVPs, simple microservices, or if you are a beginner.
101
+ - Use **FULL** for enterprise applications, long-lived projects, or complex architectures.
102
+
103
+ ## Support
104
+
105
+ If you encounter issues during migration:
106
+
107
+ 1. Check the documentation: `CLI_USAGE.md`
108
+ 2. Consult the changelog: `CHANGELOG.md`
109
+ 3. Open an issue on GitHub: [https://github.com/august-dev-pro/NestCraftX/issues](https://github.com/august-dev-pro/NestCraftX/issues)
110
+
111
+ ## Resources
112
+
113
+ - [CLI Usage Guide](https://www.google.com/search?q=./CLI_USAGE.md)
114
+ - [Changelog](https://www.google.com/search?q=./CHANGELOG.md)
115
+ - [GitHub Repository](https://github.com/august-dev-pro/NestCraftX)
116
+
117
+ ```
118
+ Would you be interested in an automation script to update your environment variables across multiple servers?
119
+
120
+ ```
121
+
122
+ ---
123
+
124
+ **NestCraftX v0.2.5** — _Clean Architecture Made Simple._ [Access the GitHub Repository](https://github.com/august-dev-pro/NestCraftX)