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.
- package/.gitattributes +6 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/ISSUE_TEMPLATE/pull_request_template.md +24 -0
- package/CHANGELOG.fr.md +97 -97
- package/CHANGELOG.md +98 -98
- package/CLI_USAGE.fr.md +331 -331
- package/CLI_USAGE.md +364 -364
- package/DEMO.fr.md +292 -292
- package/DEMO.md +294 -294
- package/LICENSE +21 -21
- package/MIGRATION_GUIDE.fr.md +127 -127
- package/MIGRATION_GUIDE.md +124 -124
- package/QUICK_START.fr.md +152 -152
- package/QUICK_START.md +169 -169
- package/README.fr.md +653 -659
- package/SECURITY.md +10 -0
- package/bin/nestcraft.js +84 -64
- package/commands/demo.js +333 -330
- package/commands/generate.js +93 -0
- package/commands/generateConf.js +91 -0
- package/commands/help.js +78 -78
- package/commands/info.js +48 -48
- package/commands/new.js +338 -335
- package/commands/start.js +19 -19
- package/commands/test.js +7 -7
- package/package.json +41 -41
- package/readme.md +638 -643
- package/utils/cliParser.js +133 -76
- package/utils/colors.js +62 -62
- package/utils/configs/configureDocker.js +120 -120
- package/utils/configs/setupCleanArchitecture.js +563 -557
- package/utils/configs/setupLightArchitecture.js +701 -660
- package/utils/envGenerator.js +122 -122
- package/utils/file-utils/packageJsonUtils.js +49 -55
- package/utils/file-utils/saveProjectConfig.js +36 -0
- package/utils/fullModeInput.js +607 -607
- package/utils/generators/application/dtoUpdater.js +54 -0
- package/utils/generators/cleanModuleGenerator.js +475 -0
- package/utils/generators/database/setupDatabase.js +31 -0
- package/utils/generators/domain/entityUpdater.js +78 -0
- package/utils/generators/infrastructure/mapperUpdater.js +65 -0
- package/utils/generators/lightModuleGenerator.js +131 -0
- package/utils/generators/relation/relation.engine.js +64 -0
- package/utils/interactive/askEntityInputs.js +165 -0
- package/utils/lightModeInput.js +460 -460
- package/utils/loggers/logError.js +7 -7
- package/utils/loggers/logInfo.js +7 -7
- package/utils/loggers/logSuccess.js +7 -7
- package/utils/loggers/logWarning.js +7 -7
- package/utils/setups/orms/typeOrmSetup.js +630 -630
- package/utils/setups/projectSetup.js +46 -46
- package/utils/setups/setupAuth.js +973 -926
- package/utils/setups/setupDatabase.js +75 -75
- package/utils/setups/setupLogger.js +69 -59
- package/utils/setups/setupMongoose.js +377 -432
- package/utils/setups/setupPrisma.js +802 -630
- package/utils/setups/setupSwagger.js +97 -88
- package/utils/shell.js +32 -32
- package/utils/spinner.js +57 -57
- package/utils/systemCheck.js +124 -124
- package/utils/userInput.js +421 -421
- package/utils/utils.js +2197 -1762
package/QUICK_START.fr.md
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
# Quick Start - NestCraftX v0.2.
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm install -g nestcraftx
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Utilisation Rapide
|
|
10
|
-
|
|
11
|
-
### Option 1 : Mode LIGHT avec flags (Le plus rapide)
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
nestcraftx new mon-api --light --orm=prisma --auth --swagger
|
|
15
|
-
cd mon-api
|
|
16
|
-
npm run start:dev
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Resultat : Projet genere en quelques secondes avec :
|
|
20
|
-
|
|
21
|
-
- Architecture MVP simplifiee
|
|
22
|
-
- Prisma ORM
|
|
23
|
-
- Authentification JWT
|
|
24
|
-
- Documentation Swagger
|
|
25
|
-
- Fichier .env avec secrets auto-generes
|
|
26
|
-
|
|
27
|
-
### Option 2 : Mode LIGHT interactif
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
nestcraftx new mon-api --light
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Le CLI vous posera des questions pour :
|
|
34
|
-
|
|
35
|
-
- Choisir l'ORM
|
|
36
|
-
- Activer Auth/Swagger/Docker
|
|
37
|
-
- Configurer la base de donnees
|
|
38
|
-
- Ajouter des entites (optionnel)
|
|
39
|
-
|
|
40
|
-
### Option 3 : Mode FULL interactif
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
nestcraftx new mon-projet
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Configuration complete avec :
|
|
47
|
-
|
|
48
|
-
- Clean Architecture + DDD
|
|
49
|
-
- Use-cases, mappers, adapters
|
|
50
|
-
- Configuration interactive detaillee
|
|
51
|
-
- Entites et relations
|
|
52
|
-
|
|
53
|
-
## Commandes Essentielles
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
# Creer un projet
|
|
57
|
-
nestcraftx new <nom> [options]
|
|
58
|
-
|
|
59
|
-
# Mode LIGHT
|
|
60
|
-
nestcraftx new api --light --orm=prisma
|
|
61
|
-
|
|
62
|
-
# Mode FULL
|
|
63
|
-
nestcraftx new app --full
|
|
64
|
-
|
|
65
|
-
# Verifier environnement
|
|
66
|
-
nestcraftx test
|
|
67
|
-
|
|
68
|
-
# Infos CLI
|
|
69
|
-
nestcraftx info
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Options Principales
|
|
73
|
-
|
|
74
|
-
| Option | Description | Valeurs |
|
|
75
|
-
| --------------- | ------------------------------------------------------------- | --------------------------------------------- |
|
|
76
|
-
| `--light` | Architecture MVP simplifiee | - |
|
|
77
|
-
| `--full` | Architecture complete (defaut) | - |
|
|
78
|
-
| `--orm` | Choix de l'ORM | `prisma`, `typeorm`, `mongoose (coming soon)` |
|
|
79
|
-
| `--auth` | Active JWT auth | - |
|
|
80
|
-
| `--swagger` | Active Swagger docs | - |
|
|
81
|
-
| `--docker` | Genere Docker files | `true` (defaut), `false` |
|
|
82
|
-
| `--interactive` | Force le mode interactif pour la saisie des entités/relations |
|
|
83
|
-
|
|
84
|
-
## Exemples Pratiques
|
|
85
|
-
|
|
86
|
-
### Blog API (LIGHT + Prisma)
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
nestcraftx new blog-api --light --orm=prisma --auth --swagger
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### E-commerce API (FULL + TypeORM)
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
nestcraftx new shop-api --full --orm=typeorm --auth --swagger
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### MongoDB API (LIGHT + Mongoose)
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
nestcraftx new mongo-api --light --orm=mongoose --auth
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Apres Generation
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
cd <nom-projet>
|
|
108
|
-
npm run start:dev
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Swagger disponible :** `http://localhost:3000/api/docs`
|
|
112
|
-
|
|
113
|
-
## Differences Modes
|
|
114
|
-
|
|
115
|
-
### Mode LIGHT
|
|
116
|
-
|
|
117
|
-
- Structure plate
|
|
118
|
-
- Controllers → Services → Repositories
|
|
119
|
-
- Demarrage rapide
|
|
120
|
-
- Parfait pour MVPs
|
|
121
|
-
|
|
122
|
-
### Mode FULL
|
|
123
|
-
|
|
124
|
-
- Clean Architecture complete
|
|
125
|
-
- Domain/Application/Infrastructure/Presentation
|
|
126
|
-
- Use-cases et mappers
|
|
127
|
-
- Ideal pour projets complexes
|
|
128
|
-
|
|
129
|
-
## Fichier .env Auto-genere
|
|
130
|
-
|
|
131
|
-
Le CLI genere automatiquement :
|
|
132
|
-
|
|
133
|
-
- `JWT_SECRET` (64 chars securises)
|
|
134
|
-
- `JWT_REFRESH_SECRET` (64 chars securises)
|
|
135
|
-
- `DATABASE_URL` (pre-configure)
|
|
136
|
-
- Toutes les variables necessaires
|
|
137
|
-
|
|
138
|
-
## Documentation Complete
|
|
139
|
-
|
|
140
|
-
- [Guide d'utilisation complet](./CLI_USAGE.md)
|
|
141
|
-
- [Guide de migration](./MIGRATION_GUIDE.md)
|
|
142
|
-
- [Changelog](./CHANGELOG.md)
|
|
143
|
-
- [README](./readme.md)
|
|
144
|
-
|
|
145
|
-
## Support
|
|
146
|
-
|
|
147
|
-
- GitHub : [NestCraftX](https://github.com/august-dev-pro/NestCraftX)
|
|
148
|
-
- Issues : [Ouvrir une issue](https://github.com/august-dev-pro/NestCraftX/issues)
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
**NestCraftX v0.2.
|
|
1
|
+
# Quick Start - NestCraftX v0.2.5
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g nestcraftx
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Utilisation Rapide
|
|
10
|
+
|
|
11
|
+
### Option 1 : Mode LIGHT avec flags (Le plus rapide)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
nestcraftx new mon-api --light --orm=prisma --auth --swagger
|
|
15
|
+
cd mon-api
|
|
16
|
+
npm run start:dev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Resultat : Projet genere en quelques secondes avec :
|
|
20
|
+
|
|
21
|
+
- Architecture MVP simplifiee
|
|
22
|
+
- Prisma ORM
|
|
23
|
+
- Authentification JWT
|
|
24
|
+
- Documentation Swagger
|
|
25
|
+
- Fichier .env avec secrets auto-generes
|
|
26
|
+
|
|
27
|
+
### Option 2 : Mode LIGHT interactif
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
nestcraftx new mon-api --light
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Le CLI vous posera des questions pour :
|
|
34
|
+
|
|
35
|
+
- Choisir l'ORM
|
|
36
|
+
- Activer Auth/Swagger/Docker
|
|
37
|
+
- Configurer la base de donnees
|
|
38
|
+
- Ajouter des entites (optionnel)
|
|
39
|
+
|
|
40
|
+
### Option 3 : Mode FULL interactif
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
nestcraftx new mon-projet
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Configuration complete avec :
|
|
47
|
+
|
|
48
|
+
- Clean Architecture + DDD
|
|
49
|
+
- Use-cases, mappers, adapters
|
|
50
|
+
- Configuration interactive detaillee
|
|
51
|
+
- Entites et relations
|
|
52
|
+
|
|
53
|
+
## Commandes Essentielles
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Creer un projet
|
|
57
|
+
nestcraftx new <nom> [options]
|
|
58
|
+
|
|
59
|
+
# Mode LIGHT
|
|
60
|
+
nestcraftx new api --light --orm=prisma
|
|
61
|
+
|
|
62
|
+
# Mode FULL
|
|
63
|
+
nestcraftx new app --full
|
|
64
|
+
|
|
65
|
+
# Verifier environnement
|
|
66
|
+
nestcraftx test
|
|
67
|
+
|
|
68
|
+
# Infos CLI
|
|
69
|
+
nestcraftx info
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Options Principales
|
|
73
|
+
|
|
74
|
+
| Option | Description | Valeurs |
|
|
75
|
+
| --------------- | ------------------------------------------------------------- | --------------------------------------------- |
|
|
76
|
+
| `--light` | Architecture MVP simplifiee | - |
|
|
77
|
+
| `--full` | Architecture complete (defaut) | - |
|
|
78
|
+
| `--orm` | Choix de l'ORM | `prisma`, `typeorm`, `mongoose (coming soon)` |
|
|
79
|
+
| `--auth` | Active JWT auth | - |
|
|
80
|
+
| `--swagger` | Active Swagger docs | - |
|
|
81
|
+
| `--docker` | Genere Docker files | `true` (defaut), `false` |
|
|
82
|
+
| `--interactive` | Force le mode interactif pour la saisie des entités/relations |
|
|
83
|
+
|
|
84
|
+
## Exemples Pratiques
|
|
85
|
+
|
|
86
|
+
### Blog API (LIGHT + Prisma)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
nestcraftx new blog-api --light --orm=prisma --auth --swagger
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### E-commerce API (FULL + TypeORM)
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
nestcraftx new shop-api --full --orm=typeorm --auth --swagger
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### MongoDB API (LIGHT + Mongoose)
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
nestcraftx new mongo-api --light --orm=mongoose --auth
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Apres Generation
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd <nom-projet>
|
|
108
|
+
npm run start:dev
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Swagger disponible :** `http://localhost:3000/api/docs`
|
|
112
|
+
|
|
113
|
+
## Differences Modes
|
|
114
|
+
|
|
115
|
+
### Mode LIGHT
|
|
116
|
+
|
|
117
|
+
- Structure plate
|
|
118
|
+
- Controllers → Services → Repositories
|
|
119
|
+
- Demarrage rapide
|
|
120
|
+
- Parfait pour MVPs
|
|
121
|
+
|
|
122
|
+
### Mode FULL
|
|
123
|
+
|
|
124
|
+
- Clean Architecture complete
|
|
125
|
+
- Domain/Application/Infrastructure/Presentation
|
|
126
|
+
- Use-cases et mappers
|
|
127
|
+
- Ideal pour projets complexes
|
|
128
|
+
|
|
129
|
+
## Fichier .env Auto-genere
|
|
130
|
+
|
|
131
|
+
Le CLI genere automatiquement :
|
|
132
|
+
|
|
133
|
+
- `JWT_SECRET` (64 chars securises)
|
|
134
|
+
- `JWT_REFRESH_SECRET` (64 chars securises)
|
|
135
|
+
- `DATABASE_URL` (pre-configure)
|
|
136
|
+
- Toutes les variables necessaires
|
|
137
|
+
|
|
138
|
+
## Documentation Complete
|
|
139
|
+
|
|
140
|
+
- [Guide d'utilisation complet](./CLI_USAGE.md)
|
|
141
|
+
- [Guide de migration](./MIGRATION_GUIDE.md)
|
|
142
|
+
- [Changelog](./CHANGELOG.md)
|
|
143
|
+
- [README](./readme.md)
|
|
144
|
+
|
|
145
|
+
## Support
|
|
146
|
+
|
|
147
|
+
- GitHub : [NestCraftX](https://github.com/august-dev-pro/NestCraftX)
|
|
148
|
+
- Issues : [Ouvrir une issue](https://github.com/august-dev-pro/NestCraftX/issues)
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
**NestCraftX v0.2.5** - Clean Architecture Made Simple
|
package/QUICK_START.md
CHANGED
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
# Quick Start - NestCraftX v0.2.
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm install -g nestcraftx
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## Quick Start
|
|
11
|
-
|
|
12
|
-
### Option 1: LIGHT Mode with flags (Fastest)
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
nestcraftx new my-api --light --orm=prisma --auth --swagger
|
|
16
|
-
cd my-api
|
|
17
|
-
npm run start:dev
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Result: Project generated in seconds with:
|
|
22
|
-
|
|
23
|
-
- Simplified MVP Architecture
|
|
24
|
-
- Prisma ORM
|
|
25
|
-
- JWT Authentication
|
|
26
|
-
- Swagger Documentation
|
|
27
|
-
- `.env` file with auto-generated secrets
|
|
28
|
-
|
|
29
|
-
### Option 2: Interactive LIGHT Mode
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
nestcraftx new my-api --light
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The CLI will ask you questions to:
|
|
37
|
-
|
|
38
|
-
- Choose the ORM
|
|
39
|
-
- Enable Auth/Swagger/Docker
|
|
40
|
-
- Configure the database
|
|
41
|
-
- Add entities (optional)
|
|
42
|
-
|
|
43
|
-
### Option 3: Interactive FULL Mode
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
nestcraftx new my-project
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Complete configuration with:
|
|
51
|
-
|
|
52
|
-
- Clean Architecture + DDD
|
|
53
|
-
- Use-cases, mappers, adapters
|
|
54
|
-
- Detailed interactive setup
|
|
55
|
-
- Entities and relationships
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Essential Commands
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# Create a project
|
|
63
|
-
nestcraftx new <name> [options]
|
|
64
|
-
|
|
65
|
-
# LIGHT Mode
|
|
66
|
-
nestcraftx new api --light --orm=prisma
|
|
67
|
-
|
|
68
|
-
# FULL Mode
|
|
69
|
-
nestcraftx new app --full
|
|
70
|
-
|
|
71
|
-
# Check environment
|
|
72
|
-
nestcraftx test
|
|
73
|
-
|
|
74
|
-
# CLI Info
|
|
75
|
-
nestcraftx info
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Main Options
|
|
80
|
-
|
|
81
|
-
| Option | Description | Values |
|
|
82
|
-
| --------------- | ------------------------------------------------------- | --------------------------------------------- |
|
|
83
|
-
| `--light` | Simplified MVP architecture | - |
|
|
84
|
-
| `--full` | Complete architecture (default) | - |
|
|
85
|
-
| `--orm` | Choice of ORM | `prisma`, `typeorm`, `mongoose (coming soon)` |
|
|
86
|
-
| `--auth` | Enables JWT auth | - |
|
|
87
|
-
| `--swagger` | Enables Swagger docs | - |
|
|
88
|
-
| `--docker` | Generates Docker files | `true` (default), `false` |
|
|
89
|
-
| `--interactive` | Force interactive mode for entities/relationships input | - |
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Practical Examples
|
|
94
|
-
|
|
95
|
-
### Blog API (LIGHT + Prisma)
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
nestcraftx new blog-api --light --orm=prisma --auth --swagger
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### E-commerce API (FULL + TypeORM)
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
nestcraftx new shop-api --full --orm=typeorm --auth --swagger
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### MongoDB API (LIGHT + Mongoose)
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
nestcraftx new mongo-api --light --orm=mongoose --auth
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## After Generation
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
cd <project-name>
|
|
122
|
-
npm run start:dev
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Swagger available at:** `http://localhost:3000/api/docs`
|
|
127
|
-
|
|
128
|
-
## Mode Differences
|
|
129
|
-
|
|
130
|
-
### LIGHT Mode
|
|
131
|
-
|
|
132
|
-
- Flat structure
|
|
133
|
-
- Controllers → Services → Repositories
|
|
134
|
-
- Fast startup
|
|
135
|
-
- Perfect for MVPs
|
|
136
|
-
|
|
137
|
-
### FULL Mode
|
|
138
|
-
|
|
139
|
-
- Complete Clean Architecture
|
|
140
|
-
- Domain/Application/Infrastructure/Presentation layers
|
|
141
|
-
- Use-cases and mappers
|
|
142
|
-
- Ideal for complex projects
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Auto-generated .env File
|
|
147
|
-
|
|
148
|
-
The CLI automatically generates:
|
|
149
|
-
|
|
150
|
-
- `JWT_SECRET` (64 secure chars)
|
|
151
|
-
- `JWT_REFRESH_SECRET` (64 secure chars)
|
|
152
|
-
- `DATABASE_URL` (pre-configured)
|
|
153
|
-
- All necessary environment variables
|
|
154
|
-
|
|
155
|
-
## Complete Documentation
|
|
156
|
-
|
|
157
|
-
- [Full User Guide](https://www.google.com/search?q=./CLI_USAGE.md)
|
|
158
|
-
- [Migration Guide](https://www.google.com/search?q=./MIGRATION_GUIDE.md)
|
|
159
|
-
- [Changelog](https://www.google.com/search?q=./CHANGELOG.md)
|
|
160
|
-
- [README](https://www.google.com/search?q=./readme.md)
|
|
161
|
-
|
|
162
|
-
## Support
|
|
163
|
-
|
|
164
|
-
- GitHub: [NestCraftX](https://github.com/august-dev-pro/NestCraftX)
|
|
165
|
-
- Issues: [Open an issue](https://github.com/august-dev-pro/NestCraftX/issues)
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
**NestCraftX v0.2.
|
|
1
|
+
# Quick Start - NestCraftX v0.2.5
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g nestcraftx
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
### Option 1: LIGHT Mode with flags (Fastest)
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
nestcraftx new my-api --light --orm=prisma --auth --swagger
|
|
16
|
+
cd my-api
|
|
17
|
+
npm run start:dev
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Result: Project generated in seconds with:
|
|
22
|
+
|
|
23
|
+
- Simplified MVP Architecture
|
|
24
|
+
- Prisma ORM
|
|
25
|
+
- JWT Authentication
|
|
26
|
+
- Swagger Documentation
|
|
27
|
+
- `.env` file with auto-generated secrets
|
|
28
|
+
|
|
29
|
+
### Option 2: Interactive LIGHT Mode
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
nestcraftx new my-api --light
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The CLI will ask you questions to:
|
|
37
|
+
|
|
38
|
+
- Choose the ORM
|
|
39
|
+
- Enable Auth/Swagger/Docker
|
|
40
|
+
- Configure the database
|
|
41
|
+
- Add entities (optional)
|
|
42
|
+
|
|
43
|
+
### Option 3: Interactive FULL Mode
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
nestcraftx new my-project
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Complete configuration with:
|
|
51
|
+
|
|
52
|
+
- Clean Architecture + DDD
|
|
53
|
+
- Use-cases, mappers, adapters
|
|
54
|
+
- Detailed interactive setup
|
|
55
|
+
- Entities and relationships
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Essential Commands
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Create a project
|
|
63
|
+
nestcraftx new <name> [options]
|
|
64
|
+
|
|
65
|
+
# LIGHT Mode
|
|
66
|
+
nestcraftx new api --light --orm=prisma
|
|
67
|
+
|
|
68
|
+
# FULL Mode
|
|
69
|
+
nestcraftx new app --full
|
|
70
|
+
|
|
71
|
+
# Check environment
|
|
72
|
+
nestcraftx test
|
|
73
|
+
|
|
74
|
+
# CLI Info
|
|
75
|
+
nestcraftx info
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Main Options
|
|
80
|
+
|
|
81
|
+
| Option | Description | Values |
|
|
82
|
+
| --------------- | ------------------------------------------------------- | --------------------------------------------- |
|
|
83
|
+
| `--light` | Simplified MVP architecture | - |
|
|
84
|
+
| `--full` | Complete architecture (default) | - |
|
|
85
|
+
| `--orm` | Choice of ORM | `prisma`, `typeorm`, `mongoose (coming soon)` |
|
|
86
|
+
| `--auth` | Enables JWT auth | - |
|
|
87
|
+
| `--swagger` | Enables Swagger docs | - |
|
|
88
|
+
| `--docker` | Generates Docker files | `true` (default), `false` |
|
|
89
|
+
| `--interactive` | Force interactive mode for entities/relationships input | - |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Practical Examples
|
|
94
|
+
|
|
95
|
+
### Blog API (LIGHT + Prisma)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
nestcraftx new blog-api --light --orm=prisma --auth --swagger
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### E-commerce API (FULL + TypeORM)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
nestcraftx new shop-api --full --orm=typeorm --auth --swagger
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### MongoDB API (LIGHT + Mongoose)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
nestcraftx new mongo-api --light --orm=mongoose --auth
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## After Generation
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
cd <project-name>
|
|
122
|
+
npm run start:dev
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Swagger available at:** `http://localhost:3000/api/docs`
|
|
127
|
+
|
|
128
|
+
## Mode Differences
|
|
129
|
+
|
|
130
|
+
### LIGHT Mode
|
|
131
|
+
|
|
132
|
+
- Flat structure
|
|
133
|
+
- Controllers → Services → Repositories
|
|
134
|
+
- Fast startup
|
|
135
|
+
- Perfect for MVPs
|
|
136
|
+
|
|
137
|
+
### FULL Mode
|
|
138
|
+
|
|
139
|
+
- Complete Clean Architecture
|
|
140
|
+
- Domain/Application/Infrastructure/Presentation layers
|
|
141
|
+
- Use-cases and mappers
|
|
142
|
+
- Ideal for complex projects
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Auto-generated .env File
|
|
147
|
+
|
|
148
|
+
The CLI automatically generates:
|
|
149
|
+
|
|
150
|
+
- `JWT_SECRET` (64 secure chars)
|
|
151
|
+
- `JWT_REFRESH_SECRET` (64 secure chars)
|
|
152
|
+
- `DATABASE_URL` (pre-configured)
|
|
153
|
+
- All necessary environment variables
|
|
154
|
+
|
|
155
|
+
## Complete Documentation
|
|
156
|
+
|
|
157
|
+
- [Full User Guide](https://www.google.com/search?q=./CLI_USAGE.md)
|
|
158
|
+
- [Migration Guide](https://www.google.com/search?q=./MIGRATION_GUIDE.md)
|
|
159
|
+
- [Changelog](https://www.google.com/search?q=./CHANGELOG.md)
|
|
160
|
+
- [README](https://www.google.com/search?q=./readme.md)
|
|
161
|
+
|
|
162
|
+
## Support
|
|
163
|
+
|
|
164
|
+
- GitHub: [NestCraftX](https://github.com/august-dev-pro/NestCraftX)
|
|
165
|
+
- Issues: [Open an issue](https://github.com/august-dev-pro/NestCraftX/issues)
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
**NestCraftX v0.2.5** - Clean Architecture Made Simple
|