@atlashub/smartstack-cli 1.4.1 → 1.5.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.
Files changed (60) hide show
  1. package/.documentation/agents.html +5 -1
  2. package/.documentation/apex.html +5 -1
  3. package/.documentation/business-analyse.html +5 -1
  4. package/.documentation/commands.html +5 -1
  5. package/.documentation/css/styles.css +2168 -2168
  6. package/.documentation/efcore.html +5 -1
  7. package/.documentation/gitflow.html +5 -1
  8. package/.documentation/hooks.html +5 -1
  9. package/.documentation/index.html +5 -1
  10. package/.documentation/init.html +565 -0
  11. package/.documentation/installation.html +92 -6
  12. package/.documentation/js/app.js +794 -794
  13. package/.documentation/ralph-loop.html +534 -530
  14. package/.documentation/test-web.html +5 -1
  15. package/dist/index.js +817 -277
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/templates/agents/efcore/conflicts.md +44 -17
  19. package/templates/agents/efcore/db-status.md +27 -6
  20. package/templates/agents/efcore/scan.md +43 -13
  21. package/templates/commands/ai-prompt.md +315 -315
  22. package/templates/commands/application/create.md +362 -362
  23. package/templates/commands/controller/create.md +216 -216
  24. package/templates/commands/controller.md +59 -0
  25. package/templates/commands/documentation/module.md +202 -202
  26. package/templates/commands/efcore/_env-check.md +153 -153
  27. package/templates/commands/efcore/conflicts.md +109 -192
  28. package/templates/commands/efcore/db-status.md +101 -89
  29. package/templates/commands/efcore/migration.md +23 -11
  30. package/templates/commands/efcore/scan.md +115 -119
  31. package/templates/commands/efcore.md +54 -6
  32. package/templates/commands/feature-full.md +267 -267
  33. package/templates/commands/gitflow/11-finish.md +145 -11
  34. package/templates/commands/gitflow/13-sync.md +216 -216
  35. package/templates/commands/gitflow/14-rebase.md +251 -251
  36. package/templates/commands/gitflow/2-status.md +120 -10
  37. package/templates/commands/gitflow/3-commit.md +150 -0
  38. package/templates/commands/gitflow/7-pull-request.md +134 -5
  39. package/templates/commands/gitflow/9-merge.md +142 -1
  40. package/templates/commands/implement.md +663 -663
  41. package/templates/commands/init.md +567 -0
  42. package/templates/commands/mcp-integration.md +330 -0
  43. package/templates/commands/notification.md +129 -129
  44. package/templates/commands/validate.md +233 -0
  45. package/templates/commands/workflow.md +193 -193
  46. package/templates/skills/ai-prompt/SKILL.md +778 -778
  47. package/templates/skills/application/SKILL.md +563 -563
  48. package/templates/skills/application/templates-backend.md +450 -450
  49. package/templates/skills/application/templates-frontend.md +531 -531
  50. package/templates/skills/application/templates-i18n.md +520 -520
  51. package/templates/skills/application/templates-seed.md +647 -647
  52. package/templates/skills/controller/SKILL.md +240 -240
  53. package/templates/skills/controller/postman-templates.md +614 -614
  54. package/templates/skills/controller/templates.md +1468 -1468
  55. package/templates/skills/documentation/SKILL.md +133 -133
  56. package/templates/skills/documentation/templates.md +476 -476
  57. package/templates/skills/feature-full/SKILL.md +838 -838
  58. package/templates/skills/notification/SKILL.md +555 -555
  59. package/templates/skills/ui-components/SKILL.md +870 -870
  60. package/templates/skills/workflow/SKILL.md +582 -582
