# kulikovka/banking-salary-intelligence-platform architecture

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

- Interactive diagram: https://gitdiagram.com/kulikovka/banking-salary-intelligence-platform
- Repository: https://github.com/kulikovka/banking-salary-intelligence-platform

## Overview

This repository is an early-stage banking salary intelligence platform. Its implemented workflow is operator-approved acquisition of official documents, immutable evidence storage, and provenance-checked corpus snapshots; the README explicitly says parsing into tariff content, comparison, search, and user-facing intelligence are not yet implemented. Auth and LLM components exist, but their product-workflow integration is not established by the sampled sources. The frontend and API are currently only a starter page and health endpoint. Edges below reflect shown calls or README statements; unsampled capabilities are represented without invented implementation links.

Main entry points: [`backend/app/ingestion/gateway.py`](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/gateway.py) (Fetch gateway), [`backend/app/ingestion/service.py`](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/service.py) (Fetch and import), [`backend/app/corpus/service.py`](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/corpus/service.py) (Corpus snapshots), [`backend/app/registry/models.py`](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/registry/models.py) (Source catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Document acquisition"]
  node_ingestion_service["Fetch and import<br/>[service.py]"]
  node_fetch_gateway["Fetch gateway<br/>[gateway.py]"]
  node_acquisition_policy["Acquisition policy<br/>[policy.py]"]
  node_format_validation["Format validation<br/>[formats.py]"]
  node_bank_documents["Official documents"]
  node_blob_store[("Immutable blob store<br/>[local.py]")]
end

subgraph group_catalog["Source catalog"]
  node_corpus_service["Corpus snapshots<br/>[service.py]"]
  node_source_catalog[("Source catalog<br/>[models.py]")]
  node_corpus_models[("Corpus records<br/>[models.py]")]
  node_database[("PostgreSQL")]
end

subgraph group_intelligence["Salary intelligence"]
  node_parsers["Document parsers"]
  node_tariff_normalization["Tariff normalization<br/>[normalize.py]"]
  node_tariff_models[("Tariff data<br/>[models.py]")]
  node_comparison["Salary comparison<br/>[comparison.py]"]
  node_search["Salary search<br/>[corpus.py]"]
end

subgraph group_platform["API and interface"]
  node_api["FastAPI application<br/>[main.py]"]
  node_web_ui["Web starter page<br/>[page.tsx]"]
end

subgraph group_identity["Identity and LLM"]
  node_auth_api["Authentication API<br/>[api.py]"]
  node_auth_service["Auth operations<br/>[service.py]"]
  node_auth_models[("Auth records<br/>[models.py]")]
  node_llm_client["LLM client<br/>[base.py]"]
  node_groq_provider["Groq provider<br/>[groq.py]"]
  node_fake_llm["Fake LLM<br/>[fake.py]"]
  node_llm_contracts["LLM contracts<br/>[llm.py]"]
end

node_operator(("Operator"))
node_browser_user(("Web user"))

node_operator -->|"requests fetch/import"| node_ingestion_service
node_ingestion_service -->|"fetches through"| node_fetch_gateway
node_ingestion_service -->|"records acquisition"| node_source_catalog
node_fetch_gateway -->|"checks grants"| node_acquisition_policy
node_fetch_gateway -->|"validates format"| node_format_validation
node_fetch_gateway -.->|"retrieves documents"| node_bank_documents
node_fetch_gateway -->|"stores verified bytes"| node_blob_store
node_ingestion_service -->|"registers imported blobs"| node_blob_store
node_corpus_service -->|"validates provenance"| node_source_catalog
node_corpus_service -->|"creates snapshot members"| node_corpus_models
node_corpus_service -->|"reuses ingestion"| node_ingestion_service
node_source_catalog -.->|"persists catalog"| node_database
node_corpus_models -.->|"persists snapshots"| node_database
node_parsers -.->|"extracts tariff facts"| node_tariff_normalization
node_tariff_normalization -.->|"normalizes records"| node_tariff_models
node_tariff_models -.->|"supplies tariff data"| node_comparison
node_browser_user -->|"opens page"| node_web_ui
node_web_ui -.->|"uses API"| node_api
node_api -.->|"routes auth"| node_auth_api
node_auth_api -->|"calls operations"| node_auth_service
node_auth_service -->|"reads and writes"| node_auth_models
node_llm_client -->|"uses typed contracts"| node_llm_contracts
node_groq_provider -->|"implements client"| node_llm_client
node_fake_llm -.->|"implements client"| node_llm_client
node_comparison -.->|"supports document lookup"| node_search

click node_ingestion_service "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/service.py"
click node_fetch_gateway "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/gateway.py"
click node_acquisition_policy "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/policy.py"
click node_format_validation "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/formats.py"
click node_blob_store "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/storage/local.py"
click node_corpus_service "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/corpus/service.py"
click node_source_catalog "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/registry/models.py"
click node_corpus_models "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/corpus/models.py"
click node_parsers "https://github.com/kulikovka/banking-salary-intelligence-platform/tree/main/backend/app/parsing"
click node_tariff_normalization "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/tariffs/normalize.py"
click node_tariff_models "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/tariffs/models.py"
click node_comparison "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/contracts/comparison.py"
click node_search "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/contracts/corpus.py"
click node_api "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/main.py"
click node_web_ui "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/frontend/app/page.tsx"
click node_auth_api "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/auth/api.py"
click node_auth_service "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/auth/service.py"
click node_auth_models "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/auth/models.py"
click node_llm_client "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/llm/base.py"
click node_groq_provider "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/llm/groq.py"
click node_fake_llm "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/llm/fake.py"
click node_llm_contracts "https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/contracts/llm.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_ingestion_service,node_fetch_gateway,node_acquisition_policy,node_format_validation,node_bank_documents,node_blob_store,node_browser_user toneBlue
class node_corpus_service,node_source_catalog,node_corpus_models,node_database toneAmber
class node_parsers,node_tariff_normalization,node_tariff_models,node_comparison,node_search toneMint
class node_api,node_web_ui toneRose
class node_auth_api,node_auth_service,node_auth_models,node_llm_client,node_groq_provider,node_fake_llm,node_llm_contracts,node_operator toneIndigo
```

## Components

### Document acquisition

- [Fetch and import](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/service.py): `backend/app/ingestion/service.py`
- [Fetch gateway](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/gateway.py): `backend/app/ingestion/gateway.py`
- [Acquisition policy](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/policy.py): `backend/app/ingestion/policy.py`
- [Format validation](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/ingestion/formats.py): `backend/app/ingestion/formats.py`
- **Official documents**
- [Immutable blob store](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/storage/local.py): `backend/app/storage/local.py`

### Source catalog

- [Corpus snapshots](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/corpus/service.py): `backend/app/corpus/service.py`
- [Source catalog](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/registry/models.py): `backend/app/registry/models.py`
- [Corpus records](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/corpus/models.py): `backend/app/corpus/models.py`
- **PostgreSQL**

### Salary intelligence

- [Document parsers](https://github.com/kulikovka/banking-salary-intelligence-platform/tree/main/backend/app/parsing): `backend/app/parsing`
- [Tariff normalization](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/tariffs/normalize.py): `backend/app/tariffs/normalize.py`
- [Tariff data](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/tariffs/models.py): `backend/app/tariffs/models.py`
- [Salary comparison](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/contracts/comparison.py): `backend/app/contracts/comparison.py`
- [Salary search](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/contracts/corpus.py): `backend/app/contracts/corpus.py`

### API and interface

- [FastAPI application](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/main.py): `backend/app/main.py`
- [Web starter page](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`

### Identity and LLM

- [Authentication API](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/auth/api.py): `backend/app/auth/api.py`
- [Auth operations](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/auth/service.py): `backend/app/auth/service.py`
- [Auth records](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/auth/models.py): `backend/app/auth/models.py`
- [LLM client](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/llm/base.py): `backend/app/llm/base.py`
- [Groq provider](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/llm/groq.py): `backend/app/llm/groq.py`
- [Fake LLM](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/llm/fake.py): `backend/app/llm/fake.py`
- [LLM contracts](https://github.com/kulikovka/banking-salary-intelligence-platform/blob/main/backend/app/contracts/llm.py): `backend/app/contracts/llm.py`

### Other components

- **Operator**
- **Web user**

## Connections

- Operator → Fetch and import: requests fetch/import (evidence: `README.md`)
- Fetch and import → Fetch gateway: fetches through (evidence: `backend/app/ingestion/service.py`)
- Fetch and import → Source catalog: records acquisition (evidence: `backend/app/ingestion/service.py`)
- Fetch gateway → Acquisition policy: checks grants (evidence: `backend/app/ingestion/gateway.py`)
- Fetch gateway → Format validation: validates format (evidence: `backend/app/ingestion/gateway.py`)
- Fetch gateway → Official documents: retrieves documents
- Fetch gateway → Immutable blob store: stores verified bytes (evidence: `backend/app/ingestion/gateway.py`)
- Fetch and import → Immutable blob store: registers imported blobs (evidence: `backend/app/ingestion/service.py`)
- Corpus snapshots → Source catalog: validates provenance (evidence: `backend/app/corpus/service.py`)
- Corpus snapshots → Corpus records: creates snapshot members (evidence: `backend/app/corpus/service.py`)
- Corpus snapshots → Fetch and import: reuses ingestion (evidence: `backend/app/corpus/service.py`)
- Source catalog → PostgreSQL: persists catalog
- Corpus records → PostgreSQL: persists snapshots
- Document parsers → Tariff normalization: extracts tariff facts
- Tariff normalization → Tariff data: normalizes records
- Tariff data → Salary comparison: supplies tariff data
- Web user → Web starter page: opens page (evidence: `README.md`)
- Web starter page → FastAPI application: uses API
- FastAPI application → Authentication API: routes auth
- Authentication API → Auth operations: calls operations (evidence: `backend/app/auth/api.py`)
- Auth operations → Auth records: reads and writes (evidence: `backend/app/auth/service.py`)
- LLM client → LLM contracts: uses typed contracts (evidence: `backend/app/llm/base.py`)
- Groq provider → LLM client: implements client (evidence: `backend/app/llm/groq.py`)
- Fake LLM → LLM client: implements client
- Salary comparison → Salary search: supports document lookup
