@atlashub/smartstack-cli 1.11.0 → 1.13.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/.documentation/agents.html +7 -2
- package/.documentation/apex.html +7 -2
- package/.documentation/business-analyse.html +7 -2
- package/.documentation/cli-commands.html +871 -0
- package/.documentation/commands.html +7 -2
- package/.documentation/efcore.html +7 -2
- package/.documentation/gitflow.html +7 -2
- package/.documentation/hooks.html +7 -2
- package/.documentation/index.html +7 -2
- package/.documentation/init.html +7 -2
- package/.documentation/installation.html +7 -2
- package/.documentation/ralph-loop.html +7 -2
- package/.documentation/test-web.html +7 -2
- package/dist/index.js +1932 -336
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/templates/agents/efcore/squash.md +67 -31
- package/templates/agents/gitflow/finish.md +68 -56
- package/templates/commands/business-analyse/0-orchestrate.md +72 -556
- package/templates/commands/business-analyse/1-init.md +23 -193
- package/templates/commands/business-analyse/2-discover.md +85 -462
- package/templates/commands/business-analyse/3-analyse.md +40 -342
- package/templates/commands/business-analyse/4-specify.md +72 -537
- package/templates/commands/business-analyse/5-validate.md +43 -237
- package/templates/commands/business-analyse/6-handoff.md +93 -682
- package/templates/commands/business-analyse/7-doc-html.md +45 -544
- package/templates/commands/business-analyse/_shared.md +176 -0
- package/templates/commands/business-analyse/bug.md +50 -257
- package/templates/commands/business-analyse/change-request.md +59 -283
- package/templates/commands/business-analyse/hotfix.md +36 -120
- package/templates/commands/business-analyse.md +55 -574
- package/templates/commands/efcore/_shared.md +206 -0
- package/templates/commands/efcore/conflicts.md +39 -201
- package/templates/commands/efcore/db-deploy.md +28 -237
- package/templates/commands/efcore/db-reset.md +41 -390
- package/templates/commands/efcore/db-seed.md +44 -323
- package/templates/commands/efcore/db-status.md +31 -210
- package/templates/commands/efcore/migration.md +45 -368
- package/templates/commands/efcore/rebase-snapshot.md +38 -241
- package/templates/commands/efcore/scan.md +35 -204
- package/templates/commands/efcore/squash.md +158 -251
- package/templates/commands/efcore.md +49 -177
- package/templates/commands/gitflow/1-init.md +94 -1318
- package/templates/commands/gitflow/10-start.md +86 -990
- package/templates/commands/gitflow/11-finish.md +264 -454
- package/templates/commands/gitflow/12-cleanup.md +40 -213
- package/templates/commands/gitflow/2-status.md +51 -386
- package/templates/commands/gitflow/3-commit.md +108 -801
- package/templates/commands/gitflow/4-plan.md +42 -13
- package/templates/commands/gitflow/5-exec.md +60 -5
- package/templates/commands/gitflow/6-abort.md +54 -277
- package/templates/commands/gitflow/7-pull-request.md +74 -717
- package/templates/commands/gitflow/8-review.md +51 -178
- package/templates/commands/gitflow/9-merge.md +74 -404
- package/templates/commands/gitflow/_shared.md +196 -0
- package/templates/commands/quickstart.md +154 -0
- package/templates/commands/ralph-loop/ralph-loop.md +104 -2
- package/templates/hooks/hooks.json +13 -0
- package/templates/hooks/ralph-mcp-logger.sh +46 -0
- package/templates/hooks/ralph-session-end.sh +69 -0
- package/templates/ralph/README.md +91 -0
- package/templates/ralph/ralph.config.yaml +113 -0
- package/templates/scripts/setup-ralph-loop.sh +173 -0
- package/templates/skills/_shared.md +117 -0
- package/templates/skills/ai-prompt/SKILL.md +87 -654
- package/templates/skills/application/SKILL.md +76 -499
- package/templates/skills/controller/SKILL.md +38 -165
- package/templates/skills/documentation/SKILL.md +2 -1
- package/templates/skills/feature-full/SKILL.md +107 -732
- package/templates/skills/notification/SKILL.md +85 -474
- package/templates/skills/ui-components/SKILL.md +62 -762
- package/templates/skills/workflow/SKILL.md +85 -489
- package/templates/commands/gitflow/rescue.md +0 -867
- package/templates/skills/business-analyse/SKILL.md +0 -191
|
@@ -4,599 +4,100 @@ agent: ba-doc-html
|
|
|
4
4
|
model: sonnet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Phase 7: Documentation HTML (React)
|
|
7
|
+
# Phase 7: Documentation HTML (React)
|
|
8
8
|
|
|
9
|
-
> **
|
|
10
|
-
> **
|
|
11
|
-
> **Output:** Composant React dans le module business: `pages/business/{app}/{module}/DocumentationPage.tsx`
|
|
9
|
+
> **Ref:** Fonctions communes dans [_shared.md](_shared.md)
|
|
10
|
+
> **Templates React:** [templates-react.md](../skills/business-analyse/templates-react.md)
|
|
12
11
|
|
|
13
12
|
---
|
|
14
13
|
|
|
15
|
-
##
|
|
14
|
+
## Objectif
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
+==============================================================================+
|
|
19
|
-
| DOCUMENTATION FRD INTÉGRÉE AU MODULE BUSINESS |
|
|
20
|
-
+==============================================================================+
|
|
21
|
-
| |
|
|
22
|
-
| La documentation est un ONGLET/TAB dans chaque module business: |
|
|
23
|
-
| |
|
|
24
|
-
| /business/{application}/{module} |
|
|
25
|
-
| ├── (index) → Page principale du module |
|
|
26
|
-
| ├── /list → Liste des entités |
|
|
27
|
-
| ├── /create → Création |
|
|
28
|
-
| ├── /:id → Détail |
|
|
29
|
-
| └── /documentation → 📄 Documentation FRD (CETTE PAGE) |
|
|
30
|
-
| |
|
|
31
|
-
| AVANTAGE: L'utilisateur accède à la doc depuis le module qu'il utilise |
|
|
32
|
-
| |
|
|
33
|
-
+==============================================================================+
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## CONTEXT7 - UTILISATION OBLIGATOIRE
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
+==============================================================================+
|
|
42
|
-
| GÉNÉRATION REACT AVEC CONTEXT7 |
|
|
43
|
-
+==============================================================================+
|
|
44
|
-
| |
|
|
45
|
-
| Pour CHAQUE composant React généré, utiliser: |
|
|
46
|
-
| |
|
|
47
|
-
| "use context7 with /facebook/react and /i18next/react-i18next |
|
|
48
|
-
| to generate {component} following SmartStack documentation patterns" |
|
|
49
|
-
| |
|
|
50
|
-
| Libraries à référencer: |
|
|
51
|
-
| • /facebook/react - React 19 patterns, hooks |
|
|
52
|
-
| • /i18next/react-i18next - useTranslation, Trans |
|
|
53
|
-
| • /remix-run/react-router - Link, useParams, useNavigate |
|
|
54
|
-
| • /lucide-icons/lucide-react - Icons cohérents |
|
|
55
|
-
| |
|
|
56
|
-
+==============================================================================+
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## STEP 1: Charger les documents
|
|
16
|
+
Documentation FRD intégrée comme ONGLET dans chaque module business:
|
|
62
17
|
|
|
63
|
-
```bash
|
|
64
|
-
FEATURE_ID=$1
|
|
65
|
-
FEATURE_DIR=$(find .business-analyse -type d -name "${FEATURE_ID}*" | head -1)
|
|
66
|
-
FRD_FILE="$FEATURE_DIR/3-functional-specification.md"
|
|
67
|
-
HANDOFF_FILE="$FEATURE_DIR/4-development-handoff.md"
|
|
68
|
-
|
|
69
|
-
# Extraire les informations
|
|
70
|
-
APPLICATION=$(echo $FEATURE_DIR | grep -oP 'business/\K[^/]+')
|
|
71
|
-
MODULE=$(echo $FEATURE_DIR | grep -oP 'modules/\K[^/]+')
|
|
72
|
-
FEATURE_NAME=$(echo $FEATURE_DIR | grep -oP 'FEAT-\d+-\K.*')
|
|
73
|
-
|
|
74
|
-
# Paths de sortie - DANS LE MODULE BUSINESS (pas dans /docs)
|
|
75
|
-
WEB_DIR="web/smartstack-web/src"
|
|
76
|
-
MODULE_DIR="$WEB_DIR/pages/business/$APPLICATION/$MODULE"
|
|
77
|
-
I18N_DIR="$WEB_DIR/i18n/locales"
|
|
78
18
|
```
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## STEP 2: Analyser le FRD pour extraction
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
# Extraire les données structurées du FRD
|
|
86
|
-
echo "Extraction des données du FRD..."
|
|
87
|
-
|
|
88
|
-
# Cas d'utilisation
|
|
89
|
-
USE_CASES=$(grep -oP 'UC-\d+.*' "$FRD_FILE" | head -10)
|
|
90
|
-
|
|
91
|
-
# Règles métier liées
|
|
92
|
-
BUSINESS_RULES=$(grep -oP 'BR-\d+' "$FRD_FILE" | sort -u)
|
|
93
|
-
|
|
94
|
-
# Permissions
|
|
95
|
-
PERMISSIONS=$(grep -oP 'business\.[a-z.]+' "$FRD_FILE" | sort -u)
|
|
96
|
-
|
|
97
|
-
# Endpoints API
|
|
98
|
-
ENDPOINTS=$(grep -oP '/api/business/[a-z/{}]+' "$FRD_FILE" | sort -u)
|
|
19
|
+
/business/{app}/{module}/documentation → 📄 Documentation FRD
|
|
99
20
|
```
|
|
100
21
|
|
|
101
22
|
---
|
|
102
23
|
|
|
103
|
-
##
|
|
24
|
+
## Prérequis
|
|
104
25
|
|
|
105
26
|
```bash
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if [ ! -d "$MODULE_DIR" ]; then
|
|
110
|
-
echo "⚠️ Module $APPLICATION/$MODULE non implémenté"
|
|
111
|
-
echo " Exécutez d'abord: /implement $FEATURE_ID"
|
|
27
|
+
find_feature_dir "$1" || exit 1
|
|
28
|
+
[ -d "$WEB_DIR/pages/business/$APPLICATION/$MODULE" ] || {
|
|
29
|
+
echo "⚠️ Module non implémenté - /implement $FEATURE_ID d'abord"
|
|
112
30
|
exit 1
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
# Vérifier si DocumentationPage existe déjà
|
|
116
|
-
if [ -f "$MODULE_DIR/DocumentationPage.tsx" ]; then
|
|
117
|
-
echo "📄 DocumentationPage existe - mise à jour"
|
|
118
|
-
else
|
|
119
|
-
echo "📄 Création de DocumentationPage"
|
|
120
|
-
fi
|
|
31
|
+
}
|
|
121
32
|
```
|
|
122
33
|
|
|
123
34
|
---
|
|
124
35
|
|
|
125
|
-
##
|
|
126
|
-
|
|
127
|
-
**Utiliser Context7 pour génération:**
|
|
36
|
+
## Context7 obligatoire
|
|
128
37
|
|
|
129
38
|
```
|
|
130
39
|
use context7 with /facebook/react and /i18next/react-i18next
|
|
131
|
-
to generate
|
|
132
|
-
following SmartStack patterns with:
|
|
133
|
-
- Back link to module main page
|
|
134
|
-
- Table of contents (sticky sidebar)
|
|
135
|
-
- Overview section
|
|
136
|
-
- Use cases section with actors
|
|
137
|
-
- Business rules section
|
|
138
|
-
- Permissions matrix
|
|
139
|
-
- API endpoints table
|
|
140
|
-
- Version and last update info
|
|
40
|
+
to generate DocumentationPage component following SmartStack patterns
|
|
141
41
|
```
|
|
142
42
|
|
|
143
|
-
|
|
43
|
+
Libraries: `/facebook/react`, `/i18next/react-i18next`, `/remix-run/react-router`, `/lucide-icons/lucide-react`
|
|
144
44
|
|
|
145
|
-
|
|
146
|
-
// web/smartstack-web/src/pages/business/{app}/{module}/DocumentationPage.tsx
|
|
147
|
-
// GÉNÉRÉ AVEC CONTEXT7: /facebook/react, /i18next/react-i18next
|
|
45
|
+
---
|
|
148
46
|
|
|
149
|
-
|
|
150
|
-
import { useTranslation } from 'react-i18next';
|
|
151
|
-
import {
|
|
152
|
-
FileText,
|
|
153
|
-
Users,
|
|
154
|
-
Shield,
|
|
155
|
-
CheckCircle,
|
|
156
|
-
ArrowLeft,
|
|
157
|
-
List,
|
|
158
|
-
Code,
|
|
159
|
-
BookOpen,
|
|
160
|
-
Hash
|
|
161
|
-
} from 'lucide-react';
|
|
47
|
+
## Structure DocumentationPage.tsx
|
|
162
48
|
|
|
163
|
-
|
|
49
|
+
```tsx
|
|
50
|
+
// pages/business/{app}/{module}/DocumentationPage.tsx
|
|
164
51
|
const frdData = {
|
|
165
52
|
featureId: '{FEATURE_ID}',
|
|
166
53
|
version: '1.0',
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
'{OBJECTIVE 1}',
|
|
173
|
-
'{OBJECTIVE 2}'
|
|
174
|
-
]
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
useCases: [
|
|
178
|
-
{
|
|
179
|
-
id: 'UC-001',
|
|
180
|
-
title: '{Title}',
|
|
181
|
-
actor: '{Actor}',
|
|
182
|
-
description: '{Description}',
|
|
183
|
-
preconditions: ['{PRE}'],
|
|
184
|
-
postconditions: ['{POST}'],
|
|
185
|
-
steps: ['{STEP 1}', '{STEP 2}']
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
|
|
189
|
-
businessRules: [
|
|
190
|
-
{
|
|
191
|
-
id: 'BR-001',
|
|
192
|
-
title: '{Title}',
|
|
193
|
-
category: '{Category}',
|
|
194
|
-
description: '{Description}',
|
|
195
|
-
priority: 'Must'
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
|
|
199
|
-
permissions: [
|
|
200
|
-
{
|
|
201
|
-
key: 'business.{app}.{module}.read',
|
|
202
|
-
description: '{Description}',
|
|
203
|
-
roles: ['Admin', 'Manager']
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
|
|
207
|
-
endpoints: [
|
|
208
|
-
{
|
|
209
|
-
method: 'GET',
|
|
210
|
-
path: '/api/business/{app}/{module}',
|
|
211
|
-
description: '{Description}',
|
|
212
|
-
permission: 'business.{app}.{module}.read'
|
|
213
|
-
}
|
|
214
|
-
]
|
|
54
|
+
overview: { description: '', objectives: [] },
|
|
55
|
+
useCases: [{ id: 'UC-001', title: '', actor: '', steps: [] }],
|
|
56
|
+
businessRules: [{ id: 'BR-001', title: '', category: '', priority: 'Must' }],
|
|
57
|
+
permissions: [{ key: 'business.{app}.{module}.read', roles: [] }],
|
|
58
|
+
endpoints: [{ method: 'GET', path: '/api/business/{app}/{module}', permission: '' }]
|
|
215
59
|
};
|
|
216
60
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return (
|
|
221
|
-
<div className="flex gap-8">
|
|
222
|
-
{/* Sidebar - Table of Contents */}
|
|
223
|
-
<aside className="hidden lg:block w-64 shrink-0">
|
|
224
|
-
<nav className="sticky top-24 space-y-2">
|
|
225
|
-
<h3 className="font-semibold text-sm text-[var(--text-secondary)] uppercase tracking-wide mb-4">
|
|
226
|
-
{t('documentation.toc')}
|
|
227
|
-
</h3>
|
|
228
|
-
<a href="#overview" className="block py-1 text-sm hover:text-[var(--color-primary-600)]">
|
|
229
|
-
{t('documentation.sections.overview')}
|
|
230
|
-
</a>
|
|
231
|
-
<a href="#use-cases" className="block py-1 text-sm hover:text-[var(--color-primary-600)]">
|
|
232
|
-
{t('documentation.sections.useCases')}
|
|
233
|
-
</a>
|
|
234
|
-
<a href="#business-rules" className="block py-1 text-sm hover:text-[var(--color-primary-600)]">
|
|
235
|
-
{t('documentation.sections.businessRules')}
|
|
236
|
-
</a>
|
|
237
|
-
<a href="#permissions" className="block py-1 text-sm hover:text-[var(--color-primary-600)]">
|
|
238
|
-
{t('documentation.sections.permissions')}
|
|
239
|
-
</a>
|
|
240
|
-
<a href="#api" className="block py-1 text-sm hover:text-[var(--color-primary-600)]">
|
|
241
|
-
{t('documentation.sections.api')}
|
|
242
|
-
</a>
|
|
243
|
-
</nav>
|
|
244
|
-
</aside>
|
|
245
|
-
|
|
246
|
-
{/* Main Content */}
|
|
247
|
-
<main className="flex-1 max-w-4xl">
|
|
248
|
-
{/* Back Link */}
|
|
249
|
-
<Link
|
|
250
|
-
to="/business/{app}/{module}"
|
|
251
|
-
className="inline-flex items-center gap-2 text-sm text-[var(--text-secondary)] hover:text-[var(--color-primary-600)] mb-6"
|
|
252
|
-
>
|
|
253
|
-
<ArrowLeft className="w-4 h-4" />
|
|
254
|
-
{t('documentation.backToModule')}
|
|
255
|
-
</Link>
|
|
256
|
-
|
|
257
|
-
{/* Header */}
|
|
258
|
-
<header className="mb-8">
|
|
259
|
-
<div className="flex items-center gap-3 mb-2">
|
|
260
|
-
<BookOpen className="w-8 h-8 text-[var(--color-primary-600)]" />
|
|
261
|
-
<h1 className="text-3xl font-bold">{t('documentation.title')}</h1>
|
|
262
|
-
</div>
|
|
263
|
-
<p className="text-[var(--text-secondary)]">
|
|
264
|
-
{t('documentation.subtitle')}
|
|
265
|
-
</p>
|
|
266
|
-
<div className="flex gap-4 mt-4 text-sm text-[var(--text-tertiary)]">
|
|
267
|
-
<span>Version {frdData.version}</span>
|
|
268
|
-
<span>•</span>
|
|
269
|
-
<span>{t('documentation.lastUpdated')}: {frdData.lastUpdated}</span>
|
|
270
|
-
</div>
|
|
271
|
-
</header>
|
|
272
|
-
|
|
273
|
-
{/* Overview Section */}
|
|
274
|
-
<section id="overview" className="mb-12">
|
|
275
|
-
<h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
|
|
276
|
-
<Hash className="w-5 h-5 text-[var(--color-primary-600)]" />
|
|
277
|
-
{t('documentation.sections.overview')}
|
|
278
|
-
</h2>
|
|
279
|
-
<div className="card p-6">
|
|
280
|
-
<p className="mb-4">{frdData.overview.description}</p>
|
|
281
|
-
<h4 className="font-medium mb-2">{t('documentation.objectives')}</h4>
|
|
282
|
-
<ul className="list-disc list-inside space-y-1 text-[var(--text-secondary)]">
|
|
283
|
-
{frdData.overview.objectives.map((obj, i) => (
|
|
284
|
-
<li key={i}>{obj}</li>
|
|
285
|
-
))}
|
|
286
|
-
</ul>
|
|
287
|
-
</div>
|
|
288
|
-
</section>
|
|
289
|
-
|
|
290
|
-
{/* Use Cases Section */}
|
|
291
|
-
<section id="use-cases" className="mb-12">
|
|
292
|
-
<h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
|
|
293
|
-
<Users className="w-5 h-5 text-[var(--color-primary-600)]" />
|
|
294
|
-
{t('documentation.sections.useCases')}
|
|
295
|
-
</h2>
|
|
296
|
-
<div className="space-y-4">
|
|
297
|
-
{frdData.useCases.map((uc) => (
|
|
298
|
-
<div key={uc.id} className="card p-6">
|
|
299
|
-
<div className="flex items-center gap-2 mb-2">
|
|
300
|
-
<span className="px-2 py-1 text-xs font-mono bg-[var(--color-primary-100)] text-[var(--color-primary-700)] rounded">
|
|
301
|
-
{uc.id}
|
|
302
|
-
</span>
|
|
303
|
-
<h3 className="font-semibold">{uc.title}</h3>
|
|
304
|
-
</div>
|
|
305
|
-
<p className="text-[var(--text-secondary)] mb-4">{uc.description}</p>
|
|
306
|
-
<div className="grid grid-cols-2 gap-4 text-sm">
|
|
307
|
-
<div>
|
|
308
|
-
<span className="font-medium">{t('documentation.labels.actor')}:</span>
|
|
309
|
-
<span className="ml-2">{uc.actor}</span>
|
|
310
|
-
</div>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
))}
|
|
314
|
-
</div>
|
|
315
|
-
</section>
|
|
316
|
-
|
|
317
|
-
{/* Business Rules Section */}
|
|
318
|
-
<section id="business-rules" className="mb-12">
|
|
319
|
-
<h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
|
|
320
|
-
<CheckCircle className="w-5 h-5 text-[var(--color-primary-600)]" />
|
|
321
|
-
{t('documentation.sections.businessRules')}
|
|
322
|
-
</h2>
|
|
323
|
-
<div className="overflow-x-auto">
|
|
324
|
-
<table className="w-full text-sm">
|
|
325
|
-
<thead>
|
|
326
|
-
<tr className="border-b border-[var(--border-color)]">
|
|
327
|
-
<th className="text-left py-3 px-4">ID</th>
|
|
328
|
-
<th className="text-left py-3 px-4">{t('documentation.labels.rule')}</th>
|
|
329
|
-
<th className="text-left py-3 px-4">{t('documentation.labels.category')}</th>
|
|
330
|
-
<th className="text-left py-3 px-4">{t('documentation.labels.priority')}</th>
|
|
331
|
-
</tr>
|
|
332
|
-
</thead>
|
|
333
|
-
<tbody>
|
|
334
|
-
{frdData.businessRules.map((br) => (
|
|
335
|
-
<tr key={br.id} className="border-b border-[var(--border-color)]">
|
|
336
|
-
<td className="py-3 px-4 font-mono text-xs">{br.id}</td>
|
|
337
|
-
<td className="py-3 px-4">{br.title}</td>
|
|
338
|
-
<td className="py-3 px-4">{br.category}</td>
|
|
339
|
-
<td className="py-3 px-4">
|
|
340
|
-
<span className={`px-2 py-1 rounded text-xs ${
|
|
341
|
-
br.priority === 'Must' ? 'bg-red-100 text-red-700' :
|
|
342
|
-
br.priority === 'Should' ? 'bg-yellow-100 text-yellow-700' :
|
|
343
|
-
'bg-gray-100 text-gray-700'
|
|
344
|
-
}`}>
|
|
345
|
-
{br.priority}
|
|
346
|
-
</span>
|
|
347
|
-
</td>
|
|
348
|
-
</tr>
|
|
349
|
-
))}
|
|
350
|
-
</tbody>
|
|
351
|
-
</table>
|
|
352
|
-
</div>
|
|
353
|
-
</section>
|
|
354
|
-
|
|
355
|
-
{/* Permissions Section */}
|
|
356
|
-
<section id="permissions" className="mb-12">
|
|
357
|
-
<h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
|
|
358
|
-
<Shield className="w-5 h-5 text-[var(--color-primary-600)]" />
|
|
359
|
-
{t('documentation.sections.permissions')}
|
|
360
|
-
</h2>
|
|
361
|
-
<div className="overflow-x-auto">
|
|
362
|
-
<table className="w-full text-sm">
|
|
363
|
-
<thead>
|
|
364
|
-
<tr className="border-b border-[var(--border-color)]">
|
|
365
|
-
<th className="text-left py-3 px-4">{t('documentation.labels.permission')}</th>
|
|
366
|
-
<th className="text-left py-3 px-4">Description</th>
|
|
367
|
-
<th className="text-left py-3 px-4">Roles</th>
|
|
368
|
-
</tr>
|
|
369
|
-
</thead>
|
|
370
|
-
<tbody>
|
|
371
|
-
{frdData.permissions.map((perm) => (
|
|
372
|
-
<tr key={perm.key} className="border-b border-[var(--border-color)]">
|
|
373
|
-
<td className="py-3 px-4 font-mono text-xs">{perm.key}</td>
|
|
374
|
-
<td className="py-3 px-4">{perm.description}</td>
|
|
375
|
-
<td className="py-3 px-4">
|
|
376
|
-
<div className="flex gap-1">
|
|
377
|
-
{perm.roles.map((role) => (
|
|
378
|
-
<span key={role} className="px-2 py-1 bg-[var(--bg-secondary)] rounded text-xs">
|
|
379
|
-
{role}
|
|
380
|
-
</span>
|
|
381
|
-
))}
|
|
382
|
-
</div>
|
|
383
|
-
</td>
|
|
384
|
-
</tr>
|
|
385
|
-
))}
|
|
386
|
-
</tbody>
|
|
387
|
-
</table>
|
|
388
|
-
</div>
|
|
389
|
-
</section>
|
|
390
|
-
|
|
391
|
-
{/* API Endpoints Section */}
|
|
392
|
-
<section id="api" className="mb-12">
|
|
393
|
-
<h2 className="text-xl font-semibold mb-4 flex items-center gap-2">
|
|
394
|
-
<Code className="w-5 h-5 text-[var(--color-primary-600)]" />
|
|
395
|
-
{t('documentation.sections.api')}
|
|
396
|
-
</h2>
|
|
397
|
-
<div className="space-y-3">
|
|
398
|
-
{frdData.endpoints.map((ep, i) => (
|
|
399
|
-
<div key={i} className="card p-4">
|
|
400
|
-
<div className="flex items-center gap-3">
|
|
401
|
-
<span className={`px-2 py-1 text-xs font-bold rounded ${
|
|
402
|
-
ep.method === 'GET' ? 'bg-green-100 text-green-700' :
|
|
403
|
-
ep.method === 'POST' ? 'bg-blue-100 text-blue-700' :
|
|
404
|
-
ep.method === 'PUT' ? 'bg-yellow-100 text-yellow-700' :
|
|
405
|
-
ep.method === 'DELETE' ? 'bg-red-100 text-red-700' :
|
|
406
|
-
'bg-gray-100 text-gray-700'
|
|
407
|
-
}`}>
|
|
408
|
-
{ep.method}
|
|
409
|
-
</span>
|
|
410
|
-
<code className="text-sm">{ep.path}</code>
|
|
411
|
-
</div>
|
|
412
|
-
<p className="text-sm text-[var(--text-secondary)] mt-2">{ep.description}</p>
|
|
413
|
-
<p className="text-xs text-[var(--text-tertiary)] mt-1">
|
|
414
|
-
{t('documentation.labels.permission')}: <code>{ep.permission}</code>
|
|
415
|
-
</p>
|
|
416
|
-
</div>
|
|
417
|
-
))}
|
|
418
|
-
</div>
|
|
419
|
-
</section>
|
|
420
|
-
</main>
|
|
421
|
-
</div>
|
|
422
|
-
);
|
|
423
|
-
}
|
|
61
|
+
// Sections: Overview, Use Cases, Business Rules, Permissions, API Endpoints
|
|
62
|
+
// Sidebar: Table of Contents (sticky)
|
|
63
|
+
// Back link: "/business/{app}/{module}"
|
|
424
64
|
```
|
|
425
65
|
|
|
426
66
|
---
|
|
427
67
|
|
|
428
|
-
##
|
|
68
|
+
## i18n (4 langues)
|
|
429
69
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
```json
|
|
435
|
-
{
|
|
436
|
-
"documentation": {
|
|
437
|
-
"title": "Documentation fonctionnelle",
|
|
438
|
-
"subtitle": "Spécifications du module {Module}",
|
|
439
|
-
"backToModule": "Retour au module",
|
|
440
|
-
"lastUpdated": "Dernière mise à jour",
|
|
441
|
-
"toc": "Table des matières",
|
|
442
|
-
"objectives": "Objectifs",
|
|
443
|
-
|
|
444
|
-
"sections": {
|
|
445
|
-
"overview": "Vue d'ensemble",
|
|
446
|
-
"useCases": "Cas d'utilisation",
|
|
447
|
-
"businessRules": "Règles métier",
|
|
448
|
-
"permissions": "Permissions",
|
|
449
|
-
"api": "API Endpoints"
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
"labels": {
|
|
453
|
-
"actor": "Acteur",
|
|
454
|
-
"rule": "Règle",
|
|
455
|
-
"category": "Catégorie",
|
|
456
|
-
"priority": "Priorité",
|
|
457
|
-
"permission": "Permission"
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
| Langue | Fichier |
|
|
464
|
-
|--------|---------|
|
|
465
|
-
| FR | `fr/{app}-{module}.json` |
|
|
466
|
-
| EN | `en/{app}-{module}.json` |
|
|
467
|
-
| IT | `it/{app}-{module}.json` |
|
|
468
|
-
| DE | `de/{app}-{module}.json` |
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
## STEP 6: Mettre à jour App.tsx
|
|
473
|
-
|
|
474
|
-
Ajouter la route dans le groupe du module business:
|
|
475
|
-
|
|
476
|
-
```tsx
|
|
477
|
-
{/* Business context routes */}
|
|
478
|
-
<Route path="/business" element={<BusinessLayout />}>
|
|
479
|
-
{/* {Application} */}
|
|
480
|
-
<Route path="{app}/{module}" element={<{Module}IndexPage />} />
|
|
481
|
-
<Route path="{app}/{module}/list" element={<{Module}ListPage />} />
|
|
482
|
-
<Route path="{app}/{module}/create" element={<{Module}CreatePage />} />
|
|
483
|
-
<Route path="{app}/{module}/:id" element={<{Module}DetailPage />} />
|
|
484
|
-
<Route path="{app}/{module}/documentation" element={<DocumentationPage />} /> {/* ← NOUVEAU */}
|
|
485
|
-
</Route>
|
|
486
|
-
```
|
|
70
|
+
| Fichier | Clés |
|
|
71
|
+
|---------|------|
|
|
72
|
+
| `{lang}/{app}-{module}.json` | `documentation.title`, `documentation.sections.*`, `documentation.labels.*` |
|
|
487
73
|
|
|
488
74
|
---
|
|
489
75
|
|
|
490
|
-
##
|
|
491
|
-
|
|
492
|
-
Dans la page principale du module, ajouter un onglet/lien vers la documentation:
|
|
76
|
+
## Mise à jour routing
|
|
493
77
|
|
|
494
78
|
```tsx
|
|
495
|
-
//
|
|
496
|
-
<
|
|
497
|
-
<NavLink to="/business/{app}/{module}" end>
|
|
498
|
-
{t('tabs.overview')}
|
|
499
|
-
</NavLink>
|
|
500
|
-
<NavLink to="/business/{app}/{module}/list">
|
|
501
|
-
{t('tabs.list')}
|
|
502
|
-
</NavLink>
|
|
503
|
-
<NavLink to="/business/{app}/{module}/documentation">
|
|
504
|
-
<BookOpen className="w-4 h-4 mr-1" />
|
|
505
|
-
{t('tabs.documentation')}
|
|
506
|
-
</NavLink>
|
|
507
|
-
</nav>
|
|
79
|
+
// App.tsx - Ajouter route
|
|
80
|
+
<Route path="{app}/{module}/documentation" element={<DocumentationPage />} />
|
|
508
81
|
```
|
|
509
82
|
|
|
510
83
|
---
|
|
511
84
|
|
|
512
|
-
##
|
|
513
|
-
|
|
514
|
-
```bash
|
|
515
|
-
# Vérifier que les fichiers sont créés
|
|
516
|
-
echo "Vérification des fichiers générés..."
|
|
85
|
+
## Checklist
|
|
517
86
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
"$I18N_DIR/de/{app}-{module}.json"
|
|
524
|
-
)
|
|
525
|
-
|
|
526
|
-
for file in "${FILES_TO_CHECK[@]}"; do
|
|
527
|
-
if [ -f "$file" ]; then
|
|
528
|
-
echo " ✓ $file"
|
|
529
|
-
else
|
|
530
|
-
echo " ✗ $file (MANQUANT)"
|
|
531
|
-
fi
|
|
532
|
-
done
|
|
533
|
-
|
|
534
|
-
# Vérifier le build
|
|
535
|
-
echo ""
|
|
536
|
-
echo "Test build frontend..."
|
|
537
|
-
cd web/smartstack-web && npm run build --dry-run 2>/dev/null || echo "Build check skipped"
|
|
538
|
-
```
|
|
87
|
+
- [ ] DocumentationPage.tsx généré avec Context7
|
|
88
|
+
- [ ] Données FRD extraites et intégrées
|
|
89
|
+
- [ ] i18n 4 langues dans namespace module
|
|
90
|
+
- [ ] Route ajoutée dans App.tsx
|
|
91
|
+
- [ ] Onglet Documentation dans navigation module
|
|
539
92
|
|
|
540
93
|
---
|
|
541
94
|
|
|
542
|
-
##
|
|
95
|
+
## Résumé
|
|
543
96
|
|
|
544
97
|
```
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
FICHIERS CRÉÉS:
|
|
552
|
-
|
|
553
|
-
PAGE REACT:
|
|
554
|
-
✓ pages/business/{app}/{module}/DocumentationPage.tsx
|
|
555
|
-
|
|
556
|
-
I18N (4 langues):
|
|
557
|
-
✓ fr/{app}-{module}.json (clés documentation.*)
|
|
558
|
-
✓ en/{app}-{module}.json
|
|
559
|
-
✓ it/{app}-{module}.json
|
|
560
|
-
✓ de/{app}-{module}.json
|
|
561
|
-
|
|
562
|
-
ROUTE AJOUTÉE (App.tsx):
|
|
563
|
-
/business/{app}/{module}/documentation
|
|
564
|
-
|
|
565
|
-
NAVIGATION:
|
|
566
|
-
Onglet "Documentation" ajouté dans le module
|
|
567
|
-
|
|
568
|
-
================================================================================
|
|
569
|
-
ACCÈS
|
|
570
|
-
================================================================================
|
|
571
|
-
|
|
572
|
-
URL de la documentation:
|
|
573
|
-
http://localhost:5173/business/{app}/{module}/documentation
|
|
574
|
-
|
|
575
|
-
Accès depuis le module:
|
|
576
|
-
Onglet "Documentation" dans la barre de navigation du module
|
|
577
|
-
|
|
578
|
-
================================================================================
|
|
579
|
-
CONTEXT7 UTILISÉ
|
|
580
|
-
================================================================================
|
|
581
|
-
|
|
582
|
-
Libraries référencées:
|
|
583
|
-
• /facebook/react
|
|
584
|
-
• /i18next/react-i18next
|
|
585
|
-
• /remix-run/react-router
|
|
586
|
-
• /lucide-icons/lucide-react
|
|
587
|
-
|
|
588
|
-
================================================================================
|
|
589
|
-
|
|
590
|
-
Contact support: support@atlshub.ch
|
|
98
|
+
DOC-HTML - {FEATURE_ID}
|
|
99
|
+
├── Page: pages/business/{app}/{module}/DocumentationPage.tsx
|
|
100
|
+
├── i18n: 4 langues (fr, en, it, de)
|
|
101
|
+
├── Route: /business/{app}/{module}/documentation
|
|
102
|
+
└── Context7: react, react-i18next, react-router, lucide-react
|
|
591
103
|
```
|
|
592
|
-
|
|
593
|
-
---
|
|
594
|
-
|
|
595
|
-
## Checklist génération
|
|
596
|
-
|
|
597
|
-
- [ ] DocumentationPage.tsx généré avec Context7
|
|
598
|
-
- [ ] Données FRD extraites et intégrées
|
|
599
|
-
- [ ] i18n ajouté pour 4 langues dans namespace module
|
|
600
|
-
- [ ] Route ajoutée dans App.tsx
|
|
601
|
-
- [ ] Onglet Documentation ajouté dans navigation module
|
|
602
|
-
- [ ] Build frontend vérifié
|