@@ -1,476 +1,476 @@
1
- # Templates de Documentation SmartStack
2
-
3
- > **Objectif:** Documentation lisible par un metier, pas seulement par des developpeurs.
4
- > Chaque module doit repondre a: "Qu'est-ce que ca m'apporte ?"
5
-
6
- ---
7
-
8
- ## STRUCTURE OBLIGATOIRE (Type: user)
9
-
10
- Chaque documentation de module DOIT inclure ces sections dans cet ordre:
11
-
12
- | # | Section | Objectif | Public cible |
13
- |---|---------|----------|--------------|
14
- | 1 | **Valeur Metier** | Pourquoi cette fonctionnalite existe | Decideurs, Managers |
15
- | 2 | **Cas d'usage** | Exemples concrets du quotidien | Utilisateurs finaux |
16
- | 3 | **Benefices** | Gains mesurables (temps, argent, qualite) | Decideurs |
17
- | 4 | **Avant/Apres** | Comparaison visuelle | Tous |
18
- | 5 | **Fonctionnalites** | Liste detaillee des capacites | Utilisateurs |
19
- | 6 | **Comment ca marche** | Guide pas a pas | Utilisateurs |
20
- | 7 | **FAQ Metier** | Questions non-techniques | Tous |
21
- | 8 | **Reference technique** | Permissions, API (optionnel) | Admins |
22
-
23
- ---
24
-
25
- ## Template User Module (Business-First)
26
-
27
- ```tsx
28
- // web/smartstack-web/src/pages/docs/user/{ModuleName}DocPage.tsx
29
-
30
- import { Link } from 'react-router-dom';
31
- import { useTranslation } from 'react-i18next';
32
- import {
33
- ArrowRight,
34
- CheckCircle,
35
- XCircle,
36
- Lightbulb,
37
- Target,
38
- Clock,
39
- DollarSign,
40
- Users,
41
- TrendingUp,
42
- Zap,
43
- Quote,
44
- ArrowRightLeft
45
- } from 'lucide-react';
46
-
47
- export function {ModuleName}DocPage() {
48
- const { t } = useTranslation('docs');
49
-
50
- return (
51
- <div className="space-y-8">
52
- {/* HEADER avec proposition de valeur */}
53
- <div>
54
- <h1 className="text-3xl font-bold mb-4 flex items-center gap-3">
55
- <ModuleIcon className="w-8 h-8 text-[var(--color-primary-600)]" />
56
- {t('{module}.title')}
57
- </h1>
58
- {/* PROPOSITION DE VALEUR - 1 phrase percutante */}
59
- <p className="text-xl text-[var(--color-primary-600)] font-medium mb-2">
60
- {t('{module}.valueProposition')}
61
- </p>
62
- <p className="text-lg text-[var(--text-secondary)]">
63
- {t('{module}.subtitle')}
64
- </p>
65
- </div>
66
-
67
- {/* ══════════════════════════════════════════════════════════════════ */}
68
- {/* SECTION 1: VALEUR METIER - Pourquoi ca existe ? */}
69
- {/* ══════════════════════════════════════════════════════════════════ */}
70
- <section id="valeur" className="scroll-mt-4">
71
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
72
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">1</span>
73
- Pourquoi ce module ?
74
- </h2>
75
-
76
- <div className="card p-6">
77
- {/* Probleme resolu */}
78
- <div className="mb-6">
79
- <h3 className="font-semibold mb-3 flex items-center gap-2">
80
- <Target className="w-5 h-5 text-red-500" />
81
- Le probleme que nous resolvons
82
- </h3>
83
- <p className="text-[var(--text-secondary)]">
84
- {t('{module}.problem')}
85
- </p>
86
- </div>
87
-
88
- {/* Solution apportee */}
89
- <div className="p-4 rounded-lg bg-green-500/10 border border-green-500/20">
90
- <h3 className="font-semibold mb-2 flex items-center gap-2 text-green-700">
91
- <Lightbulb className="w-5 h-5" />
92
- Notre solution
93
- </h3>
94
- <p className="text-[var(--text-secondary)]">
95
- {t('{module}.solution')}
96
- </p>
97
- </div>
98
- </div>
99
- </section>
100
-
101
- {/* ══════════════════════════════════════════════════════════════════ */}
102
- {/* SECTION 2: CAS D'USAGE - Exemples concrets */}
103
- {/* ══════════════════════════════════════════════════════════════════ */}
104
- <section id="cas-usage" className="scroll-mt-4">
105
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
106
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">2</span>
107
- Exemples d'utilisation
108
- </h2>
109
-
110
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
111
- {/* Cas d'usage 1 - avec persona */}
112
- <div className="card p-6">
113
- <div className="flex items-center gap-3 mb-4">
114
- <div className="w-12 h-12 rounded-full bg-blue-500/10 flex items-center justify-center">
115
- <Users className="w-6 h-6 text-blue-600" />
116
- </div>
117
- <div>
118
- <div className="font-semibold">{t('{module}.useCases.1.persona')}</div>
119
- <div className="text-sm text-[var(--text-secondary)]">{t('{module}.useCases.1.role')}</div>
120
- </div>
121
- </div>
122
- <div className="space-y-3">
123
- <div className="text-sm">
124
- <span className="font-medium text-[var(--text-secondary)]">Situation:</span>
125
- <p>{t('{module}.useCases.1.situation')}</p>
126
- </div>
127
- <div className="text-sm">
128
- <span className="font-medium text-green-600">Avec {t('{module}.title')}:</span>
129
- <p>{t('{module}.useCases.1.withFeature')}</p>
130
- </div>
131
- </div>
132
- </div>
133
-
134
- {/* Cas d'usage 2 */}
135
- <div className="card p-6">
136
- <div className="flex items-center gap-3 mb-4">
137
- <div className="w-12 h-12 rounded-full bg-purple-500/10 flex items-center justify-center">
138
- <Users className="w-6 h-6 text-purple-600" />
139
- </div>
140
- <div>
141
- <div className="font-semibold">{t('{module}.useCases.2.persona')}</div>
142
- <div className="text-sm text-[var(--text-secondary)]">{t('{module}.useCases.2.role')}</div>
143
- </div>
144
- </div>
145
- <div className="space-y-3">
146
- <div className="text-sm">
147
- <span className="font-medium text-[var(--text-secondary)]">Situation:</span>
148
- <p>{t('{module}.useCases.2.situation')}</p>
149
- </div>
150
- <div className="text-sm">
151
- <span className="font-medium text-green-600">Avec {t('{module}.title')}:</span>
152
- <p>{t('{module}.useCases.2.withFeature')}</p>
153
- </div>
154
- </div>
155
- </div>
156
- </div>
157
- </section>
158
-
159
- {/* ══════════════════════════════════════════════════════════════════ */}
160
- {/* SECTION 3: BENEFICES MESURABLES */}
161
- {/* ══════════════════════════════════════════════════════════════════ */}
162
- <section id="benefices" className="scroll-mt-4">
163
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
164
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">3</span>
165
- Benefices concrets
166
- </h2>
167
-
168
- <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
169
- {/* Benefice 1: Gain de temps */}
170
- <div className="card p-6 text-center">
171
- <div className="w-16 h-16 mx-auto mb-4 rounded-full bg-blue-500/10 flex items-center justify-center">
172
- <Clock className="w-8 h-8 text-blue-600" />
173
- </div>
174
- <div className="text-3xl font-bold text-blue-600 mb-2">-70%</div>
175
- <div className="font-semibold mb-1">Temps economise</div>
176
- <p className="text-sm text-[var(--text-secondary)]">
177
- {t('{module}.benefits.time.description')}
178
- </p>
179
- </div>
180
-
181
- {/* Benefice 2: Reduction des erreurs */}
182
- <div className="card p-6 text-center">
183
- <div className="w-16 h-16 mx-auto mb-4 rounded-full bg-green-500/10 flex items-center justify-center">
184
- <TrendingUp className="w-8 h-8 text-green-600" />
185
- </div>
186
- <div className="text-3xl font-bold text-green-600 mb-2">+95%</div>
187
- <div className="font-semibold mb-1">Fiabilite</div>
188
- <p className="text-sm text-[var(--text-secondary)]">
189
- {t('{module}.benefits.quality.description')}
190
- </p>
191
- </div>
192
-
193
- {/* Benefice 3: ROI */}
194
- <div className="card p-6 text-center">
195
- <div className="w-16 h-16 mx-auto mb-4 rounded-full bg-amber-500/10 flex items-center justify-center">
196
- <DollarSign className="w-8 h-8 text-amber-600" />
197
- </div>
198
- <div className="text-3xl font-bold text-amber-600 mb-2">3x</div>
199
- <div className="font-semibold mb-1">Retour sur investissement</div>
200
- <p className="text-sm text-[var(--text-secondary)]">
201
- {t('{module}.benefits.roi.description')}
202
- </p>
203
- </div>
204
- </div>
205
- </section>
206
-
207
- {/* ══════════════════════════════════════════════════════════════════ */}
208
- {/* SECTION 4: AVANT/APRES - Comparaison visuelle */}
209
- {/* ══════════════════════════════════════════════════════════════════ */}
210
- <section id="avant-apres" className="scroll-mt-4">
211
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
212
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">4</span>
213
- Avant / Apres
214
- </h2>
215
-
216
- <div className="card p-6">
217
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
218
- {/* AVANT */}
219
- <div className="p-4 rounded-lg bg-red-500/5 border border-red-500/20">
220
- <h3 className="font-semibold mb-4 flex items-center gap-2 text-red-600">
221
- <XCircle className="w-5 h-5" />
222
- Avant: Sans {t('{module}.title')}
223
- </h3>
224
- <ul className="space-y-2">
225
- {[1, 2, 3, 4].map((i) => (
226
- <li key={i} className="flex items-start gap-2 text-sm">
227
- <XCircle className="w-4 h-4 text-red-500 mt-0.5 flex-shrink-0" />
228
- <span>{t(`{module}.before.${i}`)}</span>
229
- </li>
230
- ))}
231
- </ul>
232
- </div>
233
-
234
- {/* APRES */}
235
- <div className="p-4 rounded-lg bg-green-500/5 border border-green-500/20">
236
- <h3 className="font-semibold mb-4 flex items-center gap-2 text-green-600">
237
- <CheckCircle className="w-5 h-5" />
238
- Apres: Avec {t('{module}.title')}
239
- </h3>
240
- <ul className="space-y-2">
241
- {[1, 2, 3, 4].map((i) => (
242
- <li key={i} className="flex items-start gap-2 text-sm">
243
- <CheckCircle className="w-4 h-4 text-green-500 mt-0.5 flex-shrink-0" />
244
- <span>{t(`{module}.after.${i}`)}</span>
245
- </li>
246
- ))}
247
- </ul>
248
- </div>
249
- </div>
250
- </div>
251
- </section>
252
-
253
- {/* ══════════════════════════════════════════════════════════════════ */}
254
- {/* SECTION 5: FONCTIONNALITES DETAILLEES */}
255
- {/* ══════════════════════════════════════════════════════════════════ */}
256
- <section id="fonctionnalites" className="scroll-mt-4">
257
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
258
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">5</span>
259
- Ce que vous pouvez faire
260
- </h2>
261
-
262
- <div className="space-y-4">
263
- {/* Feature Card avec exemple */}
264
- <div className="card p-6">
265
- <div className="flex items-start gap-4">
266
- <div className="w-12 h-12 rounded-lg bg-[var(--color-primary-600)]/10 flex items-center justify-center flex-shrink-0">
267
- <Zap className="w-6 h-6 text-[var(--color-primary-600)]" />
268
- </div>
269
- <div className="flex-1">
270
- <h3 className="font-semibold mb-2">{t('{module}.features.1.title')}</h3>
271
- <p className="text-[var(--text-secondary)] mb-3">
272
- {t('{module}.features.1.description')}
273
- </p>
274
- {/* Exemple concret */}
275
- <div className="p-3 rounded-lg bg-[var(--bg-secondary)] text-sm">
276
- <span className="font-medium text-[var(--color-primary-600)]">Exemple: </span>
277
- {t('{module}.features.1.example')}
278
- </div>
279
- </div>
280
- </div>
281
- </div>
282
-
283
- {/* Repeter pour chaque fonctionnalite */}
284
- </div>
285
- </section>
286
-
287
- {/* ══════════════════════════════════════════════════════════════════ */}
288
- {/* SECTION 6: COMMENT CA MARCHE - Guide pas a pas */}
289
- {/* ══════════════════════════════════════════════════════════════════ */}
290
- <section id="guide" className="scroll-mt-4">
291
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
292
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">6</span>
293
- Comment demarrer
294
- </h2>
295
-
296
- <div className="card p-6">
297
- <div className="space-y-6">
298
- {/* Etape 1 */}
299
- <div className="flex gap-4">
300
- <div className="flex flex-col items-center">
301
- <div className="w-10 h-10 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center font-bold">
302
- 1
303
- </div>
304
- <div className="w-0.5 h-full bg-[var(--border-color)] mt-2"></div>
305
- </div>
306
- <div className="flex-1 pb-6">
307
- <h4 className="font-semibold mb-2">{t('{module}.steps.1.title')}</h4>
308
- <p className="text-sm text-[var(--text-secondary)] mb-3">
309
- {t('{module}.steps.1.description')}
310
- </p>
311
- {/* Screenshot ou illustration */}
312
- <div className="p-4 rounded-lg bg-[var(--bg-secondary)] border-2 border-dashed border-[var(--border-color)] text-center text-sm text-[var(--text-tertiary)]">
313
- [Capture d'ecran de l'etape 1]
314
- </div>
315
- </div>
316
- </div>
317
-
318
- {/* Repeter pour chaque etape */}
319
- </div>
320
- </div>
321
- </section>
322
-
323
- {/* ══════════════════════════════════════════════════════════════════ */}
324
- {/* SECTION 7: FAQ METIER */}
325
- {/* ══════════════════════════════════════════════════════════════════ */}
326
- <section id="faq" className="scroll-mt-4">
327
- <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
328
- <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">7</span>
329
- Questions frequentes
330
- </h2>
331
-
332
- <div className="space-y-4">
333
- {/* Question metier, pas technique */}
334
- <div className="card p-4">
335
- <h3 className="font-medium mb-2">
336
- {t('{module}.faq.1.question')}
337
- </h3>
338
- <p className="text-sm text-[var(--text-secondary)]">
339
- {t('{module}.faq.1.answer')}
340
- </p>
341
- </div>
342
- </div>
343
- </section>
344
-
345
- {/* ══════════════════════════════════════════════════════════════════ */}
346
- {/* SECTION 8: REFERENCE TECHNIQUE (optionnel, pour admins) */}
347
- {/* ══════════════════════════════════════════════════════════════════ */}
348
- <section id="reference" className="scroll-mt-4">
349
- <details className="card">
350
- <summary className="p-4 cursor-pointer hover:bg-[var(--bg-secondary)] rounded-lg font-semibold flex items-center gap-2">
351
- <span className="w-8 h-8 rounded-full bg-gray-500/10 text-gray-600 flex items-center justify-center text-sm">8</span>
352
- Reference technique (administrateurs)
353
- </summary>
354
- <div className="p-4 pt-0">
355
- {/* Permissions, API, etc. */}
356
- </div>
357
- </details>
358
- </section>
359
-
360
- {/* NAVIGATION */}
361
- <div className="flex justify-between pt-6 border-t border-[var(--border-color)]">
362
- <Link to="/docs/user/previous" className="flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)]">
363
- <ArrowRight className="w-4 h-4 rotate-180" />
364
- Module precedent
365
- </Link>
366
- <Link to="/docs/user/next" className="flex items-center gap-2 text-[var(--color-primary-600)]">
367
- Module suivant
368
- <ArrowRight className="w-4 h-4" />
369
- </Link>
370
- </div>
371
- </div>
372
- );
373
- }
374
- ```
375
-
376
- ---
377
-
378
- ## Structure i18n (Business-First)
379
-
380
- ```json
381
- {
382
- "{module}": {
383
- "title": "Nom du module",
384
- "valueProposition": "Une phrase qui resume la valeur (ex: 'Gerez vos prompts IA sans ecrire une ligne de code')",
385
- "subtitle": "Description en 1-2 phrases",
386
-
387
- "problem": "Description du probleme que vos utilisateurs rencontrent AVANT d'avoir cette fonctionnalite",
388
- "solution": "Comment ce module resout ce probleme de maniere simple",
389
-
390
- "useCases": {
391
- "1": {
392
- "persona": "Marie",
393
- "role": "Responsable RH",
394
- "situation": "Marie doit envoyer 50 emails personnalises aux candidats chaque semaine",
395
- "withFeature": "Elle selectionne un template, importe sa liste, et envoie tout en 2 clics"
396
- },
397
- "2": {
398
- "persona": "Thomas",
399
- "role": "Directeur Commercial",
400
- "situation": "Thomas veut suivre les performances de son equipe en temps reel",
401
- "withFeature": "Il consulte le dashboard qui affiche les KPIs automatiquement"
402
- }
403
- },
404
-
405
- "benefits": {
406
- "time": { "value": "-70%", "description": "Reduction du temps passe sur les taches repetitives" },
407
- "quality": { "value": "+95%", "description": "Moins d'erreurs grace a l'automatisation" },
408
- "roi": { "value": "3x", "description": "Rentabilise en moins de 3 mois" }
409
- },
410
-
411
- "before": {
412
- "1": "Processus manuel et chronophage",
413
- "2": "Risque d'erreurs humaines eleve",
414
- "3": "Pas de visibilite sur les performances",
415
- "4": "Donnees eparpillees dans plusieurs outils"
416
- },
417
-
418
- "after": {
419
- "1": "Automatisation des taches repetitives",
420
- "2": "Validation automatique des donnees",
421
- "3": "Tableaux de bord en temps reel",
422
- "4": "Centralisation de toutes les informations"
423
- },
424
-
425
- "features": {
426
- "1": {
427
- "title": "Nom de la fonctionnalite",
428
- "description": "Explication claire de ce que fait cette fonctionnalite",
429
- "example": "Par exemple, vous pouvez creer un prompt 'Reponse Support' qui sera utilise automatiquement pour tous les tickets entrants"
430
- }
431
- },
432
-
433
- "steps": {
434
- "1": {
435
- "title": "Accedez au module",
436
- "description": "Depuis le menu principal, cliquez sur 'Administration' puis 'Intelligence Artificielle'"
437
- }
438
- },
439
-
440
- "faq": {
441
- "1": {
442
- "question": "Dois-je etre technique pour utiliser ce module ?",
443
- "answer": "Non, l'interface est concue pour etre utilisee par tous. Aucune connaissance en programmation n'est requise."
444
- },
445
- "2": {
446
- "question": "Combien de temps faut-il pour le mettre en place ?",
447
- "answer": "La configuration initiale prend environ 15 minutes. Vous pouvez commencer a utiliser le module immediatement apres."
448
- }
449
- }
450
- }
451
- }
452
- ```
453
-
454
- ---
455
-
456
- ## Checklist Documentation Business-First
457
-
458
- Avant de valider une documentation, verifier:
459
-
460
- - [ ] **Proposition de valeur** claire en 1 phrase
461
- - [ ] **Probleme** decrit du point de vue utilisateur (pas technique)
462
- - [ ] **2-3 cas d'usage** avec personas nommes
463
- - [ ] **Benefices chiffres** (%, temps, argent)
464
- - [ ] **Avant/Apres** visuel
465
- - [ ] **Exemples concrets** pour chaque fonctionnalite
466
- - [ ] **Guide pas a pas** avec captures d'ecran
467
- - [ ] **FAQ metier** (pas technique)
468
- - [ ] **Reference technique** en section repliable (optionnelle)
469
-
470
- ---
471
-
472
- ## Templates Techniques (inchanges)
473
-
474
- Les templates pour `developer`, `database`, et `testing` restent techniques car leur public est developpeur.
475
-
476
- (voir le contenu precedent pour ces templates)
1
+ # Templates de Documentation SmartStack
2
+
3
+ > **Objectif:** Documentation lisible par un metier, pas seulement par des developpeurs.
4
+ > Chaque module doit repondre a: "Qu'est-ce que ca m'apporte ?"
5
+
6
+ ---
7
+
8
+ ## STRUCTURE OBLIGATOIRE (Type: user)
9
+
10
+ Chaque documentation de module DOIT inclure ces sections dans cet ordre:
11
+
12
+ | # | Section | Objectif | Public cible |
13
+ |---|---------|----------|--------------|
14
+ | 1 | **Valeur Metier** | Pourquoi cette fonctionnalite existe | Decideurs, Managers |
15
+ | 2 | **Cas d'usage** | Exemples concrets du quotidien | Utilisateurs finaux |
16
+ | 3 | **Benefices** | Gains mesurables (temps, argent, qualite) | Decideurs |
17
+ | 4 | **Avant/Apres** | Comparaison visuelle | Tous |
18
+ | 5 | **Fonctionnalites** | Liste detaillee des capacites | Utilisateurs |
19
+ | 6 | **Comment ca marche** | Guide pas a pas | Utilisateurs |
20
+ | 7 | **FAQ Metier** | Questions non-techniques | Tous |
21
+ | 8 | **Reference technique** | Permissions, API (optionnel) | Admins |
22
+
23
+ ---
24
+
25
+ ## Template User Module (Business-First)
26
+
27
+ ```tsx
28
+ // web/smartstack-web/src/pages/docs/user/{ModuleName}DocPage.tsx
29
+
30
+ import { Link } from 'react-router-dom';
31
+ import { useTranslation } from 'react-i18next';
32
+ import {
33
+ ArrowRight,
34
+ CheckCircle,
35
+ XCircle,
36
+ Lightbulb,
37
+ Target,
38
+ Clock,
39
+ DollarSign,
40
+ Users,
41
+ TrendingUp,
42
+ Zap,
43
+ Quote,
44
+ ArrowRightLeft
45
+ } from 'lucide-react';
46
+
47
+ export function {ModuleName}DocPage() {
48
+ const { t } = useTranslation('docs');
49
+
50
+ return (
51
+ <div className="space-y-8">
52
+ {/* HEADER avec proposition de valeur */}
53
+ <div>
54
+ <h1 className="text-3xl font-bold mb-4 flex items-center gap-3">
55
+ <ModuleIcon className="w-8 h-8 text-[var(--color-primary-600)]" />
56
+ {t('{module}.title')}
57
+ </h1>
58
+ {/* PROPOSITION DE VALEUR - 1 phrase percutante */}
59
+ <p className="text-xl text-[var(--color-primary-600)] font-medium mb-2">
60
+ {t('{module}.valueProposition')}
61
+ </p>
62
+ <p className="text-lg text-[var(--text-secondary)]">
63
+ {t('{module}.subtitle')}
64
+ </p>
65
+ </div>
66
+
67
+ {/* ══════════════════════════════════════════════════════════════════ */}
68
+ {/* SECTION 1: VALEUR METIER - Pourquoi ca existe ? */}
69
+ {/* ══════════════════════════════════════════════════════════════════ */}
70
+ <section id="valeur" className="scroll-mt-4">
71
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
72
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">1</span>
73
+ Pourquoi ce module ?
74
+ </h2>
75
+
76
+ <div className="card p-6">
77
+ {/* Probleme resolu */}
78
+ <div className="mb-6">
79
+ <h3 className="font-semibold mb-3 flex items-center gap-2">
80
+ <Target className="w-5 h-5 text-red-500" />
81
+ Le probleme que nous resolvons
82
+ </h3>
83
+ <p className="text-[var(--text-secondary)]">
84
+ {t('{module}.problem')}
85
+ </p>
86
+ </div>
87
+
88
+ {/* Solution apportee */}
89
+ <div className="p-4 rounded-lg bg-green-500/10 border border-green-500/20">
90
+ <h3 className="font-semibold mb-2 flex items-center gap-2 text-green-700">
91
+ <Lightbulb className="w-5 h-5" />
92
+ Notre solution
93
+ </h3>
94
+ <p className="text-[var(--text-secondary)]">
95
+ {t('{module}.solution')}
96
+ </p>
97
+ </div>
98
+ </div>
99
+ </section>
100
+
101
+ {/* ══════════════════════════════════════════════════════════════════ */}
102
+ {/* SECTION 2: CAS D'USAGE - Exemples concrets */}
103
+ {/* ══════════════════════════════════════════════════════════════════ */}
104
+ <section id="cas-usage" className="scroll-mt-4">
105
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
106
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">2</span>
107
+ Exemples d'utilisation
108
+ </h2>
109
+
110
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
111
+ {/* Cas d'usage 1 - avec persona */}
112
+ <div className="card p-6">
113
+ <div className="flex items-center gap-3 mb-4">
114
+ <div className="w-12 h-12 rounded-full bg-blue-500/10 flex items-center justify-center">
115
+ <Users className="w-6 h-6 text-blue-600" />
116
+ </div>
117
+ <div>
118
+ <div className="font-semibold">{t('{module}.useCases.1.persona')}</div>
119
+ <div className="text-sm text-[var(--text-secondary)]">{t('{module}.useCases.1.role')}</div>
120
+ </div>
121
+ </div>
122
+ <div className="space-y-3">
123
+ <div className="text-sm">
124
+ <span className="font-medium text-[var(--text-secondary)]">Situation:</span>
125
+ <p>{t('{module}.useCases.1.situation')}</p>
126
+ </div>
127
+ <div className="text-sm">
128
+ <span className="font-medium text-green-600">Avec {t('{module}.title')}:</span>
129
+ <p>{t('{module}.useCases.1.withFeature')}</p>
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+ {/* Cas d'usage 2 */}
135
+ <div className="card p-6">
136
+ <div className="flex items-center gap-3 mb-4">
137
+ <div className="w-12 h-12 rounded-full bg-purple-500/10 flex items-center justify-center">
138
+ <Users className="w-6 h-6 text-purple-600" />
139
+ </div>
140
+ <div>
141
+ <div className="font-semibold">{t('{module}.useCases.2.persona')}</div>
142
+ <div className="text-sm text-[var(--text-secondary)]">{t('{module}.useCases.2.role')}</div>
143
+ </div>
144
+ </div>
145
+ <div className="space-y-3">
146
+ <div className="text-sm">
147
+ <span className="font-medium text-[var(--text-secondary)]">Situation:</span>
148
+ <p>{t('{module}.useCases.2.situation')}</p>
149
+ </div>
150
+ <div className="text-sm">
151
+ <span className="font-medium text-green-600">Avec {t('{module}.title')}:</span>
152
+ <p>{t('{module}.useCases.2.withFeature')}</p>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </section>
158
+
159
+ {/* ══════════════════════════════════════════════════════════════════ */}
160
+ {/* SECTION 3: BENEFICES MESURABLES */}
161
+ {/* ══════════════════════════════════════════════════════════════════ */}
162
+ <section id="benefices" className="scroll-mt-4">
163
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
164
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">3</span>
165
+ Benefices concrets
166
+ </h2>
167
+
168
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
169
+ {/* Benefice 1: Gain de temps */}
170
+ <div className="card p-6 text-center">
171
+ <div className="w-16 h-16 mx-auto mb-4 rounded-full bg-blue-500/10 flex items-center justify-center">
172
+ <Clock className="w-8 h-8 text-blue-600" />
173
+ </div>
174
+ <div className="text-3xl font-bold text-blue-600 mb-2">-70%</div>
175
+ <div className="font-semibold mb-1">Temps economise</div>
176
+ <p className="text-sm text-[var(--text-secondary)]">
177
+ {t('{module}.benefits.time.description')}
178
+ </p>
179
+ </div>
180
+
181
+ {/* Benefice 2: Reduction des erreurs */}
182
+ <div className="card p-6 text-center">
183
+ <div className="w-16 h-16 mx-auto mb-4 rounded-full bg-green-500/10 flex items-center justify-center">
184
+ <TrendingUp className="w-8 h-8 text-green-600" />
185
+ </div>
186
+ <div className="text-3xl font-bold text-green-600 mb-2">+95%</div>
187
+ <div className="font-semibold mb-1">Fiabilite</div>
188
+ <p className="text-sm text-[var(--text-secondary)]">
189
+ {t('{module}.benefits.quality.description')}
190
+ </p>
191
+ </div>
192
+
193
+ {/* Benefice 3: ROI */}
194
+ <div className="card p-6 text-center">
195
+ <div className="w-16 h-16 mx-auto mb-4 rounded-full bg-amber-500/10 flex items-center justify-center">
196
+ <DollarSign className="w-8 h-8 text-amber-600" />
197
+ </div>
198
+ <div className="text-3xl font-bold text-amber-600 mb-2">3x</div>
199
+ <div className="font-semibold mb-1">Retour sur investissement</div>
200
+ <p className="text-sm text-[var(--text-secondary)]">
201
+ {t('{module}.benefits.roi.description')}
202
+ </p>
203
+ </div>
204
+ </div>
205
+ </section>
206
+
207
+ {/* ══════════════════════════════════════════════════════════════════ */}
208
+ {/* SECTION 4: AVANT/APRES - Comparaison visuelle */}
209
+ {/* ══════════════════════════════════════════════════════════════════ */}
210
+ <section id="avant-apres" className="scroll-mt-4">
211
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
212
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">4</span>
213
+ Avant / Apres
214
+ </h2>
215
+
216
+ <div className="card p-6">
217
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
218
+ {/* AVANT */}
219
+ <div className="p-4 rounded-lg bg-red-500/5 border border-red-500/20">
220
+ <h3 className="font-semibold mb-4 flex items-center gap-2 text-red-600">
221
+ <XCircle className="w-5 h-5" />
222
+ Avant: Sans {t('{module}.title')}
223
+ </h3>
224
+ <ul className="space-y-2">
225
+ {[1, 2, 3, 4].map((i) => (
226
+ <li key={i} className="flex items-start gap-2 text-sm">
227
+ <XCircle className="w-4 h-4 text-red-500 mt-0.5 flex-shrink-0" />
228
+ <span>{t(`{module}.before.${i}`)}</span>
229
+ </li>
230
+ ))}
231
+ </ul>
232
+ </div>
233
+
234
+ {/* APRES */}
235
+ <div className="p-4 rounded-lg bg-green-500/5 border border-green-500/20">
236
+ <h3 className="font-semibold mb-4 flex items-center gap-2 text-green-600">
237
+ <CheckCircle className="w-5 h-5" />
238
+ Apres: Avec {t('{module}.title')}
239
+ </h3>
240
+ <ul className="space-y-2">
241
+ {[1, 2, 3, 4].map((i) => (
242
+ <li key={i} className="flex items-start gap-2 text-sm">
243
+ <CheckCircle className="w-4 h-4 text-green-500 mt-0.5 flex-shrink-0" />
244
+ <span>{t(`{module}.after.${i}`)}</span>
245
+ </li>
246
+ ))}
247
+ </ul>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </section>
252
+
253
+ {/* ══════════════════════════════════════════════════════════════════ */}
254
+ {/* SECTION 5: FONCTIONNALITES DETAILLEES */}
255
+ {/* ══════════════════════════════════════════════════════════════════ */}
256
+ <section id="fonctionnalites" className="scroll-mt-4">
257
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
258
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">5</span>
259
+ Ce que vous pouvez faire
260
+ </h2>
261
+
262
+ <div className="space-y-4">
263
+ {/* Feature Card avec exemple */}
264
+ <div className="card p-6">
265
+ <div className="flex items-start gap-4">
266
+ <div className="w-12 h-12 rounded-lg bg-[var(--color-primary-600)]/10 flex items-center justify-center flex-shrink-0">
267
+ <Zap className="w-6 h-6 text-[var(--color-primary-600)]" />
268
+ </div>
269
+ <div className="flex-1">
270
+ <h3 className="font-semibold mb-2">{t('{module}.features.1.title')}</h3>
271
+ <p className="text-[var(--text-secondary)] mb-3">
272
+ {t('{module}.features.1.description')}
273
+ </p>
274
+ {/* Exemple concret */}
275
+ <div className="p-3 rounded-lg bg-[var(--bg-secondary)] text-sm">
276
+ <span className="font-medium text-[var(--color-primary-600)]">Exemple: </span>
277
+ {t('{module}.features.1.example')}
278
+ </div>
279
+ </div>
280
+ </div>
281
+ </div>
282
+
283
+ {/* Repeter pour chaque fonctionnalite */}
284
+ </div>
285
+ </section>
286
+
287
+ {/* ══════════════════════════════════════════════════════════════════ */}
288
+ {/* SECTION 6: COMMENT CA MARCHE - Guide pas a pas */}
289
+ {/* ══════════════════════════════════════════════════════════════════ */}
290
+ <section id="guide" className="scroll-mt-4">
291
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
292
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">6</span>
293
+ Comment demarrer
294
+ </h2>
295
+
296
+ <div className="card p-6">
297
+ <div className="space-y-6">
298
+ {/* Etape 1 */}
299
+ <div className="flex gap-4">
300
+ <div className="flex flex-col items-center">
301
+ <div className="w-10 h-10 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center font-bold">
302
+ 1
303
+ </div>
304
+ <div className="w-0.5 h-full bg-[var(--border-color)] mt-2"></div>
305
+ </div>
306
+ <div className="flex-1 pb-6">
307
+ <h4 className="font-semibold mb-2">{t('{module}.steps.1.title')}</h4>
308
+ <p className="text-sm text-[var(--text-secondary)] mb-3">
309
+ {t('{module}.steps.1.description')}
310
+ </p>
311
+ {/* Screenshot ou illustration */}
312
+ <div className="p-4 rounded-lg bg-[var(--bg-secondary)] border-2 border-dashed border-[var(--border-color)] text-center text-sm text-[var(--text-tertiary)]">
313
+ [Capture d'ecran de l'etape 1]
314
+ </div>
315
+ </div>
316
+ </div>
317
+
318
+ {/* Repeter pour chaque etape */}
319
+ </div>
320
+ </div>
321
+ </section>
322
+
323
+ {/* ══════════════════════════════════════════════════════════════════ */}
324
+ {/* SECTION 7: FAQ METIER */}
325
+ {/* ══════════════════════════════════════════════════════════════════ */}
326
+ <section id="faq" className="scroll-mt-4">
327
+ <h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
328
+ <span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">7</span>
329
+ Questions frequentes
330
+ </h2>
331
+
332
+ <div className="space-y-4">
333
+ {/* Question metier, pas technique */}
334
+ <div className="card p-4">
335
+ <h3 className="font-medium mb-2">
336
+ {t('{module}.faq.1.question')}
337
+ </h3>
338
+ <p className="text-sm text-[var(--text-secondary)]">
339
+ {t('{module}.faq.1.answer')}
340
+ </p>
341
+ </div>
342
+ </div>
343
+ </section>
344
+
345
+ {/* ══════════════════════════════════════════════════════════════════ */}
346
+ {/* SECTION 8: REFERENCE TECHNIQUE (optionnel, pour admins) */}
347
+ {/* ══════════════════════════════════════════════════════════════════ */}
348
+ <section id="reference" className="scroll-mt-4">
349
+ <details className="card">
350
+ <summary className="p-4 cursor-pointer hover:bg-[var(--bg-secondary)] rounded-lg font-semibold flex items-center gap-2">
351
+ <span className="w-8 h-8 rounded-full bg-gray-500/10 text-gray-600 flex items-center justify-center text-sm">8</span>
352
+ Reference technique (administrateurs)
353
+ </summary>
354
+ <div className="p-4 pt-0">
355
+ {/* Permissions, API, etc. */}
356
+ </div>
357
+ </details>
358
+ </section>
359
+
360
+ {/* NAVIGATION */}
361
+ <div className="flex justify-between pt-6 border-t border-[var(--border-color)]">
362
+ <Link to="/docs/user/previous" className="flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)]">
363
+ <ArrowRight className="w-4 h-4 rotate-180" />
364
+ Module precedent
365
+ </Link>
366
+ <Link to="/docs/user/next" className="flex items-center gap-2 text-[var(--color-primary-600)]">
367
+ Module suivant
368
+ <ArrowRight className="w-4 h-4" />
369
+ </Link>
370
+ </div>
371
+ </div>
372
+ );
373
+ }
374
+ ```
375
+
376
+ ---
377
+
378
+ ## Structure i18n (Business-First)
379
+
380
+ ```json
381
+ {
382
+ "{module}": {
383
+ "title": "Nom du module",
384
+ "valueProposition": "Une phrase qui resume la valeur (ex: 'Gerez vos prompts IA sans ecrire une ligne de code')",
385
+ "subtitle": "Description en 1-2 phrases",
386
+
387
+ "problem": "Description du probleme que vos utilisateurs rencontrent AVANT d'avoir cette fonctionnalite",
388
+ "solution": "Comment ce module resout ce probleme de maniere simple",
389
+
390
+ "useCases": {
391
+ "1": {
392
+ "persona": "Marie",
393
+ "role": "Responsable RH",
394
+ "situation": "Marie doit envoyer 50 emails personnalises aux candidats chaque semaine",
395
+ "withFeature": "Elle selectionne un template, importe sa liste, et envoie tout en 2 clics"
396
+ },
397
+ "2": {
398
+ "persona": "Thomas",
399
+ "role": "Directeur Commercial",
400
+ "situation": "Thomas veut suivre les performances de son equipe en temps reel",
401
+ "withFeature": "Il consulte le dashboard qui affiche les KPIs automatiquement"
402
+ }
403
+ },
404
+
405
+ "benefits": {
406
+ "time": { "value": "-70%", "description": "Reduction du temps passe sur les taches repetitives" },
407
+ "quality": { "value": "+95%", "description": "Moins d'erreurs grace a l'automatisation" },
408
+ "roi": { "value": "3x", "description": "Rentabilise en moins de 3 mois" }
409
+ },
410
+
411
+ "before": {
412
+ "1": "Processus manuel et chronophage",
413
+ "2": "Risque d'erreurs humaines eleve",
414
+ "3": "Pas de visibilite sur les performances",
415
+ "4": "Donnees eparpillees dans plusieurs outils"
416
+ },
417
+
418
+ "after": {
419
+ "1": "Automatisation des taches repetitives",
420
+ "2": "Validation automatique des donnees",
421
+ "3": "Tableaux de bord en temps reel",
422
+ "4": "Centralisation de toutes les informations"
423
+ },
424
+
425
+ "features": {
426
+ "1": {
427
+ "title": "Nom de la fonctionnalite",
428
+ "description": "Explication claire de ce que fait cette fonctionnalite",
429
+ "example": "Par exemple, vous pouvez creer un prompt 'Reponse Support' qui sera utilise automatiquement pour tous les tickets entrants"
430
+ }
431
+ },
432
+
433
+ "steps": {
434
+ "1": {
435
+ "title": "Accedez au module",
436
+ "description": "Depuis le menu principal, cliquez sur 'Administration' puis 'Intelligence Artificielle'"
437
+ }
438
+ },
439
+
440
+ "faq": {
441
+ "1": {
442
+ "question": "Dois-je etre technique pour utiliser ce module ?",
443
+ "answer": "Non, l'interface est concue pour etre utilisee par tous. Aucune connaissance en programmation n'est requise."
444
+ },
445
+ "2": {
446
+ "question": "Combien de temps faut-il pour le mettre en place ?",
447
+ "answer": "La configuration initiale prend environ 15 minutes. Vous pouvez commencer a utiliser le module immediatement apres."
448
+ }
449
+ }
450
+ }
451
+ }
452
+ ```
453
+
454
+ ---
455
+
456
+ ## Checklist Documentation Business-First
457
+
458
+ Avant de valider une documentation, verifier:
459
+
460
+ - [ ] **Proposition de valeur** claire en 1 phrase
461
+ - [ ] **Probleme** decrit du point de vue utilisateur (pas technique)
462
+ - [ ] **2-3 cas d'usage** avec personas nommes
463
+ - [ ] **Benefices chiffres** (%, temps, argent)
464
+ - [ ] **Avant/Apres** visuel
465
+ - [ ] **Exemples concrets** pour chaque fonctionnalite
466
+ - [ ] **Guide pas a pas** avec captures d'ecran
467
+ - [ ] **FAQ metier** (pas technique)
468
+ - [ ] **Reference technique** en section repliable (optionnelle)
469
+
470
+ ---
471
+
472
+ ## Templates Techniques (inchanges)
473
+
474
+ Les templates pour `developer`, `database`, et `testing` restent techniques car leur public est developpeur.
475
+
476
+ (voir le contenu precedent pour ces templates)