Architecture — schéma fonctionnel et zooms par domaine
Ce document regroupe les diagrammes Mermaid (schéma global + zooms par domaine métier) extraits du README racine pour alléger la page d'accueil du dépôt.
Lecture complémentaire : ; .
🔷 Schéma fonctionnel (briques & modules)
Le schéma ci-dessous résume le lien entre les briques front (UI, pages, modules métier), les routes API de l’app (Qwik City), et les systèmes externes (Baserow, auth). Les flèches indiquent une dépendance d’usage principal (lecture/écriture, pas le graphe d’imports TypeScript).
flowchart TB
subgraph FE["Frontend Qwik"]
UI["UI réutilisable<br/>components"]
PG["Pages & loaders<br/>routes*.tsx"]
LM["Modules métier<br/>lib*"]
SH["Utilitaires partagés<br/>shared/"]
UI --> PG
PG --> LM
LM --> SH
end
subgraph SRV["Côté application Qwik City"]
API["Handlers HTTP<br/>api*"]
end
subgraph EXT["Plateforme données & services"]
BR["Baserow API REST"]
WS["WebSocket Baserow<br/>vues lecture / sync"]
AUTH["Auth session JWT<br/>selon config"]
end
LM --> API
API --> BR
API --> AUTH
LM --> BR
LM --> WS| Brique | Rôle |
|---|---|
| components | Composants Qwik (calendrier, datatables, modales, sidebar, Marty, …) — aucun accès direct à la BDD ; consomment lib et contextes. |
| routes (pages) | Pages, layouts, loaders routeLoader$, orchestration par URL (filter_*, view, onglets). |
| lib | Règles métier, clients Baserow (baserowFetch, ), calendrier (FullCalendar, filtres), auth, offline, IA, budget, etc. |
| api | Proxy et opérations serveur : auth, proxy Baserow homogène, budget, ICS, occupation, Marty (...), admin — centralise secrets et headers. |
| shared | Helpers, cache, filtres ↔ URL — importable côté client et outils. |
| Baserow | Source de vérité des tables ; REST pour CRUD, WebSocket pour invalidations / lignes mises à jour. |
Modules métier (lib, non exhaustif) : calendar, baserow, auth, planning, budget, offline, pending-changes, ai (Marty), fiche-projet, datatable, i18n, hooks, component-helpers — chacun est branché par les routes et composants du domaine concerné.
🔍 Zooms par domaine métier
Chaque zoom ci-dessous est un aperçu fonctionnel (fichiers et flux typiques), pas un graphe d’imports. Les domaines recoupent la README — Fonctionnalités et le guide utilisateur.
Calendrier principal ()
Page d’accueil : calendar (instance FullCalendar, filtres, mapping lignes → événements), repository-configs, Baserow REST + WebSocket. Voir §3, .
flowchart TB
subgraph Route["Page accueil"]
IDX["Composant interface"]
end
subgraph UI["components/calendar"]
VIEW["calendar-view"]
TOOL["calendar-toolbar"]
SID["sidebar filtres"]
TAB["calendar-datatable-panel"]
CARTE["events-map-panel"]
end
subgraph LibCal["lib/calendar · baserow"]
INST["calendar-instance.ts"]
FILT["filter-events-client"]
ROWFC["baserow-to-fc-event"]
CFG["repository-configs"]
end
subgraph Data["Baserow"]
REST["REST"]
WSB["WebSocket"]
end
IDX --> VIEW
IDX --> TAB
IDX --> CARTE
VIEW --> TOOL
VIEW --> SID
VIEW --> INST
TAB --> INST
CARTE --> INST
INST --> FILT
INST --> ROWFC
INST --> CFG
CFG --> REST
INST --> WSBSynthèse — view=calendar : filtres client ; view=table : filtres API ; view=map : géoloc ; mutations via persist-event / proxy.
Occupation parking (occupation)
Plan SVG, réservations table 550, lieux 558, export export si configuré.
flowchart TB
subgraph R["routes/occupation"]
O["index.tsx"]
end
subgraph Cmp["components/occupation"]
MAP["parking-map-svg"]
MOD["baserow-table-modal-form"]
end
subgraph Lib["lib/baserow"]
CFG["api-config · table 550"]
end
subgraph Srv["api"]
EXP["/api/occupation/export"]
end
BR[(Baserow)]
O --> MAP
O --> MOD
MAP --> CFG
MOD --> CFG
CFG --> BR
O --> EXPProduction & rooming (production, rooming)
Hébergements 2643, onglets calendrier / datatable / stats / contrats / participants ; même logique datatable + modales sur rooming.
flowchart TB
subgraph R["routes"]
PR["production/index"]
RM["rooming"]
end
subgraph Ui["components"]
FC["FullCalendar onglet"]
DT["DatatableHandsontable"]
MOD["BaserowTableModalForm"]
end
subgraph Lib["lib"]
CFG["repository-configs 2643"]
EV["events / stats API"]
end
BR[(Baserow)]
PR --> FC
PR --> DT
RM --> DT
DT --> CFG
FC --> EV
DT --> MOD
CFG --> BR
EV --> BRPlanning équipe & feuille de temps (planning, planification equipe, timesheet)
Missions 5392, board DnD, multi-timeline ; timesheet : récap missions / contrats 9557.
flowchart TB
subgraph R["routes"]
PL["planning"]
TS["timesheet"]
end
subgraph Ui["components"]
BD["planning-board"]
MT["multi-timeline"]
TR["timesheet recap/form"]
end
subgraph Lib["lib/planning · hooks"]
M["missions 5392 · contrats"]
end
BR[(Baserow)]
PL --> BD
PL --> MT
BD --> M
MT --> M
TS --> TR
TR --> M
M --> BRRessources : bâtiment, matériel, livraisons (batiment, materiel, livraisons)
Même shell calendrier / tableau / timeline (resource-calendar-route-page) ; tables 798, 562, 796 selon route.
flowchart TB
subgraph R["routes"]
RC["resource-calendar-route-page"]
end
subgraph Ui["calendar + datatable"]
CAL["createCalendarInstance"]
DT["datatable + modale"]
end
subgraph Lib["lib"]
RES["resource-calendar + configs"]
end
BR[(Baserow)]
RC --> CAL
RC --> DT
CAL --> RES
DT --> RES
RES --> BRFiche projet & récap programmation (..., recap prog)
Calendrier filtré projet, UnifiedDatatable, URLs getFicheProjetDatatableUrl ; récap : scroll infini + modale URL.
flowchart TB
subgraph R["routes"]
FP["fiche-projet/id/type"]
RP["recap-prog"]
end
subgraph Ui["components"]
CV["calendar filtré"]
UDT["UnifiedDatatable"]
end
subgraph Lib["lib"]
FU["getFicheProjetDatatableUrl"]
RC["config recap 548"]
end
BR[(Baserow)]
FP --> CV
FP --> UDT
RP --> UDT
UDT --> FU
UDT --> RC
FU --> BREspace membre, compagnie, devis, participants (membre, compagnie, devis, participants)
Pattern useBaserowTablePage + BaserowTableModalForm + query modalTableId / modalRowId.
flowchart TB
subgraph R["routes page métier"]
PG["membre · compagnie · devis · participants"]
end
subgraph Pat["Pattern"]
UB["useBaserowTablePage"]
MOD["BaserowTableModalForm"]
end
BR[(Baserow)]
PG --> UB
UB --> MOD
UB --> BRListes métier : lieux, chiffrage, programmation, suivi technique (lieux, chiffrage, programmation, suivi technique)
Même logique que devis / participants : datatable + modale, URLs et tableIds dans api-config / repository-configs.
flowchart TB
subgraph R["routes dédiées"]
L["lieux · chiffrage · programmation · suivi-technique"]
end
subgraph Pat["Pattern liste + modale"]
DT["datatable / cellules"]
MOD["BaserowTableModalForm"]
end
BR[(Baserow)]
L --> DT
DT --> MOD
DT --> BRBudget & plan d’investissement (, )
Tables budget, routes * (sources externes, sync) ; datatables + rôles PERMANENT selon écran.
flowchart TB
subgraph R["routes budget · plan-investissement"]
B["pages UnifiedDatatable"]
end
subgraph Api["routes/api"]
AB["/api/budget/*"]
end
BR[(Baserow)]
B --> BR
B --> AB
AB --> BRExports ICS, notifications & portail public (ics, notifications, demandes)
ICS via export ; notifications via proxy notifications ; demandes anonymes batch.
flowchart TB
subgraph R["routes"]
ICS["/ics"]
N["/notifications"]
D["/demandes"]
end
subgraph Api["routes/api"]
A1["/api/ics/export"]
A2["/api/baserow/notifications"]
A3["/api/public/demandes"]
end
BR[(Baserow)]
ICS --> A1
N --> A2
D --> A3
A1 --> BR
A2 --> BRAdministration & référentiels (, )
Hub admin, * (permissions, dédup, santé) ; référentiels : tables contrôlées par ID.
flowchart TB
subgraph R["routes"]
AD["admin/*"]
REF["referentiels/tableId"]
end
subgraph Api["routes/api"]
AA["/api/admin/*"]
end
BR[(Baserow)]
AD --> AA
REF --> BR
AA --> BRMarty — assistant IA (*, ai)
Panneau ai-assistant-panel, moteur ai, handlers route ; annuaire / actions peuvent interroger Baserow ; inférence ONNX` optionnelle.
flowchart TB
subgraph Ui["components"]
P["ai-assistant-panel"]
end
subgraph Lib["lib/ai"]
ENG["ai-engine · registry"]
end
subgraph Api["routes/api/ai"]
H["handlers Marty"]
end
subgraph Ext["externe"]
ONNX["ONNX optionnel"]
BR[(Baserow)]
end
P --> ENG
ENG --> H
H --> BR
ENG --> ONNXProxy Baserow & appels HTTP (transverse)
baserowFetch → * → API Baserow (auth / CORS / secrets côté serveur). .
flowchart LR
subgraph Client["Client"]
BF["baserowFetch"]
REPO["repository · mutation"]
end
subgraph Srv["Qwik City"]
PX["/api/baserow/*"]
end
subgraph BS["Baserow"]
API["REST"]
end
REPO --> BF
BF --> PX
PX --> APIHors ligne, file d’attente & WebSocket (transverse)
Bandeau offline-banner, pending_queue (IndexedDB), flushPendingChanges ; WebSocket Baserow pour rafraîchir les vues. .
flowchart TB
subgraph Ui["components"]
OB["offline-banner"]
OPI["offline-pending-init"]
end
subgraph Lib["lib/offline · pending-changes"]
PQ["pending_queue IDB"]
FL["flushPendingChanges"]
end
subgraph RT["temps réel"]
WSB["WebSocket Baserow"]
end
OPI --> PQ
FL --> PQ
OB --> Lib
WSB --> Lib