Wiki/docs/09-merise-mot.md
Corentin JOGUET 668576cdc4 chore: initial commit — formation-hub conception phase
Conception complete (Phase 0) pour formation-hub Acadenice :

- 19 docs Merise Agile + UML + GitOps + plans (tests/deploy/ops/api)
  cf docs/00-readme.md pour l'index complet
- Stack Docker compose (Docmost + Baserow + Postgres + Redis + MinIO local FS)
  compose.yml + compose.staging.yml + compose.prod.yml
- CI/CD GitHub Actions skeleton (ci, deploy-staging, deploy-prod)
- Bridge service skeleton (Hono + TS + Biome + Vitest + zod + pino)
- Templates GitHub : PR + 3 issue types + CODEOWNERS + dependabot.yml
- Scripts ops : healthcheck, backup quotidien, smoke-test post-deploy
- LICENSE AGPL-3.0 + SECURITY.md + CONTRIBUTING.md + CHANGELOG.md
- Diagramme drawIO archi infra (XML importable dans diagrams.net)

Decisions structurelles enregistrees :
- Scope CFA + Agence avec entite PERSONNE pivot multi-roles (ADR-001)
- Stack composite Docmost AGPL + Baserow MIT + bridge custom (ADR-001)
- Path B : UX quasi-unified via Tiptap node-views custom (ADR-002)
- Monorepo trunk-based development (ADR-003)
- Postgres separe Docmost/Baserow (ADR-004)
- Bridge stack Node 22 + Hono (ADR-005)
- Repo neuf prefere a fork Docmost
- Prod-like des le jour 1 (pas MVP)
2026-05-07 12:16:19 +02:00

7.6 KiB

MOT — Modele Organisationnel de Traitements

Vue organisationnelle des operations : QUI fait QUOI, QUAND, COMMENT, AVEC QUEL OUTIL. Methodologie : Merise. Le MOT prend les operations du MCT et les "concretise" cote organisation.

