@iconsulting-dev/forgekit 1.3.4 → 1.4.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 +32 -14
- package/dist/generators/frontend/index.d.ts.map +1 -1
- package/dist/generators/frontend/index.js +2 -1
- package/dist/generators/frontend/index.js.map +1 -1
- package/dist/templates/frontend/app.config.ts.hbs +3 -0
- package/dist/templates/frontend/app.routes.ts.hbs +1 -2
- package/dist/templates/frontend/home.component.ts.hbs +108 -0
- package/package.json +1 -1
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/frontend/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generators/frontend/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAkK1D,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -18,7 +18,7 @@ class FrontendGenerator extends BaseGenerator {
|
|
|
18
18
|
path.join(appDir, "layout/topbar"),
|
|
19
19
|
path.join(appDir, "shared/components"),
|
|
20
20
|
path.join(appDir, "shared/pipes"),
|
|
21
|
-
path.join(appDir, "features"),
|
|
21
|
+
path.join(appDir, "features/home"),
|
|
22
22
|
path.join(srcDir, "environments"),
|
|
23
23
|
];
|
|
24
24
|
if (this.config.auth) {
|
|
@@ -48,6 +48,7 @@ class FrontendGenerator extends BaseGenerator {
|
|
|
48
48
|
renderAndWrite("frontend/layout.component.ts.hbs", path.join(appDir, "layout/layout.component.ts"), data),
|
|
49
49
|
renderAndWrite("frontend/sidebar.component.ts.hbs", path.join(appDir, "layout/sidebar/sidebar.component.ts"), data),
|
|
50
50
|
renderAndWrite("frontend/topbar.component.ts.hbs", path.join(appDir, "layout/topbar/topbar.component.ts"), data),
|
|
51
|
+
renderAndWrite("frontend/home.component.ts.hbs", path.join(appDir, "features/home/home.component.ts"), data),
|
|
51
52
|
]);
|
|
52
53
|
if (this.config.auth) {
|
|
53
54
|
await Promise.all([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generators/frontend/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,E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ACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,UAAkB,EAClB,MAAqB,EACrB,QAA0B;IAE1B,MAAM,SAAS,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtE,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -6,8 +6,7 @@ export const routes: Routes = [
|
|
|
6
6
|
path: '',
|
|
7
7
|
component: LayoutComponent,
|
|
8
8
|
children: [
|
|
9
|
-
|
|
10
|
-
// { path: 'dashboard', loadComponent: () => import('./features/dashboard/dashboard.component').then(m => m.DashboardComponent) },
|
|
9
|
+
{ path: 'home', loadComponent: () => import('./features/home/home.component').then(m => m.HomeComponent) },
|
|
11
10
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
|
12
11
|
],
|
|
13
12
|
},
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-home',
|
|
5
|
+
standalone: true,
|
|
6
|
+
template: `
|
|
7
|
+
<div class="home">
|
|
8
|
+
<div class="welcome-card">
|
|
9
|
+
<div class="welcome-icon">
|
|
10
|
+
<i class="pi pi-bolt"></i>
|
|
11
|
+
</div>
|
|
12
|
+
<h1>Bienvenue sur {{name}}</h1>
|
|
13
|
+
<p>Votre application est prête. Commencez à construire vos fonctionnalités.</p>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="cards">
|
|
17
|
+
<div class="card">
|
|
18
|
+
<div class="card-icon">
|
|
19
|
+
<i class="pi pi-code"></i>
|
|
20
|
+
</div>
|
|
21
|
+
<h3>Composants</h3>
|
|
22
|
+
<p>Ajoutez vos composants dans <code>src/app/features/</code></p>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="card">
|
|
25
|
+
<div class="card-icon">
|
|
26
|
+
<i class="pi pi-sitemap"></i>
|
|
27
|
+
</div>
|
|
28
|
+
<h3>Routes</h3>
|
|
29
|
+
<p>Configurez vos routes dans <code>app.routes.ts</code></p>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="card">
|
|
32
|
+
<div class="card-icon">
|
|
33
|
+
<i class="pi pi-palette"></i>
|
|
34
|
+
</div>
|
|
35
|
+
<h3>PrimeNG</h3>
|
|
36
|
+
<p>Utilisez les composants PrimeNG pour votre interface</p>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
`,
|
|
41
|
+
styles: `
|
|
42
|
+
.home {
|
|
43
|
+
max-width: 900px;
|
|
44
|
+
margin: 0 auto;
|
|
45
|
+
}
|
|
46
|
+
.welcome-card {
|
|
47
|
+
text-align: center;
|
|
48
|
+
padding: 3rem 2rem;
|
|
49
|
+
background: var(--p-surface-0);
|
|
50
|
+
border-radius: var(--p-content-border-radius);
|
|
51
|
+
border: 1px solid var(--p-surface-200);
|
|
52
|
+
margin-bottom: 2rem;
|
|
53
|
+
}
|
|
54
|
+
.welcome-icon {
|
|
55
|
+
font-size: 3rem;
|
|
56
|
+
color: var(--p-primary-color);
|
|
57
|
+
margin-bottom: 1rem;
|
|
58
|
+
}
|
|
59
|
+
.welcome-card h1 {
|
|
60
|
+
margin: 0 0 0.5rem;
|
|
61
|
+
color: var(--p-text-color);
|
|
62
|
+
font-size: 1.75rem;
|
|
63
|
+
}
|
|
64
|
+
.welcome-card p {
|
|
65
|
+
margin: 0;
|
|
66
|
+
color: var(--p-text-muted-color);
|
|
67
|
+
font-size: 1.1rem;
|
|
68
|
+
}
|
|
69
|
+
.cards {
|
|
70
|
+
display: grid;
|
|
71
|
+
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
72
|
+
gap: 1.25rem;
|
|
73
|
+
}
|
|
74
|
+
.card {
|
|
75
|
+
background: var(--p-surface-0);
|
|
76
|
+
border: 1px solid var(--p-surface-200);
|
|
77
|
+
border-radius: var(--p-content-border-radius);
|
|
78
|
+
padding: 1.5rem;
|
|
79
|
+
transition: box-shadow 0.2s;
|
|
80
|
+
}
|
|
81
|
+
.card:hover {
|
|
82
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
83
|
+
}
|
|
84
|
+
.card-icon {
|
|
85
|
+
font-size: 1.5rem;
|
|
86
|
+
color: var(--p-primary-color);
|
|
87
|
+
margin-bottom: 0.75rem;
|
|
88
|
+
}
|
|
89
|
+
.card h3 {
|
|
90
|
+
margin: 0 0 0.5rem;
|
|
91
|
+
color: var(--p-text-color);
|
|
92
|
+
}
|
|
93
|
+
.card p {
|
|
94
|
+
margin: 0;
|
|
95
|
+
color: var(--p-text-muted-color);
|
|
96
|
+
font-size: 0.9rem;
|
|
97
|
+
line-height: 1.5;
|
|
98
|
+
}
|
|
99
|
+
.card code {
|
|
100
|
+
background: var(--p-surface-100);
|
|
101
|
+
padding: 0.15rem 0.4rem;
|
|
102
|
+
border-radius: 4px;
|
|
103
|
+
font-size: 0.85rem;
|
|
104
|
+
}
|
|
105
|
+
`,
|
|
106
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
107
|
+
})
|
|
108
|
+
export class HomeComponent {}
|