# databrickslabs/ontos architecture

> Architecture diagram of the GitHub repository databrickslabs/ontos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/databrickslabs/ontos
- Repository: https://github.com/databrickslabs/ontos

## Overview

Ontos is a Databricks Unity Catalog data-governance platform: users work through a React application to organize and govern data products, contracts, assets, and teams, with APIs supporting reviews, search, and other governance capabilities. Its backend separates routes, business-logic managers, and persistence; integrations include Unity Catalog and LLM services. The README documents the broader product capabilities, while the sampled source directly demonstrates review and LLM-search paths. Other feature branches are included from the README and tree, but their internal calls are not inferred.

Main entry points: [`src/backend/src/controller/llm_search_manager.py`](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/llm_search_manager.py) (LLM search manager), [`src/frontend/src/app.tsx`](https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/app.tsx) (React application), [`src/backend/src/controller/data_asset_reviews_manager.py`](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_asset_reviews_manager.py) (Review manager), [`src/backend/src/routes/data_asset_reviews_routes.py`](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/routes/data_asset_reviews_routes.py) (Review endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_webapp["React application<br/>[app.tsx]"]
  node_review_ui["Asset review UI"]
  node_llm_ui["Conversational search UI<br/>[llm-search.tsx]"]
end

subgraph group_api["Backend API"]
  node_api_app["FastAPI application<br/>[app.py]"]
  node_review_routes["Review endpoints"]
  node_llm_routes["LLM search endpoints"]
  node_settings["Application configuration<br/>[config.py]"]
end

subgraph group_governance["Governance capabilities"]
  node_contracts["Data contracts"]
  node_products["Data products"]
  node_organization["Domains and teams"]
  node_compliance["Compliance automation"]
  node_review_manager["Review manager"]
  node_semantic["Semantic models"]
end

subgraph group_intelligence["Search and integrations"]
  node_llm_manager["LLM search manager"]
  node_llm_client["Databricks LLM client<br/>[llm_client.py]"]
  node_llm_service["Secure LLM service<br/>[llm_service.py]"]
  node_workspace["Unity Catalog client"]
  node_mcp["MCP tools<br/>[registry.py]"]
end

subgraph group_persistence["Persistence"]
  node_review_repository["Review repository"]
  node_llm_repository["Conversation sessions"]
  node_database[("PostgreSQL / Lakebase<br/>[database.py]")]
  node_reviews["Review records"]
  node_sessions["LLM session records<br/>[llm_sessions.py]"]
end

node_user(("Governance user"))
node_databricks["Databricks serving"]

node_user -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_review_ui
node_webapp -.->|"routes to"| node_llm_ui
node_review_ui -.->|"submits reviews"| node_review_routes
node_llm_ui -.->|"sends chat"| node_llm_routes
node_api_app -->|"registers routes"| node_review_routes
node_api_app -->|"registers routes"| node_llm_routes
node_review_routes -->|"calls"| node_review_manager
node_review_manager -->|"uses"| node_review_repository
node_review_manager -->|"checks concepts"| node_semantic
node_review_repository -->|"maps records"| node_reviews
node_llm_routes -->|"calls"| node_llm_manager
node_llm_manager -->|"loads sessions"| node_llm_repository
node_llm_manager -->|"creates client"| node_llm_client
node_llm_service -->|"creates client"| node_llm_client
node_llm_client -->|"connects to"| node_databricks
node_llm_manager -->|"uses tools"| node_mcp
node_llm_repository -->|"stores"| node_sessions
node_reviews -.->|"persisted in"| node_database
node_sessions -.->|"persisted in"| node_database
node_products -.->|"Unity Catalog integration"| node_workspace
node_contracts -.->|"Unity Catalog integration"| node_workspace
node_organization -.->|"Unity Catalog integration"| node_workspace

click node_webapp "https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/app.tsx"
click node_review_ui "https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/components/data-asset-reviews/asset-review-editor.tsx"
click node_llm_ui "https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/components/search/llm-search.tsx"
click node_api_app "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/app.py"
click node_review_routes "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/routes/data_asset_reviews_routes.py"
click node_llm_routes "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/routes/llm_search_routes.py"
click node_contracts "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_contracts_manager.py"
click node_products "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_products_manager.py"
click node_organization "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_domains_manager.py"
click node_compliance "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/compliance_manager.py"
click node_review_manager "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_asset_reviews_manager.py"
click node_semantic "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/semantic_models_manager.py"
click node_llm_manager "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/llm_search_manager.py"
click node_llm_client "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/llm_client.py"
click node_llm_service "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/llm_service.py"
click node_workspace "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/workspace_client.py"
click node_mcp "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/tools/registry.py"
click node_review_repository "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/repositories/data_asset_reviews_repository.py"
click node_llm_repository "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/repositories/llm_sessions_repository.py"
click node_database "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/database.py"
click node_settings "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/config.py"
click node_reviews "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/db_models/data_asset_reviews.py"
click node_sessions "https://github.com/databrickslabs/ontos/blob/development/src/backend/src/db_models/llm_sessions.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_review_ui,node_llm_ui,node_user toneBlue
class node_api_app,node_review_routes,node_llm_routes,node_settings toneAmber
class node_contracts,node_products,node_organization,node_compliance,node_review_manager,node_semantic toneMint
class node_llm_manager,node_llm_client,node_llm_service,node_workspace,node_mcp toneRose
class node_review_repository,node_llm_repository,node_database,node_reviews,node_sessions,node_databricks toneIndigo
```

## Components

### User interface

- [React application](https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/app.tsx): `src/frontend/src/app.tsx`
- [Asset review UI](https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/components/data-asset-reviews/asset-review-editor.tsx): `src/frontend/src/components/data-asset-reviews/asset-review-editor.tsx`
- [Conversational search UI](https://github.com/databrickslabs/ontos/blob/development/src/frontend/src/components/search/llm-search.tsx): `src/frontend/src/components/search/llm-search.tsx`

### Backend API

- [FastAPI application](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/app.py): `src/backend/src/app.py`
- [Review endpoints](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/routes/data_asset_reviews_routes.py): `src/backend/src/routes/data_asset_reviews_routes.py`
- [LLM search endpoints](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/routes/llm_search_routes.py): `src/backend/src/routes/llm_search_routes.py`
- [Application configuration](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/config.py): `src/backend/src/common/config.py`

### Governance capabilities

- [Data contracts](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_contracts_manager.py): `src/backend/src/controller/data_contracts_manager.py`
- [Data products](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_products_manager.py): `src/backend/src/controller/data_products_manager.py`
- [Domains and teams](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_domains_manager.py): `src/backend/src/controller/data_domains_manager.py`
- [Compliance automation](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/compliance_manager.py): `src/backend/src/controller/compliance_manager.py`
- [Review manager](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/data_asset_reviews_manager.py): `src/backend/src/controller/data_asset_reviews_manager.py`
- [Semantic models](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/semantic_models_manager.py): `src/backend/src/controller/semantic_models_manager.py`

### Search and integrations

- [LLM search manager](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/controller/llm_search_manager.py): `src/backend/src/controller/llm_search_manager.py`
- [Databricks LLM client](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/llm_client.py): `src/backend/src/common/llm_client.py`
- [Secure LLM service](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/llm_service.py): `src/backend/src/common/llm_service.py`
- [Unity Catalog client](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/workspace_client.py): `src/backend/src/common/workspace_client.py`
- [MCP tools](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/tools/registry.py): `src/backend/src/tools/registry.py`

### Persistence

- [Review repository](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/repositories/data_asset_reviews_repository.py): `src/backend/src/repositories/data_asset_reviews_repository.py`
- [Conversation sessions](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/repositories/llm_sessions_repository.py): `src/backend/src/repositories/llm_sessions_repository.py`
- [PostgreSQL / Lakebase](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/common/database.py): `src/backend/src/common/database.py`
- [Review records](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/db_models/data_asset_reviews.py): `src/backend/src/db_models/data_asset_reviews.py`
- [LLM session records](https://github.com/databrickslabs/ontos/blob/development/src/backend/src/db_models/llm_sessions.py): `src/backend/src/db_models/llm_sessions.py`

### Other components

- **Governance user**
- **Databricks serving**

## Connections

- Governance user → React application: uses (evidence: `README.md`)
- React application → Asset review UI: routes to (evidence: `src/frontend/src/app.tsx`)
- React application → Conversational search UI: routes to
- Asset review UI → Review endpoints: submits reviews
- Conversational search UI → LLM search endpoints: sends chat
- FastAPI application → Review endpoints: registers routes (evidence: `src/backend/src/app.py`)
- FastAPI application → LLM search endpoints: registers routes (evidence: `src/backend/src/app.py`)
- Review endpoints → Review manager: calls (evidence: `src/backend/src/routes/data_asset_reviews_routes.py`)
- Review manager → Review repository: uses (evidence: `src/backend/src/controller/data_asset_reviews_manager.py`)
- Review manager → Semantic models: checks concepts (evidence: `src/backend/src/controller/data_asset_reviews_manager.py`)
- Review repository → Review records: maps records (evidence: `src/backend/src/repositories/data_asset_reviews_repository.py`)
- LLM search endpoints → LLM search manager: calls (evidence: `src/backend/src/routes/llm_search_routes.py`)
- LLM search manager → Conversation sessions: loads sessions (evidence: `src/backend/src/controller/llm_search_manager.py`)
- LLM search manager → Databricks LLM client: creates client (evidence: `src/backend/src/controller/llm_search_manager.py`)
- Secure LLM service → Databricks LLM client: creates client (evidence: `src/backend/src/common/llm_service.py`)
- Databricks LLM client → Databricks serving: connects to (evidence: `src/backend/src/common/llm_client.py`)
- LLM search manager → MCP tools: uses tools (evidence: `src/backend/src/controller/llm_search_manager.py`)
- Conversation sessions → LLM session records: stores (evidence: `src/backend/src/repositories/llm_sessions_repository.py`)
- Review records → PostgreSQL / Lakebase: persisted in
- LLM session records → PostgreSQL / Lakebase: persisted in (evidence: `src/backend/src/db_models/llm_sessions.py`)
- Data products → Unity Catalog client: Unity Catalog integration
- Data contracts → Unity Catalog client: Unity Catalog integration
- Domains and teams → Unity Catalog client: Unity Catalog integration
