diff --git a/docs/presentation/01-system.mmd b/docs/presentation/01-system.mmd index 84086e8..2fc4884 100644 --- a/docs/presentation/01-system.mmd +++ b/docs/presentation/01-system.mmd @@ -1,18 +1,9 @@ -flowchart LR - U[User / Admin] --> UI[Angular frontend] - UI -->|REST + session cookie + CSRF| API[FastAPI API] - UI <-->|WebSocket: PCM + JSON events| API - API --> AUTH[Authentication / role / organization] - API -->|Upload: independent document + job| DB[(PostgreSQL + pgvector)] - API --> FS[(Immutable originals / extraction artifacts)] - W[Separate ingestion worker] -->|Claim job + lease + heartbeat| DB - W -->|Read original / retain extraction| FS - W --> OCR[OpenRouter vision / Gemini Flash] - W --> EMB[Local Ollama / bge-m3] - W -->|Atomic chunks + vectors publication| DB - API --> RT[OpenAI Realtime adapter] - RT <-->|Provider WebSocket| OAI[OpenAI gpt-realtime-2.1 / Marin] - RT -->|Validated tools| SEARCH[Shared backend SearchService] - SEARCH --> EMB - SEARCH -->|Eligible document chunks| DB - API -->|Selection / revision invalidation| DB +flowchart TB + UI[Angular frontend: uploads + voice] <-->|REST / browser WebSocket| API[FastAPI: auth + lifecycle + VoiceRuntime + SearchService] + API <-->|Provider WebSocket| OAI[OpenAI Realtime] + API <-->|State + eligible retrieval| DB[(PostgreSQL + pgvector)] + W[Independent ingestion worker] <-->|Claim / lease / publication| DB + W <-->|Originals / extraction artifacts| FS[(Immutable file storage)] + W <-->|Vision transcription| V[OpenRouter / Gemini Flash] + API -->|Query vector| E[Local Ollama / bge-m3] + W -.->|Document vectors; shared embedding service| E diff --git a/docs/presentation/01-system.png b/docs/presentation/01-system.png index 30d7150..1685fe4 100644 Binary files a/docs/presentation/01-system.png and b/docs/presentation/01-system.png differ diff --git a/docs/presentation/01-system.svg b/docs/presentation/01-system.svg index 8ccc69b..6515650 100644 --- a/docs/presentation/01-system.svg +++ b/docs/presentation/01-system.svg @@ -1,102 +1,57 @@ -System architecture -Deployed application boundaries and shared storage - - - -System architecture -Deployed application boundaries and shared storage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Browser / Angular -Admin uploads; user voice -REST and browser WebSocket - - -FastAPI API -Auth, lifecycle, selection -Server-derived organization - - -VoiceRuntime + adapter -Audio relay and trusted tools -OpenAI Realtime protocol - - -OpenAI Realtime -gpt-realtime-2.1 / Marin -Audio, transcripts, tool calls - - -Immutable file storage -Originals and extraction artifacts -Checksums and frozen profiles - - -PostgreSQL + pgvector -Documents, jobs, chunks, sessions -Evidence and audit records - - -Backend SearchService -Shared bounded retrieval -Eligibility and revision checks - - -Local embedding service -Ollama / bge-m3 -Document and query vectors - - -Admin knowledge selection -Ready is not yet searchable -Explicit active selection - - -Separate ingestion worker -Claim, extract, chunk, embed -Lease-fenced atomic publication - - -Vision extraction adapter -OpenRouter / Gemini 2.5 Flash -Affected PDF pages and images - - -Operational control -Health, structured diagnostics -Original API retained for rollback -Scope: current voice MVP. Full text chat/history and production multi-API recovery are not presented as complete. -Frontend / admin -Backend logic -Persistent state -AI / embedding provider +System architectureFrontend, API, independent ingestion worker, providers and persistent storage. Principal connections only. + + + +System architecture +One API, one ingestion worker, shared knowledge storage + + +REST / WebSocket + +Provider WS + +State + retrieval + +Claim / publish + + + +Query vector + +Angular frontend +Admin uploads / user voice +REST + browser WebSocket + +FastAPI API +Auth + session lifecycle +VoiceRuntime + SearchService +Trusted tools and audio relay + +Ingestion worker +Claim + lease + heartbeat +Extract / chunk / embed +Atomic fenced publication + +OpenAI Realtime +gpt-realtime-2.1 / Marin +Audio + transcripts + tool calls + +Vision extraction +OpenRouter / Gemini Flash +Images and affected PDF pages + +PostgreSQL + pgvector +Jobs / documents / chunks +Vectors / sessions / tool results + +Immutable file storage +Originals + extraction artifacts +SHA256 and source provenance + +Local embeddings +Ollama / bge-m3 +Shared by API and worker +Voice: browser → API → OpenAI. Ingestion: worker → extraction → embeddings → atomic publication. +Principal connections only. Detailed job, evidence, activation and interruption flows are shown in the other three diagrams. \ No newline at end of file diff --git a/docs/presentation/technical-pipelines.pdf b/docs/presentation/technical-pipelines.pdf index 0524898..d975b1a 100644 Binary files a/docs/presentation/technical-pipelines.pdf and b/docs/presentation/technical-pipelines.pdf differ