Files
rag-technical-docs-assistant/docs/presentation/01-system.svg
T

57 lines
4.9 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img">
<title>System architecture</title><desc>Frontend, API, independent ingestion worker, providers and persistent storage. Principal connections only.</desc>
<defs><marker id="a" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto-start-reverse"><path d="M0,0 L8,4 L0,8" fill="#64748b"/></marker></defs>
<rect width="1600" height="1000" fill="white"/>
<style>text{font-family:Segoe UI,Arial,sans-serif}.title{font-size:38px;font-weight:700;fill:#0f172a}.sub{font-size:20px;fill:#475569}.head{font-size:24px;font-weight:650;fill:#0f172a}.body{font-size:19px;fill:#475569}.label{font-size:16px;fill:#475569}</style>
<text x="80" y="65" class="title">System architecture</text>
<text x="80" y="105" class="sub">One API, one ingestion worker, shared knowledge storage</text>
<rect x="600" y="345" width="400" height="550" rx="24" fill="#f8fafc"/>
<path d="M800,270 L800,365" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<text x="825" y="315" class="label">REST / WebSocket</text>
<path d="M980,435 L1160,435" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<text x="1015" y="415" class="label">Provider WS</text>
<path d="M800,515 L800,735" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<text x="825" y="610" class="label">State + retrieval</text>
<path d="M430,435 L520,435 L520,805 L620,805" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<text x="455" y="550" class="label">Claim / publish</text>
<path d="M255,515 L255,555" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<path d="M80,435 L40,435 L40,805 L80,805" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<path d="M980,485 L1070,485 L1070,805 L1160,805" fill="none" stroke="#94a3b8" stroke-width="2.4" marker-end="url(#a)" marker-start="url(#a)"/>
<text x="1090" y="640" class="label">Query vector</text>
<rect x="620" y="155" width="360" height="115" rx="16" fill="#e8f0fe" stroke="#2563eb" stroke-width="2"/>
<text x="642" y="193" class="head">Angular frontend</text>
<text x="642" y="226" class="body">Admin uploads / user voice</text>
<text x="642" y="253" class="body">REST + browser WebSocket</text>
<rect x="620" y="365" width="360" height="150" rx="16" fill="#e6f7f2" stroke="#0f766e" stroke-width="2"/>
<text x="642" y="403" class="head">FastAPI API</text>
<text x="642" y="436" class="body">Auth + session lifecycle</text>
<text x="642" y="463" class="body">VoiceRuntime + SearchService</text>
<text x="642" y="490" class="body">Trusted tools and audio relay</text>
<rect x="80" y="365" width="350" height="150" rx="16" fill="#e6f7f2" stroke="#0f766e" stroke-width="2"/>
<text x="102" y="403" class="head">Ingestion worker</text>
<text x="102" y="436" class="body">Claim + lease + heartbeat</text>
<text x="102" y="463" class="body">Extract / chunk / embed</text>
<text x="102" y="490" class="body">Atomic fenced publication</text>
<rect x="1160" y="365" width="350" height="150" rx="16" fill="#fff2dd" stroke="#c56a08" stroke-width="2"/>
<text x="1182" y="403" class="head">OpenAI Realtime</text>
<text x="1182" y="436" class="body">gpt-realtime-2.1 / Marin</text>
<text x="1182" y="463" class="body">Audio + transcripts + tool calls</text>
<rect x="80" y="555" width="350" height="110" rx="16" fill="#fff2dd" stroke="#c56a08" stroke-width="2"/>
<text x="102" y="593" class="head">Vision extraction</text>
<text x="102" y="626" class="body">OpenRouter / Gemini Flash</text>
<text x="102" y="653" class="body">Images and affected PDF pages</text>
<rect x="620" y="735" width="360" height="140" rx="16" fill="#f2eaff" stroke="#7c3aed" stroke-width="2"/>
<text x="642" y="773" class="head">PostgreSQL + pgvector</text>
<text x="642" y="806" class="body">Jobs / documents / chunks</text>
<text x="642" y="833" class="body">Vectors / sessions / tool results</text>
<rect x="80" y="735" width="350" height="140" rx="16" fill="#f2eaff" stroke="#7c3aed" stroke-width="2"/>
<text x="102" y="773" class="head">Immutable file storage</text>
<text x="102" y="806" class="body">Originals + extraction artifacts</text>
<text x="102" y="833" class="body">SHA256 and source provenance</text>
<rect x="1160" y="735" width="350" height="140" rx="16" fill="#fff2dd" stroke="#c56a08" stroke-width="2"/>
<text x="1182" y="773" class="head">Local embeddings</text>
<text x="1182" y="806" class="body">Ollama / bge-m3</text>
<text x="1182" y="833" class="body">Shared by API and worker</text>
<text x="80" y="930" class="sub">Voice: browser → API → OpenAI. Ingestion: worker → extraction → embeddings → atomic publication.</text>
<text x="80" y="963" class="label">Principal connections only. Detailed job, evidence, activation and interruption flows are shown in the other three diagrams.</text>
</svg>