Skip to content

Architecture Overview

Nyravio separates the user-facing workspace from provider-specific model, retrieval, and tool integrations.

Component Technologies
Backend Java 21, Spring Boot 4.1, Spring Security
Frontend Svelte 5, SvelteKit 3, TypeScript 6
Styling Tailwind CSS 4
Build tools Gradle 9 (backend), Vite (frontend)
Database PostgreSQL 16, Flyway migrations
Vector search pgvector
Document processing Apache Tika 3.1
Streaming Server-Sent Events (SSE)
Models OpenAI-compatible, Anthropic, Google, Ollama
Tools Model Context Protocol (MCP)
Observability Spring Boot Actuator, Micrometer, Prometheus
Deployment Docker, Docker Compose
Nyravio Workspace
Svelte / SvelteKit / TypeScript
│
REST / SSE
│
Java / Spring Boot
│
┌───────────────────────────────────────────────┐
│ Application Backend │
│ │
│ Identity & Access Conversations │
│ Context Engine Projects │
│ Memory Knowledge & Retrieval │
│ Model Adapters Agent Execution │
│ Tool Gateway Artifact Management │
│ Administration Background Tasks │
└───────────────────────────────────────────────┘
│ │ │
▼ ▼ ▼
AI Providers MCP Servers PostgreSQL
Local Models Apache Tika pgvector
File Storage

Presentation, input, streaming display, and accessibility. The frontend never holds privileged provider credentials or tenant-wide secrets.

Identity, authorization, tenant context, conversation state, context assembly, streaming protocol, audit events, quotas, and provider dispatch.

Normalized model requests, streaming events, timeouts, retry eligibility, and usage reconciliation. Four adapters are implemented:

  • OpenAI adapter — OpenAI API and OpenAI-compatible services
  • Anthropic adapter — Claude models
  • Google adapter — Gemini models
  • Local adapter — Ollama and local models

Access-controlled corpus ingestion and retrieval. Open integrations work independently of optional proprietary services.

Per-user and per-tenant policy enforcement, approval, rate limits, audit, and sandboxing of untrusted operations. Supports MCP 2025-03-26 with Streamable HTTP and OAuth 2.1.

Additional retrieval, audio processing, code execution, extraction, voice, and image generation. Failure or absence is observable and cannot corrupt core state.

  • Tenant identity comes from trusted authenticated context, never a client-controlled tenant header alone.
  • Authorization is enforced at every data boundary and asynchronous continuation.
  • SSRF protection — unknown or untrusted outbound URLs are validated against a policy.
  • Content safety — model-generated HTML, citations, tool outputs, markdown links, and file references are treated as untrusted.
  • Stream lifecycle — a stream may terminate because of client disconnect, tool cancellation, provider failure, quota, or normal completion. Each path has defined cleanup and accounting behavior.
  • Fail closed — privileged features fail closed. Disabled optional capabilities are invisible or clearly unavailable.

Server-side context assembly with budget-aware prompt window management. Brings together conversation history, user instructions, project information, personal and project-scoped memory, and relevant knowledge. Applies history compression as conversations grow.

Document ingestion → text extraction (Tika) → chunking → vector embedding → PostgreSQL/pgvector storage → hybrid search retrieval.

Multi-step task orchestration with tool interaction, approval controls, progress monitoring, and execution limits.

Dedicated workspace for code, documents, tables, charts, diagrams, vector graphics, and interactive components. Version history and diff comparison.

backend/ Java backend — API, domain logic, adapters, tests
frontend/ Svelte frontend — UI, workspaces, settings, tests
docs/ Technical documentation
deploy/ (not present — compose.yaml is at root)

For the complete directory layout, see Repository Layout.