Publish interactive portfolio demo
Browse files- README.md +8 -3
- index.html +3 -19
README.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
| 1 |
---
|
| 2 |
title: Vector Index Migration Control Plane
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: purple
|
| 6 |
sdk: static
|
|
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Vector Index Migration Control Plane
|
| 3 |
+
emoji: 🔁
|
| 4 |
+
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: static
|
| 7 |
+
app_file: index.html
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Vector Index Migration Control Plane
|
| 12 |
+
|
| 13 |
+
A guarded blue/green migration simulation with mirrored writes, manifest verification, cutover and rollback.
|
| 14 |
+
|
| 15 |
+
This Space is a small, browser-only companion demo for [vector-index-migration-control-plane](https://github.com/DatadrivenAlex/vector-index-migration-control-plane). It uses synthetic examples and does not connect to production services. See the source repository for the Python implementation, tests, and its full limitations.
|
index.html
CHANGED
|
@@ -1,19 +1,3 @@
|
|
| 1 |
-
<!doctype html>
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
<meta charset="utf-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width" />
|
| 6 |
-
<title>My static Space</title>
|
| 7 |
-
<link rel="stylesheet" href="style.css" />
|
| 8 |
-
</head>
|
| 9 |
-
<body>
|
| 10 |
-
<div class="card">
|
| 11 |
-
<h1>Welcome to your static Space!</h1>
|
| 12 |
-
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
|
| 13 |
-
<p>
|
| 14 |
-
Also don't forget to check the
|
| 15 |
-
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
| 16 |
-
</p>
|
| 17 |
-
</div>
|
| 18 |
-
</body>
|
| 19 |
-
</html>
|
|
|
|
| 1 |
+
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="Explore a guarded blue/green migration: mirrored writes, manifest parity, revision-checked cutover and rollback."><title>Vector Index Migration Control Plane · Alexandru Cojocari</title><style>
|
| 2 |
+
:root{color-scheme:dark;--bg:#0b1020;--panel:#121a2b;--line:#27344b;--ink:#eef3fb;--muted:#a9b6c9;--mint:#78e0c0;--blue:#88aaff;--gold:#f2c879;--red:#ff8d8d}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 12% 0%,#172844 0,transparent 40%),var(--bg);color:var(--ink);font:15px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}main{max-width:1120px;margin:auto;padding:42px 24px 64px}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:11px;color:var(--mint);font-weight:800}.hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:26px}.hero h1{font-size:clamp(30px,5vw,48px);line-height:1.06;letter-spacing:-.04em;margin:10px 0 12px}.hero p{max-width:720px;color:var(--muted);margin:0}.pill{border:1px solid #38516c;background:#16253a;color:#c8e2ff;border-radius:999px;padding:7px 12px;font-size:12px;white-space:nowrap}.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}.card{background:linear-gradient(145deg,rgba(23,34,54,.96),rgba(15,22,37,.98));border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 12px 36px #0002}.span12{grid-column:span 12}.span8{grid-column:span 8}.span7{grid-column:span 7}.span6{grid-column:span 6}.span5{grid-column:span 5}.span4{grid-column:span 4}.label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.1em}.value{font-size:25px;font-weight:750;margin-top:5px}.muted{color:var(--muted)}.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat{padding:14px;border:1px solid var(--line);border-radius:12px;background:#0e1727}.stat b{font-size:22px;display:block}.stat span{font-size:12px;color:var(--muted)}button,select,.btn{font:inherit;color:var(--ink);border:1px solid #3b516f;border-radius:10px;background:#192841;padding:10px 14px;cursor:pointer}button:hover,.btn:hover{border-color:var(--mint);transform:translateY(-1px)}button.primary{background:linear-gradient(110deg,#268f83,#3468b8);border-color:transparent;font-weight:700}button.warn{border-color:#8f6654;color:#ffd0a3}.status{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:700}.dot{width:8px;height:8px;border-radius:50%;background:var(--mint);box-shadow:0 0 12px currentColor}.status.warn .dot{background:var(--gold)}.status.bad .dot{background:var(--red)}.flow{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}.step{border:1px solid var(--line);border-radius:12px;padding:14px;background:#0c1423;min-height:88px}.step strong{display:block;margin-bottom:4px}.log{display:grid;gap:9px;margin-top:14px}.event{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #243149;padding:8px 0;color:var(--muted);font-size:13px}.event b{color:var(--ink);font-weight:600}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}textarea{width:100%;min-height:210px;resize:vertical;color:#d9e7f8;background:#0a1220;border:1px solid #34445f;border-radius:10px;padding:12px;font:12px/1.5 ui-monospace,SFMono-Regular,monospace}input[type=number]{width:100%;background:#0a1220;color:var(--ink);border:1px solid #34445f;border-radius:9px;padding:10px}.meter{height:8px;background:#26354d;border-radius:9px;overflow:hidden;margin:8px 0}.meter i{display:block;height:100%;background:linear-gradient(90deg,#5dd5af,#6f9cff);width:50%}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:10px 8px;border-bottom:1px solid #29364d;vertical-align:top}.table th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}.tag{display:inline-block;border:1px solid #3c526f;border-radius:999px;padding:3px 8px;font-size:11px;color:#c7d8ec}.note{border-left:3px solid var(--gold);padding:10px 14px;background:#241e19;color:#f4dcb8;border-radius:0 10px 10px 0}.repo{color:#a6c1ff;text-decoration:none}.repo:hover{text-decoration:underline}.small{font-size:12px}.divider{height:1px;background:var(--line);margin:16px 0}.choice{display:flex;gap:8px;align-items:center}.choice input{accent-color:var(--mint)}@media(max-width:760px){main{padding:28px 16px}.hero{display:block}.hero .pill{display:inline-block;margin-top:16px}.span8,.span7,.span6,.span5,.span4{grid-column:span 12}.stats{grid-template-columns:repeat(2,1fr)}.flow{grid-template-columns:1fr 1fr}.two{grid-template-columns:1fr}}
|
| 3 |
+
</style></head><body><main><header class="hero"><div><div class="eyebrow">AI engineering · interactive portfolio work</div><h1>Vector Index Migration Control Plane</h1><p>Explore a guarded blue/green migration: mirrored writes, manifest parity, revision-checked cutover and rollback.</p></div><span class="pill">Browser-only demonstration</span></header><section class="grid"><article class="card span12"><div class="row" style="justify-content:space-between"><div><div class="label">Migration state</div><div id="phase" class="value">Shadow generation is building</div></div><span id="badge" class="status warn"><i class="dot"></i><span>BUILDING</span></span></div><div class="flow"><div class="step"><strong>① Mirror writes</strong><span class="muted small">Keep active and shadow current</span></div><div class="step"><strong>② Verify parity</strong><span class="muted small">Compare deterministic manifests</span></div><div class="step"><strong>③ Cut over</strong><span class="muted small">Switch the alias at a revision</span></div><div class="step"><strong>④ Roll back</strong><span class="muted small">Retain a write-through fallback</span></div></div></article><article class="card span8"><div class="label">Control plane snapshot</div><div class="stats" style="margin-top:14px"><div class="stat"><span>Active</span><b id="active">index-v1</b></div><div class="stat"><span>Building</span><b id="building">index-v2</b></div><div class="stat"><span>Mirrored docs</span><b id="docs">3</b></div><div class="stat"><span>Revision</span><b id="revision">1</b></div></div><p class="muted">The demo models hashes and state transitions, not embeddings or vector search.</p><div class="row"><button id="write">Add mirrored write</button><button id="verify" class="primary">Verify manifest parity</button><button id="cutover" class="primary">Cut over alias</button><button id="rollback" class="warn">Rollback</button><button id="reset">Reset</button></div><p id="message" class="small muted" aria-live="polite">Writes are mirrored to the active and shadow generations.</p></article><article class="card span4"><div class="label">Safety gates</div><div class="log"><div class="event"><b>Idempotent writes</b><span>enabled</span></div><div class="event"><b>Stale verification</b><span>invalidated by writes</span></div><div class="event"><b>Atomic cutover</b><span>revision guarded</span></div><div class="event"><b>Fallback</b><span id="fallback">not set</span></div></div></article><article class="card span12"><div class="label">Audit trail</div><div id="audit" class="log"></div></article><article class="card span12"><div class="note">Educational front-end simulation. It does not connect to the repository's FastAPI service, a vector database, or production data. The source project uses an in-memory/SQLite model and explicitly excludes embeddings, authentication, tenant isolation, and production guarantees.</div></article></section><div class="divider"></div><p class="muted small">Companion demo for <a class="repo" href="https://github.com/DatadrivenAlex/vector-index-migration-control-plane" target="_blank" rel="noreferrer">the source repository</a>. All values and events in this front-end are illustrative.</p></main><script>const s={docs:3,rev:1,active:'index-v1',building:'index-v2',fallback:'not set',verified:false,cut:false,rolledBack:false,log:[]};const $=x=>document.getElementById(x);function add(t,d){s.log.unshift({t,d});render()}function render(){ $('docs').textContent=s.docs;$('revision').textContent=s.rev;$('active').textContent=s.active;$('building').textContent=s.cut?'—':s.building;$('fallback').textContent=s.fallback;$('phase').textContent=s.cut?'Alias switched; fallback retained':s.rolledBack?'Rolled back; reset before another migration':s.verified?'Parity verified; cutover ready':s.docs>3?'New write requires re-verification':'Shadow generation is building';let b=$('badge');b.className='status '+(s.cut?'':s.rolledBack?'bad':'warn');b.querySelector('span').textContent=s.cut?'CUT OVER':s.rolledBack?'ROLLED BACK':s.verified?'READY':'BUILDING';$('cutover').disabled=!s.verified||s.cut||s.rolledBack;$('rollback').disabled=!s.cut;$('verify').disabled=s.cut||s.rolledBack;$('write').disabled=s.cut||s.rolledBack;$('audit').innerHTML=s.log.map(e=>`<div class="event"><b>${e.t}</b><span>${e.d}</span></div>`).join('')||'<span class="muted small">No transitions yet.</span>'} $('write').onclick=()=>{if(s.cut){$('message').textContent='Start a new migration to write during cutover.';return}s.docs++;s.rev++;s.verified=false;$('message').textContent='Mirrored synthetic write added; previous parity check invalidated.';add('Mirrored write',`doc-${String(s.docs).padStart(3,'0')} copied to active + shadow; revision ${s.rev}`)};$('verify').onclick=()=>{s.verified=true;s.rev++;$('message').textContent='The demo manifests match; cutover is allowed at the current revision.';add('Manifest check','source and target hashes match in this simulation')};$('cutover').onclick=()=>{if(!s.verified)return;s.fallback=s.active;s.active=s.building;s.cut=true;s.rev++;$('message').textContent='Alias switched after parity verification. The prior generation remains as fallback.';add('Atomic cutover',`${s.active} active; ${s.fallback} retained as fallback`)};$('rollback').onclick=()=>{if(!s.cut)return;const old=s.active;s.active=s.fallback;s.fallback=old;s.cut=false;s.verified=false;s.rolledBack=true;s.rev++;$('message').textContent='Alias rolled back; the previous active generation is now the fallback.';add('Rollback',`${s.active} restored at revision ${s.rev}`)};$('reset').onclick=()=>{Object.assign(s,{docs:3,rev:1,active:'index-v1',building:'index-v2',fallback:'not set',verified:false,cut:false,rolledBack:false,log:[]});$('message').textContent='Reset to the initial synthetic state.';render()};render();</script></body></html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|