# valaevdaniil565-ops/avtohant architecture

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

- Interactive diagram: https://gitdiagram.com/valaevdaniil565-ops/avtohant
- Repository: https://github.com/valaevdaniil565-ops/avtohant

## Overview

Avtohant is a recruiting and talent-sourcing product: users work through a React frontend and FastAPI backend to ingest vacancies and specialist profiles, organize them, and find matches. The backend also supports source fetching, Telegram operations, digests, imports, and administrative workflows. Edges reflect README statements and the supplied source index or excerpts; several domain modules are present in the tree but were not sampled, so their internal call paths are not inferred.

Main entry points: [`autohunt-backend/hunting-mvp/app/db/repo.py`](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/db/repo.py) (Recruiting repository), [`autohunt-backend/hunting-mvp/backend/app/main.py`](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/main.py) (FastAPI application), [`autohunt-backend/hunting-mvp/backend/app/api/router.py`](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/api/router.py) (API router), [`autohunt-backend/hunting-mvp/backend/app/db/session.py`](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/db/session.py) (Database session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interface"]
  node_frontend["React frontend<br/>[App.jsx]"]
  node_frontend_api["API client<br/>[api.js]"]
end

subgraph group_api["Backend API"]
  node_backend["FastAPI application<br/>[main.py]"]
  node_router["API router<br/>[router.py]"]
  node_routes["Feature routes"]
  node_auth["Authentication<br/>[auth.py]"]
end

subgraph group_sourcing["Sourcing and enrichment"]
  node_pipeline["Text extraction<br/>[pipeline.py]"]
  node_source_ingestion["Source ingestion"]
  node_mcp_client["MCP fetch client<br/>[client.py]"]
  node_mcp_server["MCP fetch server<br/>[server.py]"]
  node_llm["LLM client<br/>[ollama_client.py]"]
  node_collector["Telegram collector<br/>[collector.py]"]
end

subgraph group_domain["Recruiting workflows"]
  node_imports["Source imports<br/>[imports.py]"]
  node_jobs["Job processing<br/>[jobs.py]"]
  node_matching["Talent matching<br/>[matching.py]"]
  node_telegram_bot["Telegram manager bot<br/>[manager_bot.py]"]
  node_use_case_extras["Digest and exports"]
end

subgraph group_infra["Persistence and operations"]
  node_repo["Recruiting repository<br/>[repo.py]"]
  node_db_session["Database session<br/>[session.py]"]
  node_postgres[("PostgreSQL / pgvector")]
  node_worker["Background worker<br/>[worker.py]"]
end

node_recruiter(("Recruiter"))

node_recruiter -->|"uses"| node_frontend
node_frontend -->|"requests data"| node_frontend_api
node_frontend_api -->|"calls API"| node_backend
node_backend -->|"mounts routes"| node_router
node_router -->|"registers routes"| node_routes
node_router -->|"protects routes"| node_auth
node_backend -->|"uses sessions"| node_db_session
node_db_session -->|"creates repository"| node_repo
node_db_session -.->|"opens connections"| node_postgres
node_source_ingestion -->|"fetches sources"| node_mcp_client
node_mcp_client -->|"invokes process"| node_mcp_server
node_source_ingestion -.->|"prepares content"| node_pipeline
node_pipeline -.->|"enriches text"| node_llm
node_worker -->|"runs jobs"| node_jobs
node_telegram_bot -->|"processes messages"| node_pipeline
node_telegram_bot -->|"fetches linked sources"| node_mcp_client
node_collector -.->|"collects messages"| node_postgres
node_imports -.->|"persists imports"| node_repo
node_matching -.->|"searches records"| node_repo
node_use_case_extras -.->|"accesses records"| node_repo

click node_frontend "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-frondend/src/App.jsx"
click node_frontend_api "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-frondend/src/api.js"
click node_backend "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/main.py"
click node_router "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/api/router.py"
click node_routes "https://github.com/valaevdaniil565-ops/avtohant/tree/main/autohunt-backend/hunting-mvp/backend/app/api/routes"
click node_auth "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/services/auth.py"
click node_imports "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/use_cases/imports.py"
click node_jobs "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/use_cases/jobs.py"
click node_matching "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/use_cases/matching.py"
click node_pipeline "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/pipeline.py"
click node_source_ingestion "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/services/source_ingestion.py"
click node_mcp_client "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/client.py"
click node_mcp_server "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/server.py"
click node_llm "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/llm/ollama_client.py"
click node_telegram_bot "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/bots/manager_bot.py"
click node_collector "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/collectors/tg_collector/collector.py"
click node_use_case_extras "https://github.com/valaevdaniil565-ops/avtohant/tree/main/autohunt-backend/hunting-mvp/app/use_cases"
click node_repo "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/db/repo.py"
click node_db_session "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/db/session.py"
click node_worker "https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/worker.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_frontend,node_frontend_api toneBlue
class node_backend,node_router,node_routes,node_auth toneAmber
class node_pipeline,node_source_ingestion,node_mcp_client,node_mcp_server,node_llm,node_collector toneMint
class node_imports,node_jobs,node_matching,node_telegram_bot,node_use_case_extras toneRose
class node_repo,node_db_session,node_postgres,node_worker,node_recruiter toneIndigo
```

## Components

### User interface

- [React frontend](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-frondend/src/App.jsx): `autohunt-frondend/src/App.jsx`
- [API client](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-frondend/src/api.js): `autohunt-frondend/src/api.js`

### Backend API

- [FastAPI application](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/main.py): `autohunt-backend/hunting-mvp/backend/app/main.py`
- [API router](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/api/router.py): `autohunt-backend/hunting-mvp/backend/app/api/router.py`
- [Feature routes](https://github.com/valaevdaniil565-ops/avtohant/tree/main/autohunt-backend/hunting-mvp/backend/app/api/routes): `autohunt-backend/hunting-mvp/backend/app/api/routes`
- [Authentication](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/services/auth.py): `autohunt-backend/hunting-mvp/app/services/auth.py`

### Sourcing and enrichment

- [Text extraction](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/pipeline.py): `autohunt-backend/hunting-mvp/app/pipeline.py`
- [Source ingestion](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/services/source_ingestion.py): `autohunt-backend/hunting-mvp/app/services/source_ingestion.py`
- [MCP fetch client](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/client.py): `autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/client.py`
- [MCP fetch server](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/server.py): `autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/server.py`
- [LLM client](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/llm/ollama_client.py): `autohunt-backend/hunting-mvp/app/llm/ollama_client.py`
- [Telegram collector](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/collectors/tg_collector/collector.py): `autohunt-backend/hunting-mvp/app/collectors/tg_collector/collector.py`

### Recruiting workflows

- [Source imports](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/use_cases/imports.py): `autohunt-backend/hunting-mvp/app/use_cases/imports.py`
- [Job processing](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/use_cases/jobs.py): `autohunt-backend/hunting-mvp/app/use_cases/jobs.py`
- [Talent matching](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/use_cases/matching.py): `autohunt-backend/hunting-mvp/app/use_cases/matching.py`
- [Telegram manager bot](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/bots/manager_bot.py): `autohunt-backend/hunting-mvp/app/bots/manager_bot.py`
- [Digest and exports](https://github.com/valaevdaniil565-ops/avtohant/tree/main/autohunt-backend/hunting-mvp/app/use_cases): `autohunt-backend/hunting-mvp/app/use_cases`

### Persistence and operations

- [Recruiting repository](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/app/db/repo.py): `autohunt-backend/hunting-mvp/app/db/repo.py`
- [Database session](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/db/session.py): `autohunt-backend/hunting-mvp/backend/app/db/session.py`
- **PostgreSQL / pgvector**
- [Background worker](https://github.com/valaevdaniil565-ops/avtohant/blob/main/autohunt-backend/hunting-mvp/backend/app/worker.py): `autohunt-backend/hunting-mvp/backend/app/worker.py`

### Other components

- **Recruiter**

## Connections

- Recruiter → React frontend: uses
- React frontend → API client: requests data (evidence: `autohunt-frondend/src/App.jsx`)
- API client → FastAPI application: calls API
- FastAPI application → API router: mounts routes (evidence: `autohunt-backend/hunting-mvp/backend/app/main.py`)
- API router → Feature routes: registers routes (evidence: `autohunt-backend/hunting-mvp/backend/app/api/router.py`)
- API router → Authentication: protects routes (evidence: `autohunt-backend/hunting-mvp/backend/app/api/router.py`)
- FastAPI application → Database session: uses sessions (evidence: `autohunt-backend/hunting-mvp/backend/app/main.py`)
- Database session → Recruiting repository: creates repository (evidence: `autohunt-backend/hunting-mvp/backend/app/db/session.py`)
- Database session → PostgreSQL / pgvector: opens connections
- Source ingestion → MCP fetch client: fetches sources (evidence: `autohunt-backend/hunting-mvp/app/services/source_ingestion.py`)
- MCP fetch client → MCP fetch server: invokes process (evidence: `autohunt-backend/hunting-mvp/app/integrations/mcp_source_fetcher/client.py`)
- Source ingestion → Text extraction: prepares content
- Text extraction → LLM client: enriches text
- Background worker → Job processing: runs jobs (evidence: `autohunt-backend/hunting-mvp/backend/app/worker.py`)
- Telegram manager bot → Text extraction: processes messages (evidence: `autohunt-backend/hunting-mvp/app/bots/manager_bot.py`)
- Telegram manager bot → MCP fetch client: fetches linked sources (evidence: `autohunt-backend/hunting-mvp/app/bots/manager_bot.py`)
- Telegram collector → PostgreSQL / pgvector: collects messages
- Source imports → Recruiting repository: persists imports
- Talent matching → Recruiting repository: searches records (evidence: `autohunt-backend/hunting-mvp/app/use_cases/matching.py`)
- Digest and exports → Recruiting repository: accesses records (evidence: `autohunt-backend/hunting-mvp/app/use_cases/matching.py`)
