Deployment
Service topology
Understand the default containers, ports, persistence, and approved outbound connections.
Default services
| Service | Responsibility | Typical host exposure |
|---|---|---|
web | Next.js user and admin interface | ${FRONTEND_PORT:-9950} |
api | FastAPI auth, chat, files, admin, RAG, and gateway logic | ${BACKEND_PORT:-7800}, normally loopback |
postgres | Application data and pgvector embeddings | Internal only |
valkey | Cache and session-adjacent work | Internal only |
search-broker | Optional controlled search and URL fetching | Internal or isolated host |
searxng | Optional local metasearch provider | Internal only |
Data flow
flowchart LR
Browser[Browser or PWA] --> Web[Next.js web]
Web --> API[FastAPI API]
API --> DB[PostgreSQL and pgvector]
API --> Cache[Valkey]
API --> Files[Mapped upload storage]
API --> Models[Approved model providers]
API --> Entra[Microsoft Entra ID]
API --> Broker[Optional search broker]
Broker --> Search[Brave, Tavily, or SearXNG]Uploaded files are stored and processed by the API. Extracted text, retrieved chunks, or permitted inline visuals are added to a model request when a user selects them. The application does not use provider-native file upload.
Exposure guidance
Expose the web origin through HTTPS. Keep PostgreSQL, Valkey, and SearXNG on private container networks. Keep the API on loopback or an internal network unless the deployment architecture requires direct proxy access.