1. Conventions

  • Type :
    • M = Manuel (saisie utilisateur)
    • A = Automatique (declenche par evenement)
    • B = Batch (planifie)
    • S = Semi-auto (validation manuelle d'un calcul auto)
  • Temps :
    • TR = Temps reel (synchrone)
    • D = Differe (asynchrone, < 1min)
    • B = Batch (planifie cron)
  • Outil : composant qui execute (Baserow UI, Bridge, Cron, Docmost, Email, etc.)

2. Tableau MOT consolide

Code Operation (MCT) Acteur Type Temps Outil Notes
OP-01 Creer formation Admin M TR Baserow UI Formulaire avec validation
OP-02 Decomposer en blocs/modules Admin M TR Baserow UI Vue hierarchique
OP-03 Attribuer module Admin M TR Baserow UI ou bridge form Vue kanban "a attribuer"
OP-04 Saisir heures realisees Formateur M TR Bridge UI mobile-friendly A faire en fin de session ideal
OP-05 Annuler attribution Admin M TR Baserow UI Avec champ justification obligatoire
OP-06 Cloturer module System + Admin S TR Baserow auto + bouton admin Auto si toutes attributions realisees
OP-07 Cloturer formation System A D Cron horaire + bridge webhook Auto si EV-13 + date_fin
OP-08 Recalculer rollups System A TR Baserow rollup natif Re-calc transparent
OP-09 Notifier depassement System A TR Bridge → SMTP / Slack webhook Email + canal interne
OP-10 Archiver formation Admin M TR Baserow UI Action sensible, confirmation requise
OP-11 Rapport formation (PDF) Admin M TR Bridge endpoint /reports/formation/:id Export PDF
OP-12 Rapport formateur (PDF) Admin M TR Bridge endpoint /reports/formateur/:id Export PDF
OP-13 Inviter client par lien Admin M TR Docmost share dialog Lien expirable
OP-14 Backup quotidien System B B (03:00) Cron + Makefile target pg_dump + tar

3. Vue par acteur

Admin

flowchart LR
    A([Admin]) --> OP01[Creer formation]
    A --> OP02[Decomposer]
    A --> OP03[Attribuer]
    A --> OP05[Annuler attribution]
    A --> OP06b[Cloturer module manuel]
    A --> OP10[Archiver]
    A --> OP11[Rapport formation]
    A --> OP12[Rapport formateur]
    A --> OP13[Inviter client]

Charge typique : ~1-2h / semaine de saisie + lectures rapports a la demande.

Formateur

flowchart LR
    F([Formateur]) --> OP04[Saisir heures realisees]
    F --> OP14b[Consulter ses attributions]
    F --> OP15[Editer pages wiki autorisees]

Charge typique : 5-10 min en fin de chaque session de formation pour saisir les heures.

System (auto)

flowchart LR
    S([System]) --> OP06a[Cloturer module auto]
    S --> OP07[Cloturer formation auto]
    S --> OP08[Recalculer rollups]
    S --> OP09[Notifier depassement]
    S --> OP14[Backup quotidien]

Charge : transparent. Cron daily backup, webhooks rollups TR.

4. Repartition Outils

flowchart TB
    subgraph "Baserow"
        OP01[OP-01 Creer formation]
        OP02[OP-02 Decomposer]
        OP03[OP-03 Attribuer]
        OP05[OP-05 Annuler]
        OP08[OP-08 Recalc rollups<br/>natif]
    end
    subgraph "Bridge service"
        OP04[OP-04 Saisie heures<br/>UI mobile]
        OP07[OP-07 Cloturer formation<br/>cron]
        OP09[OP-09 Notifier depassement<br/>webhook + SMTP]
        OP11[OP-11 Rapport formation<br/>PDF]
        OP12[OP-12 Rapport formateur<br/>PDF]
    end
    subgraph "Docmost"
        OP13[OP-13 Inviter client<br/>share link]
        OP15[OP-15 Editer wiki]
    end
    subgraph "Cron host"
        OP14[OP-14 Backup quotidien]
    end

5. Postes de travail / Devices

Acteur Device principal Browser Mobile-friendly attendu ?
Admin Desktop Firefox / Chrome Non prioritaire
Formateur Mobile + Desktop Chrome mobile / Firefox OUI — saisie heures rapide en fin de session
Etudiant Mobile + Desktop Tous OUI
Client Mobile + Desktop Tous OUI

Implication : le bridge UI pour OP-04 (saisie heures) doit etre mobile-first. Baserow's default UI est desktop-oriented — donc soit on fait un formulaire Baserow public, soit on construit un mini-form dans le bridge.

6. Planning des operations automatiques

Operation Frequence Heure Owner
OP-08 Recalcul rollups Sur evenement TR Baserow natif
OP-07 Cloturer formation Toutes les heures xx:00 Cron bridge
OP-09 Notifier depassement Sur evenement TR Bridge webhook
OP-14 Backup quotidien Quotidien 03:00 Cron host
Audit log retention Mensuel 1er du mois 04:00 Cron host

7. SLA / Contraintes operationnelles

Aspect SLA cible Justification
Recalcul rollups < 5s UX : eviter latence visible apres saisie
Backup recovery (RPO) 24h max Backup quotidien
Backup recovery (RTO) 4h max Restauration manuelle assistee
Disponibilite stack 99% (= 3.65j down/an acceptable) Pas SI critique, c'est de l'interne
Latence saisie heures < 2s Frustration formateur sinon

8. Operations Agence (extension scope B)

Code Operation (MCT) Acteur Type Temps Outil
OPA-01 Creer client Admin M TR Baserow UI
OPA-02 Creer projet Admin M TR Baserow UI
OPA-03 Decomposer en taches Admin M TR Baserow UI (vue kanban)
OPA-04 Attribuer tache a dev Admin M TR Baserow UI
OPA-05 Saisir intervention Developpeur M TR Bridge UI mobile-friendly
OPA-06 Marquer tache done Dev / Admin M TR Baserow UI ou bridge
OPA-07 Cloturer projet Admin M TR Baserow UI (action sensible)
OPA-08 Recalculer rollups Agence System A TR Baserow rollup natif
OPA-09 Lier projet a formation pedago Admin M TR Baserow UI
OPA-10 Recalculer capacite Personne unifiee System A TR Baserow + bridge si formules complexes

Vue par acteur — Developpeur (nouveau)

flowchart LR
    D([Developpeur]) --> OPA05[Saisir intervention]
    D --> OPA08b[Consulter ses taches]
    D --> OPA06[Marquer tache done]
    D --> OPA15[Editer docs technique wiki]

Charge typique : 5-10 min par jour de travail pour saisir les heures par tache.

SLA Agence

Aspect SLA cible Justification
Latence saisie intervention < 2s Frustration dev sinon
Recalcul rollups capacite Personne < 5s UX dashboards admin
Backup Baserow Agence 24h max RPO acceptable

Postes de travail Developpeur

Acteur Device principal Mobile-friendly
Developpeur Desktop (IDE) + Mobile (saisie heures rapide) OUI

9. Questions ouvertes pour validation

  • OP-04 saisie heures : formulaire web bridge OU formulaire public Baserow OU app mobile dediee ?
  • OP-09 notification : email ? Slack ? Webhooks vers outil interne ?
  • OP-14 backup : sur le meme host ou push S3 distant (Backblaze, OVH Object Storage) ?
  • Audit log : duree de retention ? Format (json append-only / table dediee) ?
  • Multi-langue UI : aujourd'hui FR seul, mais Baserow et Docmost supportent EN nativement