Frontend — Next.js 15 / React 19
FR/EN interface; same-origin proxy to the API (the browser only talks to the frontend).
RAGatm Open is a modular web application: a user interface, an API, workers, a PostgreSQL database with pgvector, and an inference gateway that is the only path to the local models.
Every answer follows the same path, observable in the published code: import, extraction, chunking, embeddings, hybrid retrieval, reranking, generation, citations.
Three repositories, nine services in the Compact profile.
FR/EN interface; same-origin proxy to the API (the browser only talks to the frontend).
API, authentication with mandatory TOTP second factor, workspace roles (owner, admin, member, viewer), per-space isolation, ingestion, retrieval, SSE chat, audit log.
Asynchronous ingestion, reindexing, maintenance, analytics; beat scheduler for periodic tasks.
Data, 768-dimension vectors (HNSW index), full-text search, embedding pipeline identity; source of truth for backups.
Task queue, results, cache. Never a source of truth.
Sole inference path: generation, embeddings, reranking; strict model registry (digests), typed errors, non-inferential health probes, concurrency limits.
Runs the generation and embedding models locally; reachable only from the gateway.
Serves the reranking cross-encoder on CPU, inside the gateway’s network namespace.
HTTP router in front of one or more gateways; no inference; absent from the Compact profile.
One machine, nine Docker Compose services, five networks of which four are internal.
| Service | Technology | Role | Networks | Memory |
|---|---|---|---|---|
frontend | Next.js 15 / React 19 (node:22-alpine) | FR/EN web UI; same-origin proxy to the API; the only published port (127.0.0.1:18080). — 127.0.0.1:18080 | edge, app | 512m |
backend | Django 5.2 + DRF (python:3.12-slim) | REST API, authentication with mandatory TOTP MFA, spaces and permissions, ingestion, hybrid retrieval, generation with citations (SSE). | app, data, ai | 1536m |
worker | Celery 5.6 | Asynchronous processing: ingestion, reindexing, maintenance, analytics; concurrency 2. | data, ai | 2g |
beat | Celery beat | Scheduler for periodic tasks. | data | 256m |
db | PostgreSQL 16 + pgvector | Relational data, 768-dimension vectors (HNSW), full-text search; source of truth for backups. | data | 1g |
redis | Redis 7.2 | Celery broker, results and cache; not a source of truth. | data | 256m |
ai-gateway | AI Gateway Open — FastAPI (python:3.12-slim) | Sole inference path: generation (aggregated or streamed), embeddings, reranking, strict model registry, typed errors. | ai, inference | 512m |
ollama | Ollama 0.30 | Local execution of generation and embedding models; reachable only by the gateway. | inference | 5g |
reranker | Text Embeddings Inference (CPU) | bge-reranker-v2-m3 cross-encoder sharing the gateway’s network namespace (loopback). | inference (namespace de la passerelle) | 6g |
The Compact profile calls the gateway directly. The Pool is a separate, optional component that relays the same API contract without changing it.
Direct mode: RAGatm Open (backend and worker) sends HTTP/JSON requests to AI Gateway Open, which calls Ollama and TEI. No other component.
Pool mode: RAGatm Open sends the same requests to AI Gateway Pool Open, which relays them byte for byte to an eligible AI Gateway Open (node 1 parity-qualified; nodes 2 to n implemented but not hardware-qualified). The Pool runs no model.
When a component is missing, the application says so. Codes returned by the RAGatm Open API:
| HTTP | Code | Meaning |
|---|---|---|
| 503 | ai_gateway_unavailable | The gateway is unreachable: no fabricated answer. |
| 502 | ai_gateway_error | The gateway returned an error. |
| 503 | dependency_unavailable | A dependency (database, cache, model) is unavailable. |
The published code targets one machine first. Here are the documented limits.
One tested profile, two proposed target architectures. Statuses are explicit.
One machine, 9 services
local models on CPU
8 threads · 14 GB RAM · no GPU
Functional qualification executed (RC2). 8 GB and 12 GB GPU variants described, not qualified.
Application and models separated
same gateway-api/1.0 contract
more resources, dedicated GPU possible
Target architecture proposed by the project, not described in the Open documentation. Original document storage remains bound to one host (ADR-001).
Pool in front of several gateways
distributed inference nodes
per-node capacity, circuit breaker
Multi-node policies implemented and tested on simulated nodes; hardware multi-node not qualified.
The gateway exposes 19 routes described by an OpenAPI 3.1 contract (gateway-api/1.0.yaml, version 1.0.0-candidate.2). The contract is a candidate, not ratified: it may still change before a final 1.0. Every response carries a request identifier (X-Request-ID) relayed end to end.
gateway-api/1.0.yaml (external link) · Pool architecture (external link) · Architecture (repository) (external link)