Files
archicratie-edition/docs/diagrams/archicratie-web-edition-machine-editoriale-verbatim-v3.svg
Archicratia 78eb9cbb58
All checks were successful
CI / build-and-anchors (push) Successful in 1m46s
SMOKE / smoke (push) Successful in 14s
chore: add diagrams + scripts + archicrat-ia route
2026-02-20 18:27:25 +01:00

614 lines
15 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="1500"
height="1050"
viewBox="0 0 1500 1050"
role="img"
aria-label="Archicratie — Machine éditoriale (verbatim) : scripts, indices DEV/PROD, postbuild exact, proposer direct vs bridge"
version="1.1"
id="svg77"
sodipodi:docname="archicratie-web-edition-machine-editoriale-verbatim-v3.svg"
inkscape:version="1.3-alpha (95f74fb, 2023-03-31)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview77"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.83714286"
inkscape:cx="756.14334"
inkscape:cy="367.32082"
inkscape:window-width="1472"
inkscape:window-height="1022"
inkscape:window-x="234"
inkscape:window-y="30"
inkscape:window-maximized="0"
inkscape:current-layer="svg77" />
<defs
id="defs2">
<style
id="style1">
/* Inkscape-safe: pas de CSS variables */
.title{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:26px; font-weight:900; fill:#0f172a;}
.sub{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:14px; font-weight:650; fill:#475569;}
.laneT{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:14px; font-weight:900; fill:#0f172a;}
.laneN{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:12px; font-weight:650; fill:#475569;}
.h{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:14px; font-weight:900; fill:#0f172a;}
.p{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:12px; font-weight:650; fill:#475569;}
.small{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; font-size:11px; font-weight:650; fill:#475569;}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,&quot;Liberation Mono&quot;,&quot;Courier New&quot;,monospace; font-size:11px; font-weight:800; fill:#334155;}
.canvas{fill:#f8fafc; stroke:#e2e8f0; stroke-width:1;}
.lane{fill:#f1f5f9; stroke:#cbd5e1; stroke-width:1;}
.laneAlt{fill:#eef2f7; stroke:#cbd5e1; stroke-width:1;}
.box{fill:#ffffff; stroke:#94a3b8; stroke-width:1.4;}
.boxAlt{fill:#f8fafc; stroke:#94a3b8; stroke-width:1.4;}
.call{fill:#ffffff; fill-opacity:.72; stroke:#cbd5e1; stroke-width:1.1;}
.arrow{stroke:#64748b; stroke-width:2.2; fill:none; marker-end:url(#ah);}
.arrowSoft{stroke:#94a3b8; stroke-width:2; fill:none; marker-end:url(#ahSoft);}
.dash{stroke-dasharray:7 6;}
</style>
<marker
id="ah"
markerWidth="10"
markerHeight="10"
refX="9"
refY="5"
orient="auto">
<path
d="M0,0 L10,5 L0,10 Z"
fill="#64748b"
id="path1" />
</marker>
<marker
id="ahSoft"
markerWidth="10"
markerHeight="10"
refX="9"
refY="5"
orient="auto">
<path
d="M0,0 L10,5 L0,10 Z"
fill="#94a3b8"
id="path2" />
</marker>
</defs>
<rect
x="0.5"
y="0.5"
width="1499"
height="1049"
rx="26"
class="canvas"
id="rect2" />
<text
x="44"
y="54"
class="title"
id="text2">Archicratie — Machine éditoriale (verbatim technique)</text>
<text
x="44"
y="82"
class="sub"
id="text3">3 ajouts “pro” inclus : (1) indices DEV vs PROD, (2) fork Proposer direct vs bridge, (3) ordre postbuild exact.</text>
<!-- Lanes -->
<rect
x="40"
y="115"
width="420"
height="880"
rx="18"
class="lane"
id="rect3" />
<rect
x="480"
y="115"
width="520"
height="880"
rx="18"
class="laneAlt"
id="rect4" />
<rect
x="1020"
y="115"
width="440"
height="880"
rx="18"
class="lane"
id="rect5" />
<text
x="60"
y="148"
class="laneT"
id="text5">A) Entrées &amp; canon</text>
<text
x="60"
y="170"
class="laneN"
id="text6">Ce qui est versionné et alimente la build</text>
<text
x="500"
y="148"
class="laneT"
id="text7">B) Build + postbuild</text>
<text
x="500"
y="170"
class="laneN"
id="text8">Astro (static) + scripts (ordre fixe)</text>
<text
x="1040"
y="148"
class="laneT"
id="text9">C) Runtime (DEV/PROD) + “Proposer”</text>
<text
x="1040"
y="170"
class="laneN"
id="text10">Indices servis, UI, et création dissues</text>
<!-- A) Entrées -->
<rect
x="70"
y="210"
width="360"
height="165"
rx="16"
class="box"
id="rect10" />
<text
x="92"
y="238"
class="h"
id="text11">Contenu canon (pages)</text>
<text
x="92"
y="260"
class="p"
id="text12">Astro Content : MD / MDX (pages, chapitres, etc.)</text>
<text
x="92"
y="284"
class="mono"
id="text13">src/content/**</text>
<text
x="92"
y="310"
class="small"
id="text14">Layouts/TOC/reading-follow consomment ces pages.</text>
<text
x="92"
y="334"
class="small"
id="text15">Les IDs de paragraphes doivent rester stables (anti-régression).</text>
<rect
x="70"
y="395"
width="360"
height="190"
rx="16"
class="boxAlt"
id="rect15" />
<text
x="92"
y="423"
class="h"
id="text16">Annotations (surcouche)</text>
<text
x="92"
y="445"
class="p"
id="text17">YAML : notes, refs, illus, commentaires par paragraphe.</text>
<text
x="92"
y="468"
class="mono"
id="text18">src/annotations/**</text>
<text
x="92"
y="494"
class="p"
id="text19">Indexé en JSON pour le SidePanel :</text>
<text
x="92"
y="516"
class="mono"
id="text20">dist/annotations-index.json (PROD)</text>
<text
x="92"
y="538"
class="mono"
id="text21">public/annotations-index.json (DEV)</text>
<rect
x="70"
y="605"
width="360"
height="170"
rx="16"
class="box"
id="rect21" />
<text
x="92"
y="633"
class="h"
id="text22">Scripts (import &amp; qualité)</text>
<text
x="92"
y="655"
class="p"
id="text23">Import DOCX, checks dIDs, aliases dancres, etc.</text>
<text
x="92"
y="678"
class="mono"
id="text24">scripts/import-docx.mjs</text>
<text
x="92"
y="700"
class="mono"
id="text25">scripts/check-anchors.mjs</text>
<text
x="92"
y="724"
class="small"
id="text26">Objectif : build reproductible + compat backward (ancres).</text>
<!-- B) Build + postbuild -->
<rect
x="510"
y="210"
width="460"
height="190"
rx="16"
class="box"
id="rect26" />
<text
x="532"
y="238"
class="h"
id="text27">Build Astro (static)</text>
<text
x="532"
y="260"
class="p"
id="text28">Génère le HTML + assets + routes (output: static).</text>
<text
x="532"
y="284"
class="mono"
id="text29">npm run build</text>
<text
x="532"
y="306"
class="mono"
id="text30">→ astro build → dist/**</text>
<text
x="532"
y="330"
class="p"
id="text31">UI dédition (côté pages) :</text>
<text
x="532"
y="352"
class="mono"
id="text32">src/layouts/EditionLayout.astro</text>
<text
x="532"
y="374"
class="mono"
id="text33">src/components/SidePanel.astro</text>
<rect
x="510"
y="420"
width="460"
height="330"
rx="16"
class="boxAlt"
id="rect33" />
<text
x="532"
y="448"
class="h"
id="text34">Postbuild (ordre exact = contrat)</text>
<text
x="532"
y="472"
class="p"
id="text35">À conserver tel quel pour éviter les régressions.</text>
<text
x="532"
y="500"
class="mono"
id="text36">1) node scripts/inject-anchor-aliases.mjs</text>
<text
x="532"
y="522"
class="mono"
id="text37">2) node scripts/dedupe-ids-dist.mjs</text>
<text
x="532"
y="544"
class="mono"
id="text38"><tspan
sodipodi:role="line"
id="tspan79"
x="532"
y="544">3) node scripts/build-para-index.mjs</tspan><tspan
sodipodi:role="line"
id="tspan80"
x="532"
y="557.75">--in dist --out dist/para-index.json</tspan></text>
<text
x="532"
y="578"
class="mono"
id="text39"><tspan
sodipodi:role="line"
id="tspan81"
x="532"
y="578">4) node scripts/build-annotations-index.mjs</tspan><tspan
sodipodi:role="line"
id="tspan82"
x="532"
y="591.75">--in src/annotations --out dist/annotations-index.json</tspan></text>
<text
x="532"
y="612"
class="mono"
id="text40">5) npx pagefind --site dist (→ dist/pagefind/**)</text>
<text
x="532"
y="638"
class="p"
id="text41">Sorties PROD (statique) :</text>
<text
x="532"
y="660"
class="mono"
id="text42">dist/para-index.json</text>
<text
x="532"
y="682"
class="mono"
id="text43">dist/annotations-index.json</text>
<text
x="532"
y="704"
class="mono"
id="text44">dist/pagefind/**</text>
<text
x="532"
y="736"
class="small"
id="text45">Mini-règle : inject (aliases) AVANT dedupe, et indices AVANT pagefind.</text>
<rect
x="510"
y="770"
width="460"
height="195"
rx="16"
class="box"
id="rect45" />
<text
x="532"
y="798"
class="h"
id="text46">DEV server : indices “public/” (mini-ajout #1)</text>
<text
x="532"
y="822"
class="p"
id="text47">En DEV, lUI lit via HTTP depuis <tspan
class="mono"
id="tspan46">public/</tspan> (pas <tspan
class="mono"
id="tspan47">dist/</tspan>).</text>
<text
x="532"
y="846"
class="mono"
id="text48">predev: build-annotations-index → public/annotations-index.json</text>
<text
x="532"
y="868"
class="mono"
id="text49">predev: build-para-index (depuis dist) → public/para-index.json</text>
<text
x="532"
y="892"
class="small"
id="text50">Si ces fichiers manquent : 404 (normal) → relancer <tspan
class="mono"
id="tspan49">npm run dev</tspan> (predev).</text>
<!-- C) Runtime + proposer -->
<rect
x="1050"
y="210"
width="380"
height="200"
rx="16"
class="box"
id="rect50" />
<text
x="1072"
y="238"
class="h"
id="text51">Runtime PROD</text>
<text
x="1072"
y="262"
class="p"
id="text52">Site statique servi depuis dist/**</text>
<text
x="1072"
y="286"
class="mono"
id="text53">dist/*.html</text>
<text
x="1072"
y="308"
class="mono"
id="text54">dist/para-index.json</text>
<text
x="1072"
y="330"
class="mono"
id="text55">dist/annotations-index.json</text>
<text
x="1072"
y="352"
class="mono"
id="text56">dist/pagefind/**</text>
<text
x="1072"
y="378"
class="small"
id="text57">Ces artefacts sont reproductibles via CI.</text>
<rect
x="1050"
y="430"
width="380"
height="250"
rx="16"
class="boxAlt"
id="rect57" />
<text
x="1072"
y="458"
class="h"
id="text58">“Proposer” (mini-ajout #2)</text>
<text
x="1072"
y="482"
class="p"
id="text59">Depuis SidePanel / ProposeModal (UI).</text>
<text
x="1072"
y="512"
class="p"
id="text60">Mode A — Direct navigateur → Gitea API</text>
<text
x="1072"
y="534"
class="small"
id="text61">⚠️ CORS + auth + token : fragile / déconseillé.</text>
<text
x="1072"
y="566"
class="p"
id="text62">Mode B — Bridge same-origin (recommandé)</text>
<text
x="1072"
y="588"
class="mono"
id="text63">PUBLIC_ISSUE_BRIDGE_PATH (ex: /bridge/issues)</text>
<text
x="1072"
y="612"
class="small"
id="text64">Le serveur/proxy ajoute lauth (secrets) et appelle Gitea côté backend.</text>
<text
x="1072"
y="638"
class="small"
id="text65">Résultat : pas de secret exposé au client + moins de soucis CORS.</text>
<rect
x="1050"
y="700"
width="380"
height="165"
rx="16"
class="box"
id="rect65" />
<text
x="1072"
y="728"
class="h"
id="text66">Gitea : Issues</text>
<text
x="1072"
y="752"
class="p"
id="text67">Création de tickets (PR/CI séparés du flux éditorial)</text>
<text
x="1072"
y="776"
class="mono"
id="text68">/issues/new</text>
<text
x="1072"
y="798"
class="mono"
id="text69">labels / assignee / templates</text>
<text
x="1072"
y="828"
class="small"
id="text70">Le workflow Git/PR/CI reste la source canon (pas la prod).</text>
<!-- Callout -->
<rect
x="1050"
y="885"
width="380"
height="95.972694"
rx="14"
class="call"
id="rect70" />
<text
x="1072"
y="912"
class="h"
id="text71">Mini-ajout #3 — ordre postbuild</text>
<text
x="1072"
y="936"
class="p"
id="text72"><tspan
sodipodi:role="line"
id="tspan77"
x="1072"
y="936">inject-anchor-aliases → dedupe-ids → para-index</tspan><tspan
sodipodi:role="line"
id="tspan78"
x="1072"
y="951.47437">→ annotations-index → pagefind</tspan></text>
<text
x="1072"
y="968"
class="small"
id="text73">Cest le “contrat” anti-régression : si tu changes lordre, tu re-tests tout.</text>
<!-- Arrows (liaisons principales) -->
<path
class="arrow"
d="M430 300 C455 300, 475 300, 510 300"
id="path73" />
<path
class="arrow"
d="M430 500 C455 500, 480 490, 510 520"
id="path74" />
<path
class="arrow"
d="M970 330 C1000 330, 1010 330, 1050 330"
id="path75" />
<path
class="arrowSoft dash"
d="M 967.84983,823.85666 C 1006.4505,737.84983 1012.5597,719.6587 1050,610"
id="path76"
sodipodi:nodetypes="cc" />
<path
class="arrow"
d="M1240 680 C1240 695, 1240 695, 1240 700"
id="path77" />
<text
x="44"
y="1028"
class="sub"
id="text77">Inkscape-safe : couleurs &amp; fond explicites (zéro var()).</text>
</svg>