@iconsulting-dev/forgekit 1.4.0 → 1.4.2
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
CHANGED
|
@@ -18,7 +18,7 @@ npm i -g @iconsulting-dev/forgekit
|
|
|
18
18
|
### Depuis les sources
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
git clone https://github.com/
|
|
21
|
+
git clone https://github.com/salimomrani/forgekit.git
|
|
22
22
|
cd forgekit
|
|
23
23
|
npm install
|
|
24
24
|
npm run build
|
|
@@ -40,6 +40,8 @@ Un wizard vous guide avec des valeurs par défaut modifiables :
|
|
|
40
40
|
? Group ID : (com.example)
|
|
41
41
|
? Description : (Mon application)
|
|
42
42
|
? Que voulez-vous générer ? (Backend + Frontend)
|
|
43
|
+
? Inclure l'authentification ? (Non)
|
|
44
|
+
? Configurer GitHub Actions CI ? (Oui)
|
|
43
45
|
? Configurer Docker Compose ? (Oui)
|
|
44
46
|
? Configurer Claude Code ? (Oui)
|
|
45
47
|
? Initialiser Git ? (Oui)
|
|
@@ -59,7 +61,9 @@ forgekit new mon-app --group com.salim --backend --frontend --docker --claude-co
|
|
|
59
61
|
| `--description <desc>` | Description du projet |
|
|
60
62
|
| `--backend` | Inclure le backend Spring Boot |
|
|
61
63
|
| `--frontend` | Inclure le frontend Angular |
|
|
64
|
+
| `--auth` | Inclure l'authentification (Spring Security + interceptors Angular) |
|
|
62
65
|
| `--docker` | Inclure Docker Compose |
|
|
66
|
+
| `--ci` | Inclure GitHub Actions CI |
|
|
63
67
|
| `--claude-code` | Inclure la config Claude Code |
|
|
64
68
|
| `--no-git` | Ne pas initialiser Git |
|
|
65
69
|
|
|
@@ -67,9 +71,10 @@ forgekit new mon-app --group com.salim --backend --frontend --docker --claude-co
|
|
|
67
71
|
|
|
68
72
|
```
|
|
69
73
|
mon-projet/
|
|
70
|
-
├── backend/ # Spring Boot 4.
|
|
74
|
+
├── backend/ # Spring Boot 4.x / Java 21
|
|
71
75
|
├── frontend/ # Angular 21 / PrimeNG 21
|
|
72
76
|
├── docker-compose.yml # PostgreSQL 17 + pgAdmin
|
|
77
|
+
├── .github/workflows/ # CI GitHub Actions
|
|
73
78
|
├── CLAUDE.md # Conventions Claude Code
|
|
74
79
|
├── .claude/settings.json # Permissions Claude Code
|
|
75
80
|
├── .gitignore
|
|
@@ -79,7 +84,9 @@ mon-projet/
|
|
|
79
84
|
### Backend — Spring Boot
|
|
80
85
|
|
|
81
86
|
**Dépendances incluses :**
|
|
82
|
-
Spring Web, Spring Data JPA, PostgreSQL, Spring
|
|
87
|
+
Spring Web, Spring Data JPA, PostgreSQL, Spring Validation, Lombok, MapStruct, SpringDoc OpenAPI, Flyway, Spring Actuator.
|
|
88
|
+
|
|
89
|
+
**Avec `--auth` :** Spring Security (CORS, CSRF disabled, stateless, JWT-ready).
|
|
83
90
|
|
|
84
91
|
**Structure :**
|
|
85
92
|
|
|
@@ -87,7 +94,7 @@ Spring Web, Spring Data JPA, PostgreSQL, Spring Security, Spring Validation, Lom
|
|
|
87
94
|
backend/src/main/java/com/{group}/{name}/
|
|
88
95
|
├── Application.java
|
|
89
96
|
├── config/
|
|
90
|
-
│ ├── SecurityConfig.java # CORS,
|
|
97
|
+
│ ├── SecurityConfig.java # (si --auth) CORS, stateless, JWT-ready
|
|
91
98
|
│ └── OpenApiConfig.java
|
|
92
99
|
├── shared/
|
|
93
100
|
│ ├── exception/
|
|
@@ -106,7 +113,7 @@ backend/src/main/java/com/{group}/{name}/
|
|
|
106
113
|
### Frontend — Angular
|
|
107
114
|
|
|
108
115
|
**Dépendances incluses :**
|
|
109
|
-
Angular (dernière version), PrimeNG (thème Aura), PrimeIcons, PrimeFlex, NgRx SignalStore.
|
|
116
|
+
Angular (dernière version), PrimeNG (thème Aura via `@primeuix/themes`), PrimeIcons, PrimeFlex, NgRx SignalStore.
|
|
110
117
|
|
|
111
118
|
**Structure :**
|
|
112
119
|
|
|
@@ -114,25 +121,28 @@ Angular (dernière version), PrimeNG (thème Aura), PrimeIcons, PrimeFlex, NgRx
|
|
|
114
121
|
frontend/src/app/
|
|
115
122
|
├── app.component.ts # Standalone, OnPush
|
|
116
123
|
├── app.routes.ts # Routes lazy-loaded
|
|
117
|
-
├── app.config.ts # Providers
|
|
124
|
+
├── app.config.ts # Providers (PrimeNG Aura, HttpClient, Router)
|
|
118
125
|
├── layout/
|
|
119
126
|
│ ├── layout.component.ts # Shell (sidebar + topbar + router-outlet)
|
|
120
127
|
│ ├── sidebar/
|
|
121
128
|
│ └── topbar/
|
|
122
|
-
├── core/
|
|
129
|
+
├── core/ # (si --auth)
|
|
123
130
|
│ ├── interceptors/ # Auth + Error interceptors
|
|
124
131
|
│ ├── guards/ # Auth guard
|
|
125
132
|
│ └── services/ # Auth service (signals)
|
|
126
133
|
├── shared/ # Composants et pipes réutilisables
|
|
127
|
-
└── features/
|
|
134
|
+
└── features/
|
|
135
|
+
└── home/ # Page d'accueil par défaut
|
|
128
136
|
```
|
|
129
137
|
|
|
130
138
|
**Prêt à l'emploi :**
|
|
131
|
-
- Layout sidebar/topbar fonctionnel
|
|
132
|
-
-
|
|
133
|
-
-
|
|
139
|
+
- Layout sidebar/topbar fonctionnel avec design tokens PrimeNG v20+
|
|
140
|
+
- Page d'accueil avec cards de démarrage
|
|
141
|
+
- Thème Aura PrimeNG appliqué via `providePrimeNG`
|
|
142
|
+
- PrimeIcons intégrés
|
|
134
143
|
- NgRx SignalStore prêt par feature
|
|
135
144
|
- Standalone components, signals, `@if`/`@for`, OnPush
|
|
145
|
+
- **Avec `--auth` :** Intercepteurs HTTP + guard + AuthService câblés
|
|
136
146
|
|
|
137
147
|
### Docker Compose
|
|
138
148
|
|
|
@@ -164,6 +174,14 @@ cd backend && ./mvnw spring-boot:run
|
|
|
164
174
|
cd frontend && npm install && ng serve
|
|
165
175
|
```
|
|
166
176
|
|
|
177
|
+
## Versions dynamiques
|
|
178
|
+
|
|
179
|
+
ForgeKit résout automatiquement les dernières versions stables depuis npm et Maven Central au moment de la génération :
|
|
180
|
+
- Angular, PrimeNG, @primeuix/themes, NgRx Signals, RxJS, TypeScript, zone.js
|
|
181
|
+
- Spring Boot, SpringDoc, MapStruct
|
|
182
|
+
|
|
183
|
+
Des versions fallback sont utilisées si la résolution échoue.
|
|
184
|
+
|
|
167
185
|
## Config persistante
|
|
168
186
|
|
|
169
187
|
ForgeKit retient vos préférences dans `~/.forgekit/config.json` (Group ID, etc.) pour les réutiliser automatiquement.
|
|
@@ -182,12 +200,12 @@ src/
|
|
|
182
200
|
│ ├── claude-code/index.ts # ClaudeCodeGenerator
|
|
183
201
|
│ ├── root/index.ts # RootGenerator (README + .gitignore)
|
|
184
202
|
│ └── git.ts # Initialisation Git
|
|
185
|
-
├── templates/ #
|
|
203
|
+
├── templates/ # 41 templates Handlebars (.hbs)
|
|
186
204
|
│ ├── backend/ # 14 templates
|
|
187
|
-
│ ├── frontend/ #
|
|
205
|
+
│ ├── frontend/ # 21 templates
|
|
188
206
|
│ ├── docker/ # 1 template
|
|
189
207
|
│ ├── claude-code/ # 2 templates
|
|
190
|
-
│ └── root/ # 2 templates
|
|
208
|
+
│ └── root/ # 2 templates + 1 CI
|
|
191
209
|
├── utils/
|
|
192
210
|
│ ├── template-engine.ts # Handlebars compile + render
|
|
193
211
|
│ └── validation.ts # Validation inputs
|
|
@@ -29,13 +29,13 @@ class ClaudeCodeGenerator extends BaseGenerator {
|
|
|
29
29
|
buildAllowedCommands() {
|
|
30
30
|
const commands = [];
|
|
31
31
|
if (this.config.backend) {
|
|
32
|
-
commands.push("
|
|
32
|
+
commands.push("Bash(./mvnw spring-boot:run)", "Bash(./mvnw test)", "Bash(./mvnw package)", "Bash(./mvnw clean)");
|
|
33
33
|
}
|
|
34
34
|
if (this.config.frontend) {
|
|
35
|
-
commands.push("
|
|
35
|
+
commands.push("Bash(ng serve)", "Bash(ng build)", "Bash(ng test)", "Bash(ng generate)", "Bash(npm install)", "Bash(npm run)");
|
|
36
36
|
}
|
|
37
37
|
if (this.config.docker) {
|
|
38
|
-
commands.push("
|
|
38
|
+
commands.push("Bash(docker compose up)", "Bash(docker compose down)", "Bash(docker compose ps)");
|
|
39
39
|
}
|
|
40
40
|
return commands;
|
|
41
41
|
}
|