@atlashub/smartstack-cli 3.37.0 → 3.38.0
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/dist/index.js +16 -24
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +201 -256
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/extract-api-endpoints.ts +5 -5
- package/scripts/generate-doc-with-mock-ui.ts +10 -17
- package/templates/agents/ba-reader.md +9 -9
- package/templates/agents/ba-writer.md +12 -15
- package/templates/agents/code-reviewer.md +1 -1
- package/templates/agents/docs-context-reader.md +1 -1
- package/templates/agents/gitflow/merge.md +0 -4
- package/templates/agents/gitflow/pr.md +0 -4
- package/templates/agents/gitflow/start.md +30 -5
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
- package/templates/skills/_shared.md +15 -17
- package/templates/skills/ai-prompt/SKILL.md +1 -1
- package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
- package/templates/skills/apex/SKILL.md +3 -4
- package/templates/skills/apex/_shared.md +10 -20
- package/templates/skills/apex/references/analysis-methods.md +141 -0
- package/templates/skills/apex/references/challenge-questions.md +1 -21
- package/templates/skills/apex/references/core-seed-data.md +35 -57
- package/templates/skills/apex/references/examine-build-validation.md +87 -0
- package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
- package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
- package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
- package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
- package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
- package/templates/skills/apex/references/post-checks.md +145 -40
- package/templates/skills/apex/references/smartstack-api.md +35 -51
- package/templates/skills/apex/references/smartstack-frontend.md +17 -17
- package/templates/skills/apex/references/smartstack-layers.md +38 -62
- package/templates/skills/apex/steps/step-00-init.md +14 -26
- package/templates/skills/apex/steps/step-01-analyze.md +10 -143
- package/templates/skills/apex/steps/step-02-plan.md +10 -92
- package/templates/skills/apex/steps/step-03-execute.md +47 -249
- package/templates/skills/apex/steps/step-04-examine.md +14 -78
- package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
- package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
- package/templates/skills/application/SKILL.md +6 -7
- package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
- package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
- package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
- package/templates/skills/application/references/backend-verification.md +1 -1
- package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
- package/templates/skills/application/references/frontend-route-naming.md +117 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
- package/templates/skills/application/references/frontend-verification.md +12 -12
- package/templates/skills/application/references/init-parameter-detection.md +120 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
- package/templates/skills/application/references/provider-template.md +2 -6
- package/templates/skills/application/references/roles-client-project-handling.md +55 -0
- package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
- package/templates/skills/application/references/test-coverage-requirements.md +213 -0
- package/templates/skills/application/references/test-frontend.md +3 -3
- package/templates/skills/application/steps/step-00-init.md +11 -141
- package/templates/skills/application/steps/step-01-navigation.md +3 -3
- package/templates/skills/application/steps/step-02-permissions.md +4 -4
- package/templates/skills/application/steps/step-03-roles.md +18 -175
- package/templates/skills/application/steps/step-03b-provider.md +1 -2
- package/templates/skills/application/steps/step-04-backend.md +19 -110
- package/templates/skills/application/steps/step-05-frontend.md +17 -143
- package/templates/skills/application/steps/step-06-migration.md +12 -60
- package/templates/skills/application/steps/step-07-tests.md +9 -76
- package/templates/skills/application/templates-backend.md +29 -27
- package/templates/skills/application/templates-frontend.md +48 -48
- package/templates/skills/application/templates-seed.md +57 -131
- package/templates/skills/business-analyse/SKILL.md +27 -30
- package/templates/skills/business-analyse/_architecture.md +6 -6
- package/templates/skills/business-analyse/_shared.md +60 -88
- package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +12 -12
- package/templates/skills/business-analyse/react/components.md +8 -12
- package/templates/skills/business-analyse/react/schema.md +11 -11
- package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
- package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
- package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
- package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
- package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
- package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
- package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
- package/templates/skills/business-analyse/references/prd-generation.md +2 -2
- package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
- package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
- package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
- package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
- package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
- package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
- package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
- package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
- package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
- package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
- package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
- package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
- package/templates/skills/business-analyse/templates-frd.md +25 -25
- package/templates/skills/business-analyse/templates-react.md +15 -21
- package/templates/skills/controller/SKILL.md +1 -1
- package/templates/skills/controller/postman-templates.md +1 -1
- package/templates/skills/controller/references/controller-code-templates.md +2 -2
- package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
- package/templates/skills/controller/references/permission-sync-templates.md +13 -16
- package/templates/skills/controller/steps/step-00-init.md +11 -11
- package/templates/skills/controller/steps/step-03-generate.md +64 -103
- package/templates/skills/controller/templates.md +67 -71
- package/templates/skills/debug/SKILL.md +13 -218
- package/templates/skills/debug/steps/step-00-init.md +57 -0
- package/templates/skills/debug/steps/step-01-analyze.md +219 -0
- package/templates/skills/debug/steps/step-02-resolve.md +85 -0
- package/templates/skills/documentation/SKILL.md +49 -345
- package/templates/skills/documentation/data-schema.md +11 -8
- package/templates/skills/documentation/steps/step-00-init.md +70 -0
- package/templates/skills/documentation/steps/step-01-scan.md +113 -0
- package/templates/skills/documentation/steps/step-02-generate.md +231 -0
- package/templates/skills/documentation/steps/step-03-validate.md +238 -0
- package/templates/skills/documentation/templates.md +480 -322
- package/templates/skills/efcore/references/both-contexts.md +32 -0
- package/templates/skills/efcore/references/database-operations.md +67 -0
- package/templates/skills/efcore/references/destructive-operations.md +38 -0
- package/templates/skills/efcore/references/reset-operations.md +81 -0
- package/templates/skills/efcore/references/seed-methods.md +86 -0
- package/templates/skills/efcore/references/shared-init-functions.md +250 -0
- package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
- package/templates/skills/efcore/references/troubleshooting.md +81 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
- package/templates/skills/efcore/steps/db/step-reset.md +7 -103
- package/templates/skills/efcore/steps/db/step-seed.md +10 -132
- package/templates/skills/efcore/steps/db/step-status.md +5 -44
- package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
- package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
- package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
- package/templates/skills/feature-full/SKILL.md +1 -1
- package/templates/skills/feature-full/steps/step-00-init.md +57 -0
- package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
- package/templates/skills/gitflow/SKILL.md +1 -1
- package/templates/skills/gitflow/_shared.md +23 -0
- package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
- package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
- package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
- package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
- package/templates/skills/gitflow/references/init-questions.md +185 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
- package/templates/skills/gitflow/references/init-version-detection.md +21 -0
- package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
- package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
- package/templates/skills/gitflow/references/merge-execution.md +62 -0
- package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
- package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
- package/templates/skills/gitflow/references/pr-generation.md +58 -0
- package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
- package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
- package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
- package/templates/skills/gitflow/steps/step-commit.md +12 -91
- package/templates/skills/gitflow/steps/step-finish.md +15 -159
- package/templates/skills/gitflow/steps/step-init.md +24 -326
- package/templates/skills/gitflow/steps/step-merge.md +17 -176
- package/templates/skills/gitflow/steps/step-pr.md +10 -116
- package/templates/skills/gitflow/steps/step-start.md +16 -109
- package/templates/skills/gitflow/steps/step-sync.md +6 -69
- package/templates/skills/ralph-loop/SKILL.md +6 -0
- package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
- package/templates/skills/ralph-loop/references/module-transition.md +151 -0
- package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
- package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
- package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
- package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
- package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
- package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
- package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
- package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
- package/templates/skills/workflow/SKILL.md +1 -1
- package/templates/skills/workflow/steps/step-00-init.md +57 -0
|
@@ -11,24 +11,87 @@ Chaque documentation de module DOIT inclure ces sections dans cet ordre:
|
|
|
11
11
|
|
|
12
12
|
| # | Section | Objectif | Public cible |
|
|
13
13
|
|---|---------|----------|--------------|
|
|
14
|
-
| 1 | **Valeur Metier** | Pourquoi cette fonctionnalite existe | Decideurs, Managers |
|
|
15
|
-
| 2 | **
|
|
16
|
-
| 3 | **
|
|
17
|
-
| 4 | **
|
|
18
|
-
| 5 | **
|
|
19
|
-
| 6 | **
|
|
20
|
-
| 7 | **
|
|
21
|
-
| 8 | **
|
|
14
|
+
| 1 | **Valeur Metier** | Pourquoi cette fonctionnalite existe (probleme + solution) | Decideurs, Managers |
|
|
15
|
+
| 2 | **Acces** | Navigation breadcrumb + URL | Utilisateurs |
|
|
16
|
+
| 3 | **Apercu de l'interface** | **Mock UI annote** reproduisant la page reelle | Utilisateurs |
|
|
17
|
+
| 4 | **Formulaire de creation** | **Mock UI annote** du formulaire de creation | Utilisateurs |
|
|
18
|
+
| 5 | **Vue detail** | **Mock UI annote** de la vue detail/edition | Utilisateurs |
|
|
19
|
+
| 6 | **Cas d'usage** | Exemples concrets avec personas | Utilisateurs finaux |
|
|
20
|
+
| 7 | **Fonctionnalites** | Liste detaillee des capacites avec exemples | Utilisateurs |
|
|
21
|
+
| 8 | **FAQ** | Questions non-techniques | Tous |
|
|
22
|
+
| 9 | **Reference technique** | Permissions, API, regles metier (collapsible) | Admins |
|
|
23
|
+
|
|
24
|
+
> **SUPPRIME:** Les sections "Benefices" et "Avant/Apres" ne sont plus incluses.
|
|
25
|
+
> Ce n'est pas un document de vente, mais une documentation utilisateur.
|
|
22
26
|
|
|
23
27
|
---
|
|
24
28
|
|
|
25
|
-
##
|
|
29
|
+
## REGLE FONDAMENTALE: Lire la vraie page AVANT de generer
|
|
26
30
|
|
|
27
|
-
> **
|
|
28
|
-
>
|
|
29
|
-
>
|
|
31
|
+
> **OBLIGATOIRE:** Avant de generer le Mock UI, lire le composant TSX de la vraie page
|
|
32
|
+
> (ex: `TenantsTemplatePage.tsx`, `UsersPage.tsx`). Le Mock UI doit reproduire
|
|
33
|
+
> fidelement l'interface reelle, PAS une interface generique avec des KPI/tables.
|
|
34
|
+
>
|
|
35
|
+
> - Si la vraie page affiche 2 cartes template → le Mock UI montre 2 cartes template
|
|
36
|
+
> - Si la vraie page est un tableau de gestion → le Mock UI montre un tableau
|
|
37
|
+
> - Si la vraie page est un Kanban → le Mock UI montre un Kanban
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Mock UI TSX Approach (TYPE: user — PRIMARY)
|
|
42
|
+
|
|
43
|
+
> **Principe:** Pour les docs de type `user`, generer un **composant TSX autonome** (~400-600 lignes)
|
|
44
|
+
> avec des Mock UI **annotes** qui reproduisent fidelement les vraies pages
|
|
45
|
+
> de l'application. Chaque Mock UI est suivi d'annotations explicatives.
|
|
46
|
+
>
|
|
47
|
+
> **IMPORTANT:** NE PAS utiliser DocRenderer pour le type `user`. Generer un TSX standalone.
|
|
48
|
+
|
|
49
|
+
### Fichiers a generer par module
|
|
50
|
+
|
|
51
|
+
**1. Page TSX** (`index.tsx`, ~400-600 lignes) : Composant autonome avec Mock UI annotes.
|
|
52
|
+
|
|
53
|
+
**2. i18n dans les 4 langues** : FR (source), EN, DE, IT. Tous les fichiers sont generes.
|
|
54
|
+
|
|
55
|
+
### i18n JSON : Structure PLATE (pas de cle racine)
|
|
56
|
+
|
|
57
|
+
> **IMPORTANT:** Pour les pages standalone (type `user`), le JSON i18n doit etre **PLAT** (pas de cle racine).
|
|
58
|
+
> `useTranslation('docsAdministrationTenantsTemplate')` + `t('title')` resout en
|
|
59
|
+
> `docsAdministrationTenantsTemplate.title`. Si le JSON a une cle racine, ca devient
|
|
60
|
+
> `docsAdministrationTenantsTemplate.docsAdministrationTenantsTemplate.title` → ERREUR.
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
// CORRECT pour standalone (type user) - JSON PLAT :
|
|
64
|
+
{
|
|
65
|
+
"title": "Templates de Tenant",
|
|
66
|
+
"subtitle": "Description...",
|
|
67
|
+
"sections": { "businessValue": "Pourquoi ce module ?" }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// INCORRECT pour standalone :
|
|
71
|
+
{
|
|
72
|
+
"docsAdministrationTenantsTemplate": {
|
|
73
|
+
"title": "Templates de Tenant"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// CORRECT pour DocRenderer (type developer/database/testing) - AVEC cle racine :
|
|
78
|
+
{
|
|
79
|
+
"docsAdministrationUsers": {
|
|
80
|
+
"overview": { "objective": "..." }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## DocRenderer Approach (TYPE: developer|database|testing)
|
|
88
|
+
|
|
89
|
+
> **Usage:** Pour les docs `developer`, `database`, et `testing` uniquement.
|
|
90
|
+
> Genere un fichier de DONNEES (`doc-data.ts`, ~50 lignes) + un wrapper minimal.
|
|
91
|
+
> Le rendu est assure par le composant partage `DocRenderer` dans `web/.../components/docs/`.
|
|
92
|
+
> Voir [data-schema.md](data-schema.md) pour le mapping complet.
|
|
93
|
+
|
|
94
|
+
### Fichiers a generer par module
|
|
32
95
|
|
|
33
96
|
**1. Data file** (`doc-data.ts`) : Voir [data-schema.md](data-schema.md) pour le mapping complet.
|
|
34
97
|
|
|
@@ -42,54 +105,117 @@ export default function {ModuleName}DocPage() {
|
|
|
42
105
|
}
|
|
43
106
|
```
|
|
44
107
|
|
|
45
|
-
|
|
108
|
+
---
|
|
46
109
|
|
|
47
|
-
|
|
48
|
-
> Le renderer affiche un placeholder "Screenshot à venir" si l'image n'existe pas.
|
|
110
|
+
## Composant Helper: Annotation
|
|
49
111
|
|
|
50
|
-
|
|
112
|
+
> **OBLIGATOIRE** pour chaque section Mock UI. Un Mock sans explication ne sert a rien.
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { Info } from 'lucide-react';
|
|
116
|
+
|
|
117
|
+
function Annotation({ text }: { text: string }) {
|
|
118
|
+
return (
|
|
119
|
+
<div className="flex items-start gap-2 p-2.5 rounded-lg bg-blue-500/5 border border-blue-500/15 text-sm text-blue-700 dark:text-blue-400">
|
|
120
|
+
<Info className="w-4 h-4 mt-0.5 flex-shrink-0" />
|
|
121
|
+
<span>{text}</span>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
```
|
|
51
126
|
|
|
52
|
-
|
|
127
|
+
**Utilisation:** Apres chaque bloc Mock UI, ajouter un `<div className="space-y-2 mt-4">` contenant
|
|
128
|
+
les `<Annotation text={t('section.annotations.key')} />` pour chaque element visuel.
|
|
53
129
|
|
|
54
|
-
|
|
130
|
+
### Exemple d'annotation apres un Mock UI
|
|
55
131
|
|
|
56
132
|
```tsx
|
|
57
|
-
|
|
133
|
+
{/* Mock UI card ici */}
|
|
134
|
+
<div className="card p-6">...</div>
|
|
135
|
+
|
|
136
|
+
{/* Annotations explicatives */}
|
|
137
|
+
<div className="space-y-2 mt-4">
|
|
138
|
+
<Annotation text={t('interface.annotations.icon')} />
|
|
139
|
+
<Annotation text={t('interface.annotations.title')} />
|
|
140
|
+
<Annotation text={t('interface.annotations.code')} />
|
|
141
|
+
<Annotation text={t('interface.annotations.defaultBadge')} />
|
|
142
|
+
<Annotation text={t('interface.annotations.cta')} />
|
|
143
|
+
</div>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Template TSX Mock UI (TYPE: user)
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
// web/smartstack-web/src/pages/docs/business/{application}/{module}/index.tsx
|
|
58
152
|
|
|
59
153
|
import { Link } from 'react-router-dom';
|
|
60
154
|
import { useTranslation } from 'react-i18next';
|
|
61
155
|
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
XCircle,
|
|
65
|
-
Lightbulb,
|
|
156
|
+
ArrowLeft,
|
|
157
|
+
Info,
|
|
66
158
|
Target,
|
|
67
|
-
|
|
68
|
-
DollarSign,
|
|
159
|
+
Lightbulb,
|
|
69
160
|
Users,
|
|
70
|
-
TrendingUp,
|
|
71
161
|
Zap,
|
|
72
|
-
|
|
73
|
-
|
|
162
|
+
ChevronDown,
|
|
163
|
+
// + icones specifiques au module
|
|
74
164
|
} from 'lucide-react';
|
|
75
165
|
|
|
76
|
-
|
|
77
|
-
|
|
166
|
+
// ═══════════════════════════════════════════════════
|
|
167
|
+
// Helper: Annotation (obligatoire pour chaque Mock UI)
|
|
168
|
+
// ═══════════════════════════════════════════════════
|
|
169
|
+
function Annotation({ text }: { text: string }) {
|
|
170
|
+
return (
|
|
171
|
+
<div className="flex items-start gap-2 p-2.5 rounded-lg bg-blue-500/5 border border-blue-500/15 text-sm text-blue-700 dark:text-blue-400">
|
|
172
|
+
<Info className="w-4 h-4 mt-0.5 flex-shrink-0" />
|
|
173
|
+
<span>{text}</span>
|
|
174
|
+
</div>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// ═══════════════════════════════════════════════════
|
|
179
|
+
// Data: API Endpoints (extraits du vrai controller)
|
|
180
|
+
// ═══════════════════════════════════════════════════
|
|
181
|
+
const apiEndpoints = [
|
|
182
|
+
// Remplir avec les vrais endpoints du controller
|
|
183
|
+
{ method: 'GET', path: '/api/...', handler: 'GetAll', permission: '...' },
|
|
184
|
+
];
|
|
185
|
+
|
|
186
|
+
// ═══════════════════════════════════════════════════
|
|
187
|
+
// Data: Business Rules (extraites du domain/tests)
|
|
188
|
+
// ═══════════════════════════════════════════════════
|
|
189
|
+
const businessRules = [
|
|
190
|
+
// Remplir avec les vraies regles metier
|
|
191
|
+
{ id: 'BR-001', rule: '...' },
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
export default function {Module}DocPage() {
|
|
195
|
+
const { t } = useTranslation('docsAdministration{Module}');
|
|
78
196
|
|
|
79
197
|
return (
|
|
80
|
-
<div className="space-y-8">
|
|
81
|
-
{/*
|
|
198
|
+
<div className="space-y-8 max-w-5xl mx-auto pb-12">
|
|
199
|
+
{/* BREADCRUMB + BACK */}
|
|
200
|
+
<div>
|
|
201
|
+
<Link to="/docs/business/platform/administration/tenants"
|
|
202
|
+
className="inline-flex items-center gap-1.5 text-sm text-[var(--text-secondary)] hover:text-[var(--color-primary-600)] mb-4">
|
|
203
|
+
<ArrowLeft className="w-4 h-4" />
|
|
204
|
+
{t('nav.backToParent')}
|
|
205
|
+
</Link>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
{/* HEADER */}
|
|
82
209
|
<div>
|
|
83
210
|
<h1 className="text-3xl font-bold mb-4 flex items-center gap-3">
|
|
84
211
|
<ModuleIcon className="w-8 h-8 text-[var(--color-primary-600)]" />
|
|
85
|
-
{t('
|
|
212
|
+
{t('title')}
|
|
86
213
|
</h1>
|
|
87
|
-
{/* PROPOSITION DE VALEUR - 1 phrase percutante */}
|
|
88
214
|
<p className="text-xl text-[var(--color-primary-600)] font-medium mb-2">
|
|
89
|
-
{t('
|
|
215
|
+
{t('valueProposition')}
|
|
90
216
|
</p>
|
|
91
217
|
<p className="text-lg text-[var(--text-secondary)]">
|
|
92
|
-
{t('
|
|
218
|
+
{t('subtitle')}
|
|
93
219
|
</p>
|
|
94
220
|
</div>
|
|
95
221
|
|
|
@@ -99,304 +225,302 @@ export function {ModuleName}DocPage() {
|
|
|
99
225
|
<section id="valeur" className="scroll-mt-4">
|
|
100
226
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
101
227
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">1</span>
|
|
102
|
-
|
|
228
|
+
{t('sections.businessValue')}
|
|
103
229
|
</h2>
|
|
104
230
|
|
|
105
231
|
<div className="card p-6">
|
|
106
|
-
{/* Probleme resolu */}
|
|
107
232
|
<div className="mb-6">
|
|
108
233
|
<h3 className="font-semibold mb-3 flex items-center gap-2">
|
|
109
234
|
<Target className="w-5 h-5 text-red-500" />
|
|
110
|
-
|
|
235
|
+
{t('sections.problem')}
|
|
111
236
|
</h3>
|
|
112
|
-
<p className="text-[var(--text-secondary)]">
|
|
113
|
-
{t('{module}.problem')}
|
|
114
|
-
</p>
|
|
237
|
+
<p className="text-[var(--text-secondary)]">{t('problem')}</p>
|
|
115
238
|
</div>
|
|
116
239
|
|
|
117
|
-
{/* Solution apportee */}
|
|
118
240
|
<div className="p-4 rounded-lg bg-green-500/10 border border-green-500/20">
|
|
119
241
|
<h3 className="font-semibold mb-2 flex items-center gap-2 text-green-700">
|
|
120
242
|
<Lightbulb className="w-5 h-5" />
|
|
121
|
-
|
|
243
|
+
{t('sections.solution')}
|
|
122
244
|
</h3>
|
|
123
|
-
<p className="text-[var(--text-secondary)]">
|
|
124
|
-
{t('{module}.solution')}
|
|
125
|
-
</p>
|
|
245
|
+
<p className="text-[var(--text-secondary)]">{t('solution')}</p>
|
|
126
246
|
</div>
|
|
127
247
|
</div>
|
|
128
248
|
</section>
|
|
129
249
|
|
|
130
250
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
131
|
-
{/* SECTION 2:
|
|
251
|
+
{/* SECTION 2: ACCES - Navigation */}
|
|
132
252
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
133
|
-
<section id="
|
|
253
|
+
<section id="acces" className="scroll-mt-4">
|
|
134
254
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
135
255
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">2</span>
|
|
136
|
-
|
|
256
|
+
{t('sections.access')}
|
|
137
257
|
</h2>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
<Users className="w-6 h-6 text-blue-600" />
|
|
145
|
-
</div>
|
|
146
|
-
<div>
|
|
147
|
-
<div className="font-semibold">{t('{module}.useCases.1.persona')}</div>
|
|
148
|
-
<div className="text-sm text-[var(--text-secondary)]">{t('{module}.useCases.1.role')}</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
<div className="space-y-3">
|
|
152
|
-
<div className="text-sm">
|
|
153
|
-
<span className="font-medium text-[var(--text-secondary)]">Situation:</span>
|
|
154
|
-
<p>{t('{module}.useCases.1.situation')}</p>
|
|
155
|
-
</div>
|
|
156
|
-
<div className="text-sm">
|
|
157
|
-
<span className="font-medium text-green-600">Avec {t('{module}.title')}:</span>
|
|
158
|
-
<p>{t('{module}.useCases.1.withFeature')}</p>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
{/* Cas d'usage 2 */}
|
|
164
|
-
<div className="card p-6">
|
|
165
|
-
<div className="flex items-center gap-3 mb-4">
|
|
166
|
-
<div className="w-12 h-12 rounded-full bg-purple-500/10 flex items-center justify-center">
|
|
167
|
-
<Users className="w-6 h-6 text-purple-600" />
|
|
168
|
-
</div>
|
|
169
|
-
<div>
|
|
170
|
-
<div className="font-semibold">{t('{module}.useCases.2.persona')}</div>
|
|
171
|
-
<div className="text-sm text-[var(--text-secondary)]">{t('{module}.useCases.2.role')}</div>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
<div className="space-y-3">
|
|
175
|
-
<div className="text-sm">
|
|
176
|
-
<span className="font-medium text-[var(--text-secondary)]">Situation:</span>
|
|
177
|
-
<p>{t('{module}.useCases.2.situation')}</p>
|
|
178
|
-
</div>
|
|
179
|
-
<div className="text-sm">
|
|
180
|
-
<span className="font-medium text-green-600">Avec {t('{module}.title')}:</span>
|
|
181
|
-
<p>{t('{module}.useCases.2.withFeature')}</p>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
258
|
+
<div className="card p-6">
|
|
259
|
+
{/* Breadcrumb de navigation et URL */}
|
|
260
|
+
<div className="flex items-center gap-2 text-sm">
|
|
261
|
+
<span>Platform</span> <span>›</span>
|
|
262
|
+
<span>Administration</span> <span>›</span>
|
|
263
|
+
<span className="font-semibold">{t('title')}</span>
|
|
184
264
|
</div>
|
|
265
|
+
<code className="mt-2 block text-xs text-[var(--text-secondary)]">
|
|
266
|
+
/platform/administration/{module}
|
|
267
|
+
</code>
|
|
185
268
|
</div>
|
|
186
269
|
</section>
|
|
187
270
|
|
|
188
271
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
189
|
-
{/* SECTION 3:
|
|
272
|
+
{/* SECTION 3: APERCU DE L'INTERFACE — Mock UI ANNOTE */}
|
|
190
273
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
191
|
-
|
|
274
|
+
{/* */}
|
|
275
|
+
{/* IMPORTANT: Le Mock UI ci-dessous doit reproduire fidelement */}
|
|
276
|
+
{/* la VRAIE page TSX du module. Lire le composant source d'abord. */}
|
|
277
|
+
{/* */}
|
|
278
|
+
{/* Exemples: */}
|
|
279
|
+
{/* - TenantsTemplatePage → 2 cartes template (Personal + Business) */}
|
|
280
|
+
{/* - UsersPage → tableau de gestion avec filtres */}
|
|
281
|
+
{/* - TicketsPage → Kanban board avec colonnes par statut */}
|
|
282
|
+
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
283
|
+
<section id="interface" className="scroll-mt-4">
|
|
192
284
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
193
285
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">3</span>
|
|
194
|
-
|
|
286
|
+
{t('sections.interface')}
|
|
195
287
|
</h2>
|
|
196
288
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
<Clock className="w-8 h-8 text-blue-600" />
|
|
202
|
-
</div>
|
|
203
|
-
<div className="text-3xl font-bold text-blue-600 mb-2">-70%</div>
|
|
204
|
-
<div className="font-semibold mb-1">Temps economise</div>
|
|
205
|
-
<p className="text-sm text-[var(--text-secondary)]">
|
|
206
|
-
{t('{module}.benefits.time.description')}
|
|
207
|
-
</p>
|
|
208
|
-
</div>
|
|
209
|
-
|
|
210
|
-
{/* Benefice 2: Reduction des erreurs */}
|
|
211
|
-
<div className="card p-6 text-center">
|
|
212
|
-
<div className="w-16 h-16 mx-auto mb-4 rounded-full bg-green-500/10 flex items-center justify-center">
|
|
213
|
-
<TrendingUp className="w-8 h-8 text-green-600" />
|
|
214
|
-
</div>
|
|
215
|
-
<div className="text-3xl font-bold text-green-600 mb-2">+95%</div>
|
|
216
|
-
<div className="font-semibold mb-1">Fiabilite</div>
|
|
217
|
-
<p className="text-sm text-[var(--text-secondary)]">
|
|
218
|
-
{t('{module}.benefits.quality.description')}
|
|
219
|
-
</p>
|
|
220
|
-
</div>
|
|
289
|
+
{/* Mock UI reproduisant la vraie page */}
|
|
290
|
+
<div className="card p-6">
|
|
291
|
+
{/* ... MOCK UI FIDELE A LA VRAIE PAGE ... */}
|
|
292
|
+
</div>
|
|
221
293
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<div className="text-3xl font-bold text-amber-600 mb-2">3x</div>
|
|
228
|
-
<div className="font-semibold mb-1">Retour sur investissement</div>
|
|
229
|
-
<p className="text-sm text-[var(--text-secondary)]">
|
|
230
|
-
{t('{module}.benefits.roi.description')}
|
|
231
|
-
</p>
|
|
232
|
-
</div>
|
|
294
|
+
{/* ANNOTATIONS OBLIGATOIRES apres le Mock UI */}
|
|
295
|
+
<div className="space-y-2 mt-4">
|
|
296
|
+
<Annotation text={t('interface.annotations.element1')} />
|
|
297
|
+
<Annotation text={t('interface.annotations.element2')} />
|
|
298
|
+
{/* ... une annotation par element visuel important ... */}
|
|
233
299
|
</div>
|
|
234
300
|
</section>
|
|
235
301
|
|
|
236
302
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
237
|
-
{/* SECTION 4:
|
|
303
|
+
{/* SECTION 4: FORMULAIRE DE CREATION — Mock UI ANNOTE */}
|
|
238
304
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
239
|
-
<section id="
|
|
305
|
+
<section id="form" className="scroll-mt-4">
|
|
240
306
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
241
307
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">4</span>
|
|
242
|
-
|
|
308
|
+
{t('sections.createForm')}
|
|
243
309
|
</h2>
|
|
244
310
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
{/* AVANT */}
|
|
248
|
-
<div className="p-4 rounded-lg bg-red-500/5 border border-red-500/20">
|
|
249
|
-
<h3 className="font-semibold mb-4 flex items-center gap-2 text-red-600">
|
|
250
|
-
<XCircle className="w-5 h-5" />
|
|
251
|
-
Avant: Sans {t('{module}.title')}
|
|
252
|
-
</h3>
|
|
253
|
-
<ul className="space-y-2">
|
|
254
|
-
{[1, 2, 3, 4].map((i) => (
|
|
255
|
-
<li key={i} className="flex items-start gap-2 text-sm">
|
|
256
|
-
<XCircle className="w-4 h-4 text-red-500 mt-0.5 flex-shrink-0" />
|
|
257
|
-
<span>{t(`{module}.before.${i}`)}</span>
|
|
258
|
-
</li>
|
|
259
|
-
))}
|
|
260
|
-
</ul>
|
|
261
|
-
</div>
|
|
311
|
+
{/* Paragraphe d'introduction */}
|
|
312
|
+
<p className="text-[var(--text-secondary)] mb-4">{t('form.desc')}</p>
|
|
262
313
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
))}
|
|
276
|
-
</ul>
|
|
277
|
-
</div>
|
|
314
|
+
{/* Mock UI du formulaire */}
|
|
315
|
+
<div className="border border-[var(--border-color)] rounded-lg p-6 bg-[var(--bg-secondary)]">
|
|
316
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
317
|
+
{/* Champs de formulaire adaptes au module */}
|
|
318
|
+
</div>
|
|
319
|
+
<div className="flex items-center gap-3 mt-6 pt-6 border-t border-[var(--border-color)]">
|
|
320
|
+
<button className="px-4 py-2 bg-[var(--color-primary-600)] text-white rounded-lg">
|
|
321
|
+
{t('form.create')}
|
|
322
|
+
</button>
|
|
323
|
+
<button className="px-4 py-2 border border-[var(--border-color)] rounded-lg">
|
|
324
|
+
{t('form.cancel')}
|
|
325
|
+
</button>
|
|
278
326
|
</div>
|
|
279
327
|
</div>
|
|
328
|
+
|
|
329
|
+
{/* ANNOTATIONS OBLIGATOIRES apres le formulaire */}
|
|
330
|
+
<div className="space-y-2 mt-4">
|
|
331
|
+
<Annotation text={t('form.annotations.field1')} />
|
|
332
|
+
<Annotation text={t('form.annotations.field2')} />
|
|
333
|
+
<Annotation text={t('form.annotations.actions')} />
|
|
334
|
+
</div>
|
|
280
335
|
</section>
|
|
281
336
|
|
|
282
337
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
283
|
-
{/* SECTION 5:
|
|
338
|
+
{/* SECTION 5: VUE DETAIL — Mock UI ANNOTE */}
|
|
284
339
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
285
|
-
<section id="
|
|
340
|
+
<section id="detail" className="scroll-mt-4">
|
|
286
341
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
287
342
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">5</span>
|
|
288
|
-
|
|
343
|
+
{t('sections.detailView')}
|
|
289
344
|
</h2>
|
|
290
345
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
<div className="card p-6">
|
|
294
|
-
<div className="flex items-start gap-4">
|
|
295
|
-
<div className="w-12 h-12 rounded-lg bg-[var(--color-primary-600)]/10 flex items-center justify-center flex-shrink-0">
|
|
296
|
-
<Zap className="w-6 h-6 text-[var(--color-primary-600)]" />
|
|
297
|
-
</div>
|
|
298
|
-
<div className="flex-1">
|
|
299
|
-
<h3 className="font-semibold mb-2">{t('{module}.features.1.title')}</h3>
|
|
300
|
-
<p className="text-[var(--text-secondary)] mb-3">
|
|
301
|
-
{t('{module}.features.1.description')}
|
|
302
|
-
</p>
|
|
303
|
-
{/* Exemple concret */}
|
|
304
|
-
<div className="p-3 rounded-lg bg-[var(--bg-secondary)] text-sm">
|
|
305
|
-
<span className="font-medium text-[var(--color-primary-600)]">Exemple: </span>
|
|
306
|
-
{t('{module}.features.1.example')}
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
</div>
|
|
346
|
+
{/* Paragraphe d'introduction */}
|
|
347
|
+
<p className="text-[var(--text-secondary)] mb-4">{t('detail.desc')}</p>
|
|
311
348
|
|
|
312
|
-
|
|
349
|
+
{/* Mock UI de la vue detail */}
|
|
350
|
+
<div className="card p-6">
|
|
351
|
+
{/* ... MOCK UI FIDELE A LA VRAIE VUE DETAIL ... */}
|
|
352
|
+
</div>
|
|
353
|
+
|
|
354
|
+
{/* ANNOTATIONS OBLIGATOIRES */}
|
|
355
|
+
<div className="space-y-2 mt-4">
|
|
356
|
+
<Annotation text={t('detail.annotations.header')} />
|
|
357
|
+
<Annotation text={t('detail.annotations.tabs')} />
|
|
358
|
+
<Annotation text={t('detail.annotations.stats')} />
|
|
313
359
|
</div>
|
|
314
360
|
</section>
|
|
315
361
|
|
|
316
362
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
317
|
-
{/* SECTION 6:
|
|
363
|
+
{/* SECTION 6: CAS D'USAGE - Exemples concrets */}
|
|
318
364
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
319
|
-
<section id="
|
|
365
|
+
<section id="cas-usage" className="scroll-mt-4">
|
|
320
366
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
321
367
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">6</span>
|
|
322
|
-
|
|
368
|
+
{t('sections.useCases')}
|
|
323
369
|
</h2>
|
|
324
370
|
|
|
325
|
-
<div className="
|
|
326
|
-
|
|
327
|
-
{
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
371
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
372
|
+
{[1, 2, 3].map((i) => (
|
|
373
|
+
<div key={i} className="card p-6">
|
|
374
|
+
<div className="flex items-center gap-3 mb-4">
|
|
375
|
+
<div className="w-10 h-10 rounded-full bg-blue-500/10 flex items-center justify-center">
|
|
376
|
+
<Users className="w-5 h-5 text-blue-600" />
|
|
377
|
+
</div>
|
|
378
|
+
<div>
|
|
379
|
+
<div className="font-semibold">{t(`useCases.${i}.persona`)}</div>
|
|
380
|
+
<div className="text-sm text-[var(--text-secondary)]">{t(`useCases.${i}.role`)}</div>
|
|
332
381
|
</div>
|
|
333
|
-
<div className="w-0.5 h-full bg-[var(--border-color)] mt-2"></div>
|
|
334
382
|
</div>
|
|
335
|
-
<div className="
|
|
336
|
-
<
|
|
337
|
-
|
|
338
|
-
{t(
|
|
339
|
-
</
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
383
|
+
<div className="space-y-3">
|
|
384
|
+
<div className="text-sm">
|
|
385
|
+
<span className="font-medium text-[var(--text-secondary)]">Situation:</span>
|
|
386
|
+
<p>{t(`useCases.${i}.situation`)}</p>
|
|
387
|
+
</div>
|
|
388
|
+
<div className="text-sm p-3 rounded-lg bg-green-500/5 border border-green-500/15">
|
|
389
|
+
<span className="font-medium text-green-600">Avec la fonctionnalite:</span>
|
|
390
|
+
<p>{t(`useCases.${i}.withFeature`)}</p>
|
|
343
391
|
</div>
|
|
344
392
|
</div>
|
|
345
393
|
</div>
|
|
346
|
-
|
|
347
|
-
{/* Repeter pour chaque etape */}
|
|
348
|
-
</div>
|
|
394
|
+
))}
|
|
349
395
|
</div>
|
|
350
396
|
</section>
|
|
351
397
|
|
|
352
398
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
353
|
-
{/* SECTION 7:
|
|
399
|
+
{/* SECTION 7: FONCTIONNALITES DETAILLEES */}
|
|
354
400
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
355
|
-
<section id="
|
|
401
|
+
<section id="fonctionnalites" className="scroll-mt-4">
|
|
356
402
|
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
357
403
|
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">7</span>
|
|
358
|
-
|
|
404
|
+
{t('sections.features')}
|
|
359
405
|
</h2>
|
|
360
406
|
|
|
361
407
|
<div className="space-y-4">
|
|
362
|
-
{
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
408
|
+
{[1, 2, 3, 4, 5].map((i) => (
|
|
409
|
+
<div key={i} className="card p-6">
|
|
410
|
+
<div className="flex items-start gap-4">
|
|
411
|
+
<div className="w-10 h-10 rounded-lg bg-[var(--color-primary-600)]/10 flex items-center justify-center flex-shrink-0">
|
|
412
|
+
<Zap className="w-5 h-5 text-[var(--color-primary-600)]" />
|
|
413
|
+
</div>
|
|
414
|
+
<div className="flex-1">
|
|
415
|
+
<h3 className="font-semibold mb-2">{t(`features.${i}.title`)}</h3>
|
|
416
|
+
<p className="text-[var(--text-secondary)] mb-3">{t(`features.${i}.description`)}</p>
|
|
417
|
+
<div className="p-3 rounded-lg bg-[var(--bg-secondary)] text-sm">
|
|
418
|
+
<span className="font-medium text-[var(--color-primary-600)]">Exemple: </span>
|
|
419
|
+
{t(`features.${i}.example`)}
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
))}
|
|
425
|
+
</div>
|
|
426
|
+
</section>
|
|
427
|
+
|
|
428
|
+
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
429
|
+
{/* SECTION 8: FAQ */}
|
|
430
|
+
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
431
|
+
<section id="faq" className="scroll-mt-4">
|
|
432
|
+
<h2 className="text-2xl font-bold mb-4 flex items-center gap-2">
|
|
433
|
+
<span className="w-8 h-8 rounded-full bg-[var(--color-primary-600)] text-white flex items-center justify-center text-sm">8</span>
|
|
434
|
+
{t('sections.faq')}
|
|
435
|
+
</h2>
|
|
436
|
+
|
|
437
|
+
<div className="space-y-3">
|
|
438
|
+
{[1, 2, 3, 4, 5].map((i) => (
|
|
439
|
+
<details key={i} className="card group">
|
|
440
|
+
<summary className="p-4 cursor-pointer hover:bg-[var(--bg-secondary)] rounded-lg font-medium flex items-center justify-between">
|
|
441
|
+
{t(`faq.${i}.question`)}
|
|
442
|
+
<ChevronDown className="w-4 h-4 text-[var(--text-secondary)] group-open:rotate-180 transition-transform" />
|
|
443
|
+
</summary>
|
|
444
|
+
<div className="px-4 pb-4 text-sm text-[var(--text-secondary)]">
|
|
445
|
+
{t(`faq.${i}.answer`)}
|
|
446
|
+
</div>
|
|
447
|
+
</details>
|
|
448
|
+
))}
|
|
371
449
|
</div>
|
|
372
450
|
</section>
|
|
373
451
|
|
|
374
452
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
375
|
-
{/* SECTION
|
|
453
|
+
{/* SECTION 9: REFERENCE TECHNIQUE (collapsible) */}
|
|
376
454
|
{/* ══════════════════════════════════════════════════════════════════ */}
|
|
377
455
|
<section id="reference" className="scroll-mt-4">
|
|
378
456
|
<details className="card">
|
|
379
457
|
<summary className="p-4 cursor-pointer hover:bg-[var(--bg-secondary)] rounded-lg font-semibold flex items-center gap-2">
|
|
380
|
-
<span className="w-8 h-8 rounded-full bg-gray-500/10 text-gray-600 flex items-center justify-center text-sm">
|
|
381
|
-
|
|
458
|
+
<span className="w-8 h-8 rounded-full bg-gray-500/10 text-gray-600 flex items-center justify-center text-sm">9</span>
|
|
459
|
+
{t('sections.technicalRef')}
|
|
382
460
|
</summary>
|
|
383
|
-
<div className="p-
|
|
384
|
-
|
|
461
|
+
<div className="p-6 pt-2 space-y-8">
|
|
462
|
+
|
|
463
|
+
{/* Regles metier */}
|
|
464
|
+
<div>
|
|
465
|
+
<h3 className="font-semibold mb-3">{t('techRef.businessRules')}</h3>
|
|
466
|
+
<div className="overflow-x-auto">
|
|
467
|
+
<table className="w-full text-sm">
|
|
468
|
+
<thead>
|
|
469
|
+
<tr className="bg-[var(--bg-secondary)]">
|
|
470
|
+
<th className="text-left py-2 px-3 w-24">ID</th>
|
|
471
|
+
<th className="text-left py-2 px-3">Regle</th>
|
|
472
|
+
</tr>
|
|
473
|
+
</thead>
|
|
474
|
+
<tbody>
|
|
475
|
+
{businessRules.map((rule) => (
|
|
476
|
+
<tr key={rule.id} className="border-b border-[var(--border-color)]">
|
|
477
|
+
<td className="py-2 px-3 font-mono text-xs">{rule.id}</td>
|
|
478
|
+
<td className="py-2 px-3">{t(`techRef.rules.${rule.id}`)}</td>
|
|
479
|
+
</tr>
|
|
480
|
+
))}
|
|
481
|
+
</tbody>
|
|
482
|
+
</table>
|
|
483
|
+
</div>
|
|
484
|
+
</div>
|
|
485
|
+
|
|
486
|
+
{/* API Endpoints */}
|
|
487
|
+
<div>
|
|
488
|
+
<h3 className="font-semibold mb-3">{t('techRef.apiEndpoints')}</h3>
|
|
489
|
+
<div className="overflow-x-auto">
|
|
490
|
+
<table className="w-full text-sm">
|
|
491
|
+
<thead>
|
|
492
|
+
<tr className="bg-[var(--bg-secondary)]">
|
|
493
|
+
<th className="text-left py-2 px-3">Method</th>
|
|
494
|
+
<th className="text-left py-2 px-3">Endpoint</th>
|
|
495
|
+
<th className="text-left py-2 px-3">Handler</th>
|
|
496
|
+
<th className="text-left py-2 px-3">Permission</th>
|
|
497
|
+
</tr>
|
|
498
|
+
</thead>
|
|
499
|
+
<tbody>
|
|
500
|
+
{apiEndpoints.map((ep, i) => (
|
|
501
|
+
<tr key={i} className="border-b border-[var(--border-color)]">
|
|
502
|
+
<td className="py-2 px-3">
|
|
503
|
+
<span className={`px-2 py-0.5 rounded text-xs font-medium ${
|
|
504
|
+
ep.method === 'GET' ? 'bg-blue-500/10 text-blue-600' :
|
|
505
|
+
ep.method === 'POST' ? 'bg-green-500/10 text-green-600' :
|
|
506
|
+
ep.method === 'PUT' ? 'bg-orange-500/10 text-orange-600' :
|
|
507
|
+
ep.method === 'PATCH' ? 'bg-purple-500/10 text-purple-600' :
|
|
508
|
+
'bg-red-500/10 text-red-600'
|
|
509
|
+
}`}>{ep.method}</span>
|
|
510
|
+
</td>
|
|
511
|
+
<td className="py-2 px-3 font-mono text-xs">{ep.path}</td>
|
|
512
|
+
<td className="py-2 px-3 text-[var(--text-secondary)]">{ep.handler}</td>
|
|
513
|
+
<td className="py-2 px-3 font-mono text-xs">{ep.permission}</td>
|
|
514
|
+
</tr>
|
|
515
|
+
))}
|
|
516
|
+
</tbody>
|
|
517
|
+
</table>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
|
|
385
521
|
</div>
|
|
386
522
|
</details>
|
|
387
523
|
</section>
|
|
388
|
-
|
|
389
|
-
{/* NAVIGATION */}
|
|
390
|
-
<div className="flex justify-between pt-6 border-t border-[var(--border-color)]">
|
|
391
|
-
<Link to="/docs/user/previous" className="flex items-center gap-2 text-[var(--text-secondary)] hover:text-[var(--color-primary-600)]">
|
|
392
|
-
<ArrowRight className="w-4 h-4 rotate-180" />
|
|
393
|
-
Module precedent
|
|
394
|
-
</Link>
|
|
395
|
-
<Link to="/docs/user/next" className="flex items-center gap-2 text-[var(--color-primary-600)]">
|
|
396
|
-
Module suivant
|
|
397
|
-
<ArrowRight className="w-4 h-4" />
|
|
398
|
-
</Link>
|
|
399
|
-
</div>
|
|
400
524
|
</div>
|
|
401
525
|
);
|
|
402
526
|
}
|
|
@@ -404,77 +528,104 @@ export function {ModuleName}DocPage() {
|
|
|
404
528
|
|
|
405
529
|
---
|
|
406
530
|
|
|
407
|
-
## Structure i18n (
|
|
531
|
+
## Structure i18n (4 langues obligatoires)
|
|
532
|
+
|
|
533
|
+
> **IMPORTANT:** Generer les 4 langues: FR (source), EN, DE, IT.
|
|
534
|
+
> Chaque fichier i18n est au format **PLAT** (pas de cle racine) pour les pages standalone.
|
|
535
|
+
|
|
536
|
+
### Fichier: `docs-administration-{module}.json`
|
|
408
537
|
|
|
409
538
|
```json
|
|
410
539
|
{
|
|
411
|
-
"
|
|
412
|
-
"
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
"
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
"
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
"
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
540
|
+
"nav": {
|
|
541
|
+
"backToParent": "Retour a {Parent}"
|
|
542
|
+
},
|
|
543
|
+
"title": "Nom du module",
|
|
544
|
+
"valueProposition": "Une phrase percutante resumant la valeur",
|
|
545
|
+
"subtitle": "Description en 1-2 phrases",
|
|
546
|
+
|
|
547
|
+
"sections": {
|
|
548
|
+
"businessValue": "Pourquoi ce module ?",
|
|
549
|
+
"problem": "Le probleme",
|
|
550
|
+
"solution": "La solution",
|
|
551
|
+
"access": "Acces",
|
|
552
|
+
"interface": "Apercu de l'interface",
|
|
553
|
+
"createForm": "Formulaire de creation",
|
|
554
|
+
"detailView": "Vue detail",
|
|
555
|
+
"useCases": "Exemples d'utilisation",
|
|
556
|
+
"benefits": "Benefices concrets",
|
|
557
|
+
"beforeAfter": "Avant / Apres",
|
|
558
|
+
"features": "Ce que vous pouvez faire",
|
|
559
|
+
"faq": "Questions frequentes",
|
|
560
|
+
"technicalRef": "Reference technique (administrateurs)"
|
|
561
|
+
},
|
|
562
|
+
|
|
563
|
+
"problem": "Description du probleme AVANT cette fonctionnalite",
|
|
564
|
+
"solution": "Comment ce module resout le probleme",
|
|
565
|
+
|
|
566
|
+
"access": {
|
|
567
|
+
"navigation": "Navigation"
|
|
568
|
+
},
|
|
569
|
+
|
|
570
|
+
"interface": {
|
|
571
|
+
"sectionTitle": "Titre de la sous-section",
|
|
572
|
+
"annotations": {
|
|
573
|
+
"element1": "Explication de l'element visuel 1 du Mock UI",
|
|
574
|
+
"element2": "Explication de l'element visuel 2 du Mock UI"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
|
|
578
|
+
"form": {
|
|
579
|
+
"desc": "Ce formulaire permet de creer un nouveau...",
|
|
580
|
+
"fieldLabel1": "Label du champ",
|
|
581
|
+
"create": "Creer",
|
|
582
|
+
"cancel": "Annuler",
|
|
583
|
+
"annotations": {
|
|
584
|
+
"field1": "Explication du champ 1",
|
|
585
|
+
"field2": "Explication du champ 2",
|
|
586
|
+
"actions": "Explication des boutons d'action"
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
|
|
590
|
+
"detail": {
|
|
591
|
+
"desc": "La vue detail s'ouvre lorsque...",
|
|
592
|
+
"annotations": {
|
|
593
|
+
"header": "Explication de l'en-tete",
|
|
594
|
+
"tabs": "Explication des onglets",
|
|
595
|
+
"stats": "Explication des indicateurs"
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
|
|
599
|
+
"useCases": {
|
|
600
|
+
"1": {
|
|
601
|
+
"persona": "Sophie",
|
|
602
|
+
"role": "Administratrice plateforme",
|
|
603
|
+
"situation": "Sophie doit...",
|
|
604
|
+
"withFeature": "Elle utilise..."
|
|
605
|
+
}
|
|
606
|
+
},
|
|
607
|
+
|
|
608
|
+
"features": {
|
|
609
|
+
"1": {
|
|
610
|
+
"title": "Nom de la fonctionnalite",
|
|
611
|
+
"description": "Explication claire",
|
|
612
|
+
"example": "Exemple concret"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
|
|
616
|
+
"faq": {
|
|
617
|
+
"1": {
|
|
618
|
+
"question": "Question non-technique ?",
|
|
619
|
+
"answer": "Reponse claire et concise."
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
|
|
623
|
+
"techRef": {
|
|
624
|
+
"businessRules": "Regles metier",
|
|
625
|
+
"apiEndpoints": "Points de terminaison API",
|
|
626
|
+
"rules": {
|
|
627
|
+
"BR-001": "Description de la regle metier 1",
|
|
628
|
+
"BR-002": "Description de la regle metier 2"
|
|
478
629
|
}
|
|
479
630
|
}
|
|
480
631
|
}
|
|
@@ -482,19 +633,26 @@ export function {ModuleName}DocPage() {
|
|
|
482
633
|
|
|
483
634
|
---
|
|
484
635
|
|
|
485
|
-
## Checklist Documentation
|
|
636
|
+
## Checklist Documentation (TYPE: user)
|
|
486
637
|
|
|
487
|
-
Avant de valider une documentation
|
|
638
|
+
Avant de valider une documentation de module `user`, verifier:
|
|
488
639
|
|
|
640
|
+
- [ ] **Standalone TSX** (PAS DocRenderer, PAS doc-data.ts)
|
|
641
|
+
- [ ] **Lecture de la vraie page** TSX source AVANT generation du Mock UI
|
|
642
|
+
- [ ] **Mock UI Section 3: Interface** reproduisant fidelement la vraie page
|
|
643
|
+
- [ ] **Mock UI Section 4: Formulaire** avec champs du vrai formulaire
|
|
644
|
+
- [ ] **Mock UI Section 5: Vue detail** avec onglets/stats de la vraie page
|
|
645
|
+
- [ ] **Annotations** sur chaque section Mock UI (composant `Annotation`)
|
|
489
646
|
- [ ] **Proposition de valeur** claire en 1 phrase
|
|
490
|
-
- [ ] **Probleme**
|
|
647
|
+
- [ ] **Probleme/Solution** du point de vue utilisateur (pas technique)
|
|
491
648
|
- [ ] **2-3 cas d'usage** avec personas nommes
|
|
492
|
-
- [ ] **
|
|
493
|
-
- [ ] **
|
|
494
|
-
- [ ] **
|
|
495
|
-
- [ ] **
|
|
496
|
-
- [ ] **
|
|
497
|
-
- [ ] **
|
|
649
|
+
- [ ] **5 fonctionnalites** avec exemples concrets
|
|
650
|
+
- [ ] **5 FAQ** non-techniques
|
|
651
|
+
- [ ] **Reference technique** collapsible: regles metier + API endpoints reels
|
|
652
|
+
- [ ] **Semantic colors** (`var(--success-*)`, `var(--error-*)`, etc.)
|
|
653
|
+
- [ ] **i18n** via `useTranslation()` — pas de texte hardcode
|
|
654
|
+
- [ ] **i18n 4 langues** : FR, EN, DE, IT (JSON plat, pas de cle racine)
|
|
655
|
+
- [ ] **PAS de section "Benefices"** ni "Avant/Apres"
|
|
498
656
|
|
|
499
657
|
---
|
|
500
658
|
|