# techteam-zephvion/install-unotusk architecture

> Architecture diagram of the GitHub repository techteam-zephvion/install-unotusk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techteam-zephvion/install-unotusk
- Repository: https://github.com/techteam-zephvion/install-unotusk

## Overview

Unotusk is a project-intelligence product: users establish tenant-scoped organizations and projects, connect repositories, then the backend ingests code and supports discovery, reports, and grounded project investigation. The graph focuses on the implemented API and worker runtime. The README documents web workflows and Redis task plumbing, but the web source is absent from the supplied tree; related links are cited to the README. Some engine internals were only partially excerpted, so uncertain internal calls are omitted.

Main entry points: [`apps/api/src/main.py`](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/main.py) (FastAPI application), [`apps/api/src/db/session.py`](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/db/session.py) (PostgreSQL data), [`apps/api/src/services/ingestion_service.py`](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/ingestion_service.py) (Repository ingestion), [`services/workers/worker.py`](https://github.com/techteam-zephvion/install-unotusk/blob/main/services/workers/worker.py) (Background worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Identity and Projects"]
  node_auth["Authentication<br/>[auth_service.py]"]
  node_org["Organization workflows<br/>[organizations.py]"]
  node_project["Project workflows<br/>[projects.py]"]
end

subgraph group_ingest["Repository Indexing"]
  node_repo_routes["Repository endpoints<br/>[repository.py]"]
  node_repo_service["Repository management"]
  node_ingestion["Repository ingestion"]
  node_parser["Code parsers"]
  node_github["GitHub integration<br/>[github_client.py]"]
end

subgraph group_intelligence["Code Intelligence"]
  node_discovery["Discovery analysis<br/>[engine.py]"]
  node_reports["Intelligence reports<br/>[engine.py]"]
  node_context["Project investigation<br/>[engine.py]"]
  node_knowledge["Project knowledge"]
  node_llm["LLM providers<br/>[factory.py]"]
end

subgraph group_runtime["API and Jobs"]
  node_api["FastAPI application<br/>[main.py]"]
  node_database[("PostgreSQL data<br/>[session.py]")]
  node_worker["Background worker<br/>[worker.py]"]
  node_queue["Redis task queue"]
end

node_user(("Project user"))

node_user -->|"uses"| node_api
node_api -->|"routes auth"| node_auth
node_api -->|"routes requests"| node_org
node_api -->|"routes requests"| node_project
node_api -->|"routes requests"| node_repo_routes
node_repo_routes -->|"calls"| node_repo_service
node_repo_service -.->|"persists records"| node_database
node_api -->|"dispatches jobs"| node_queue
node_queue -->|"delivers tasks"| node_worker
node_worker -->|"runs ingestion"| node_ingestion
node_worker -->|"runs analysis"| node_discovery
node_worker -->|"runs generation"| node_reports
node_ingestion -->|"retrieves source"| node_github
node_ingestion -->|"parses code"| node_parser
node_ingestion -->|"stores index"| node_database
node_discovery -->|"reads and writes"| node_database
node_reports -->|"reads and writes"| node_database
node_context -->|"requests synthesis"| node_llm
node_context -->|"retrieves context"| node_database
node_context -.->|"retrieves knowledge"| node_knowledge

click node_api "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/main.py"
click node_auth "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/auth_service.py"
click node_org "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/api/routes/organizations.py"
click node_project "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/api/routes/projects.py"
click node_repo_routes "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/api/routes/repository.py"
click node_repo_service "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/repository_service.py"
click node_ingestion "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/ingestion_service.py"
click node_parser "https://github.com/techteam-zephvion/install-unotusk/tree/main/apps/api/src/services/parser"
click node_github "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/github_client.py"
click node_database "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/db/session.py"
click node_worker "https://github.com/techteam-zephvion/install-unotusk/blob/main/services/workers/worker.py"
click node_discovery "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/discovery_engine/engine.py"
click node_reports "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/report_engine/engine.py"
click node_context "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/context_engine/engine.py"
click node_knowledge "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/knowledge_service.py"
click node_llm "https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/llm/factory.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_auth,node_org,node_project,node_user toneBlue
class node_repo_routes,node_repo_service,node_ingestion,node_parser,node_github toneAmber
class node_discovery,node_reports,node_context,node_knowledge,node_llm toneMint
class node_api,node_database,node_worker,node_queue toneRose
```

## Components

### Identity and Projects

- [Authentication](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/auth_service.py): `apps/api/src/services/auth_service.py`
- [Organization workflows](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/api/routes/organizations.py): `apps/api/src/api/routes/organizations.py`
- [Project workflows](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/api/routes/projects.py): `apps/api/src/api/routes/projects.py`

### Repository Indexing

- [Repository endpoints](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/api/routes/repository.py): `apps/api/src/api/routes/repository.py`
- [Repository management](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/repository_service.py): `apps/api/src/services/repository_service.py`
- [Repository ingestion](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/ingestion_service.py): `apps/api/src/services/ingestion_service.py`
- [Code parsers](https://github.com/techteam-zephvion/install-unotusk/tree/main/apps/api/src/services/parser): `apps/api/src/services/parser`
- [GitHub integration](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/github_client.py): `apps/api/src/services/github_client.py`

### Code Intelligence

- [Discovery analysis](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/discovery_engine/engine.py): `apps/api/src/services/discovery_engine/engine.py`
- [Intelligence reports](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/report_engine/engine.py): `apps/api/src/services/report_engine/engine.py`
- [Project investigation](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/context_engine/engine.py): `apps/api/src/services/context_engine/engine.py`
- [Project knowledge](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/knowledge_service.py): `apps/api/src/services/knowledge_service.py`
- [LLM providers](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/services/llm/factory.py): `apps/api/src/services/llm/factory.py`

### API and Jobs

- [FastAPI application](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/main.py): `apps/api/src/main.py`
- [PostgreSQL data](https://github.com/techteam-zephvion/install-unotusk/blob/main/apps/api/src/db/session.py): `apps/api/src/db/session.py`
- [Background worker](https://github.com/techteam-zephvion/install-unotusk/blob/main/services/workers/worker.py): `services/workers/worker.py`
- **Redis task queue**

### Other components

- **Project user**

## Connections

- Project user → FastAPI application: uses (evidence: `README.md`)
- FastAPI application → Authentication: routes auth (evidence: `apps/api/src/main.py`)
- FastAPI application → Organization workflows: routes requests (evidence: `apps/api/src/main.py`)
- FastAPI application → Project workflows: routes requests (evidence: `apps/api/src/main.py`)
- FastAPI application → Repository endpoints: routes requests (evidence: `apps/api/src/main.py`)
- Repository endpoints → Repository management: calls (evidence: `apps/api/src/api/routes/repository.py`)
- Repository management → PostgreSQL data: persists records
- FastAPI application → Redis task queue: dispatches jobs (evidence: `README.md`)
- Redis task queue → Background worker: delivers tasks (evidence: `README.md`)
- Background worker → Repository ingestion: runs ingestion (evidence: `services/workers/worker.py`)
- Background worker → Discovery analysis: runs analysis (evidence: `services/workers/worker.py`)
- Background worker → Intelligence reports: runs generation (evidence: `services/workers/worker.py`)
- Repository ingestion → GitHub integration: retrieves source (evidence: `apps/api/src/services/ingestion_service.py`)
- Repository ingestion → Code parsers: parses code (evidence: `apps/api/src/services/ingestion_service.py`)
- Repository ingestion → PostgreSQL data: stores index (evidence: `apps/api/src/services/ingestion_service.py`)
- Discovery analysis → PostgreSQL data: reads and writes (evidence: `apps/api/src/services/discovery_engine/engine.py`)
- Intelligence reports → PostgreSQL data: reads and writes (evidence: `apps/api/src/services/report_engine/engine.py`)
- Project investigation → LLM providers: requests synthesis (evidence: `apps/api/src/services/context_engine/engine.py`)
- Project investigation → PostgreSQL data: retrieves context (evidence: `apps/api/src/services/context_engine/engine.py`)
- Project investigation → Project knowledge: retrieves knowledge
