MaCH repo

This commit is contained in:
2025-07-24 12:46:01 -05:00
committed by Nick Ricketts
commit a7aec7abca
74 changed files with 5946 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 340" width="760" height="340">
<rect width="760" height="340" fill="#09080f"/>
<defs>
<linearGradient id="dbG" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="#8b5cf6"/>
<stop offset="100%" stop-color="#7c3aed"/>
</linearGradient>
<style>text{font-family:'JetBrains Mono','Fira Code',monospace}</style>
</defs>
<text x="380" y="28" text-anchor="middle" fill="#e2e8f0" font-size="13" font-weight="700">Database Multi-Tenancy</text>
<!-- Config block -->
<rect x="40" y="50" width="320" height="86" rx="10" fill="#111827" stroke="#1f2937" stroke-width="1"/>
<text x="60" y="74" fill="#6b7280" font-size="9" font-weight="600">.databases config</text>
<text x="60" y="96" fill="#c4b5fd" font-size="10">.connect =</text>
<text x="60" y="114" fill="#fcd34d" font-size="10">"file:<tspan fill="#f59e0b" font-weight="700">{{user_id}}</tspan>_todo.db?mode=rwc"</text>
<!-- Arrow right -->
<line x1="360" y1="93" x2="398" y2="93" stroke="#64748b" stroke-width="1.5"/>
<polygon points="408,93 398,88 398,98" fill="#64748b"/>
<!-- Resolution box -->
<rect x="408" y="50" width="180" height="86" rx="10" fill="#111827" stroke="#f59e0b" stroke-width="1"/>
<text x="428" y="74" fill="#f59e0b" font-size="9" font-weight="600">RUNTIME RESOLUTION</text>
<text x="428" y="96" fill="#94a3b8" font-size="10">user_id from</text>
<text x="428" y="114" fill="#94a3b8" font-size="10">pipeline context</text>
<!-- Three request arrows going down -->
<!-- User alice -->
<rect x="40" y="170" width="180" height="36" rx="8" fill="#1e293b" stroke="#3b82f6" stroke-width="1"/>
<text x="130" y="192" text-anchor="middle" fill="#93c5fd" font-size="10">Request: user_id = alice</text>
<!-- User bob -->
<rect x="40" y="224" width="180" height="36" rx="8" fill="#1e293b" stroke="#3b82f6" stroke-width="1"/>
<text x="130" y="246" text-anchor="middle" fill="#93c5fd" font-size="10">Request: user_id = bob</text>
<!-- User carol -->
<rect x="40" y="278" width="180" height="36" rx="8" fill="#1e293b" stroke="#3b82f6" stroke-width="1"/>
<text x="130" y="300" text-anchor="middle" fill="#93c5fd" font-size="10">Request: user_id = carol</text>
<!-- Arrows to databases -->
<line x1="220" y1="188" x2="398" y2="188" stroke="#64748b" stroke-width="1"/>
<polygon points="408,188 398,183 398,193" fill="#64748b"/>
<line x1="220" y1="242" x2="398" y2="242" stroke="#64748b" stroke-width="1"/>
<polygon points="408,242 398,237 398,247" fill="#64748b"/>
<line x1="220" y1="296" x2="398" y2="296" stroke="#64748b" stroke-width="1"/>
<polygon points="408,296 398,291 398,301" fill="#64748b"/>
<!-- Database: alice -->
<rect x="408" y="170" width="220" height="36" rx="8" fill="#2d2640" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="440" y="192" fill="#c4b5fd" font-size="10">file:</text>
<text x="472" y="192" fill="#fcd34d" font-size="10" font-weight="700">alice</text>
<text x="505" y="192" fill="#c4b5fd" font-size="10">_todo.db</text>
<!-- Database: bob -->
<rect x="408" y="224" width="220" height="36" rx="8" fill="#2d2640" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="440" y="246" fill="#c4b5fd" font-size="10">file:</text>
<text x="472" y="246" fill="#fcd34d" font-size="10" font-weight="700">bob</text>
<text x="495" y="246" fill="#c4b5fd" font-size="10">_todo.db</text>
<!-- Database: carol -->
<rect x="408" y="278" width="220" height="36" rx="8" fill="#2d2640" stroke="#8b5cf6" stroke-width="1.5"/>
<text x="440" y="300" fill="#c4b5fd" font-size="10">file:</text>
<text x="472" y="300" fill="#fcd34d" font-size="10" font-weight="700">carol</text>
<text x="505" y="300" fill="#c4b5fd" font-size="10">_todo.db</text>
<!-- DB icons (simple cylinder shapes) -->
<g transform="translate(648, 170)">
<ellipse cx="18" cy="6" rx="18" ry="6" fill="#7c3aed" opacity="0.5"/>
<rect x="0" y="6" width="36" height="24" fill="#7c3aed" opacity="0.3"/>
<ellipse cx="18" cy="30" rx="18" ry="6" fill="#7c3aed" opacity="0.5"/>
</g>
<g transform="translate(648, 224)">
<ellipse cx="18" cy="6" rx="18" ry="6" fill="#7c3aed" opacity="0.5"/>
<rect x="0" y="6" width="36" height="24" fill="#7c3aed" opacity="0.3"/>
<ellipse cx="18" cy="30" rx="18" ry="6" fill="#7c3aed" opacity="0.5"/>
</g>
<g transform="translate(648, 278)">
<ellipse cx="18" cy="6" rx="18" ry="6" fill="#7c3aed" opacity="0.5"/>
<rect x="0" y="6" width="36" height="24" fill="#7c3aed" opacity="0.3"/>
<ellipse cx="18" cy="30" rx="18" ry="6" fill="#7c3aed" opacity="0.5"/>
</g>
<!-- Footer -->
<text x="380" y="336" text-anchor="middle" fill="#64748b" font-size="10">One config, per-user databases — Mustache interpolation in .connect at runtime</text>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB