# an90ass/vardigo architecture

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

- Interactive diagram: https://gitdiagram.com/an90ass/vardigo
- Repository: https://github.com/an90ass/vardigo

## Overview

VardiGO pairs a Flutter two-role client with a FastAPI matching and interview-offer API. The main workflow is employer login, candidate discovery and offer creation, followed by worker review, detail inspection, acceptance or rejection, and persisted status. The graph includes the backend service/repository layers and documented mobile feature boundaries. Mobile source was not included in the supplied tree, so its documented modules and API links are shown at directory level; some backend service wiring is likewise inferred from documented architecture rather than sampled implementation.

Main entry points: [`mobile_frontend/lib/core/network`](https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/core/network) (Network Layer), [`backend/app/main.py`](https://github.com/an90ass/vardigo/blob/main/backend/app/main.py) (FastAPI App), [`backend/app/repositories/candidate_repository.py`](https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/candidate_repository.py) (Candidate Repository), [`backend/app/config/database.py`](https://github.com/an90ass/vardigo/blob/main/backend/app/config/database.py) (SQL Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Flutter Client"]
  node_mobile_auth["Auth Feature"]
  node_mobile_candidates["Candidate Feature"]
  node_mobile_offers["Offer Feature"]
  node_mobile_network["Network Layer"]
end

subgraph group_api["REST API"]
  node_api_app["FastAPI App<br/>[main.py]"]
  node_auth_routes["Auth Routes<br/>[auth_routes.py]"]
  node_candidate_routes["Candidate Routes"]
  node_offer_routes["Offer Routes<br/>[offer_routes.py]"]
  node_auth_deps["Auth Dependencies<br/>[auth_deps.py]"]
end

subgraph group_domain["Matching And Offers"]
  node_auth_service["Auth Service<br/>[auth_service.py]"]
  node_candidate_service["Candidate Service"]
  node_offer_service["Offer Service<br/>[offer_service.py]"]
  node_seed_service["Seed Service<br/>[seed_service.py]"]
end

subgraph group_data["Persistence"]
  node_user_repo["User Repository<br/>[user_repository.py]"]
  node_candidate_repo["Candidate Repository"]
  node_offer_repo["Offer Repository"]
  node_database[("SQL Database<br/>[database.py]")]
end

node_employer(("Employer"))
node_worker(("Worker"))

node_employer -->|"signs in"| node_mobile_auth
node_worker -->|"signs in"| node_mobile_auth
node_mobile_auth -->|"sends login"| node_mobile_network
node_mobile_candidates -->|"requests candidates"| node_mobile_network
node_mobile_offers -->|"manages offers"| node_mobile_network
node_mobile_network -->|"calls API"| node_auth_routes
node_mobile_network -->|"calls API"| node_candidate_routes
node_mobile_network -->|"calls API"| node_offer_routes
node_api_app -->|"registers"| node_auth_routes
node_api_app -->|"registers"| node_candidate_routes
node_api_app -->|"registers"| node_offer_routes
node_api_app -->|"seeds on startup"| node_seed_service
node_auth_routes -->|"authenticates"| node_auth_service
node_candidate_routes -->|"lists candidates"| node_candidate_service
node_offer_routes -->|"manages offers"| node_offer_service
node_auth_deps -->|"verifies tokens"| node_auth_service
node_auth_service -->|"looks up users"| node_user_repo
node_candidate_service -->|"queries candidates"| node_candidate_repo
node_offer_service -->|"reads and writes"| node_offer_repo
node_offer_service -->|"checks candidates"| node_candidate_repo
node_seed_service -->|"seeds candidates"| node_candidate_repo
node_seed_service -->|"seeds offers"| node_offer_repo
node_user_repo -->|"queries users"| node_database
node_candidate_repo -->|"queries candidates"| node_database
node_offer_repo -->|"queries offers"| node_database
node_api_app -->|"creates tables"| node_database

click node_mobile_auth "https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/features/auth"
click node_mobile_candidates "https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/features/candidates"
click node_mobile_offers "https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/features/offers"
click node_mobile_network "https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/core/network"
click node_api_app "https://github.com/an90ass/vardigo/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/an90ass/vardigo/blob/main/backend/app/routes/auth_routes.py"
click node_candidate_routes "https://github.com/an90ass/vardigo/blob/main/backend/app/routes/candidate_routes.py"
click node_offer_routes "https://github.com/an90ass/vardigo/blob/main/backend/app/routes/offer_routes.py"
click node_auth_deps "https://github.com/an90ass/vardigo/blob/main/backend/app/dependencies/auth_deps.py"
click node_auth_service "https://github.com/an90ass/vardigo/blob/main/backend/app/services/auth_service.py"
click node_candidate_service "https://github.com/an90ass/vardigo/blob/main/backend/app/services/candidate_service.py"
click node_offer_service "https://github.com/an90ass/vardigo/blob/main/backend/app/services/offer_service.py"
click node_seed_service "https://github.com/an90ass/vardigo/blob/main/backend/app/services/seed_service.py"
click node_user_repo "https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/user_repository.py"
click node_candidate_repo "https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/candidate_repository.py"
click node_offer_repo "https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/offer_repository.py"
click node_database "https://github.com/an90ass/vardigo/blob/main/backend/app/config/database.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_mobile_auth,node_mobile_candidates,node_mobile_offers,node_mobile_network toneBlue
class node_api_app,node_auth_routes,node_candidate_routes,node_offer_routes,node_auth_deps toneAmber
class node_auth_service,node_candidate_service,node_offer_service,node_seed_service toneMint
class node_user_repo,node_candidate_repo,node_offer_repo,node_database,node_worker toneRose
class node_employer toneIndigo
```

## Components

### Flutter Client

- [Auth Feature](https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/features/auth): `mobile_frontend/lib/features/auth`
- [Candidate Feature](https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/features/candidates): `mobile_frontend/lib/features/candidates`
- [Offer Feature](https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/features/offers): `mobile_frontend/lib/features/offers`
- [Network Layer](https://github.com/an90ass/vardigo/tree/main/mobile_frontend/lib/core/network): `mobile_frontend/lib/core/network`

### REST API

- [FastAPI App](https://github.com/an90ass/vardigo/blob/main/backend/app/main.py): `backend/app/main.py`
- [Auth Routes](https://github.com/an90ass/vardigo/blob/main/backend/app/routes/auth_routes.py): `backend/app/routes/auth_routes.py`
- [Candidate Routes](https://github.com/an90ass/vardigo/blob/main/backend/app/routes/candidate_routes.py): `backend/app/routes/candidate_routes.py`
- [Offer Routes](https://github.com/an90ass/vardigo/blob/main/backend/app/routes/offer_routes.py): `backend/app/routes/offer_routes.py`
- [Auth Dependencies](https://github.com/an90ass/vardigo/blob/main/backend/app/dependencies/auth_deps.py): `backend/app/dependencies/auth_deps.py`

### Matching And Offers

- [Auth Service](https://github.com/an90ass/vardigo/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Candidate Service](https://github.com/an90ass/vardigo/blob/main/backend/app/services/candidate_service.py): `backend/app/services/candidate_service.py`
- [Offer Service](https://github.com/an90ass/vardigo/blob/main/backend/app/services/offer_service.py): `backend/app/services/offer_service.py`
- [Seed Service](https://github.com/an90ass/vardigo/blob/main/backend/app/services/seed_service.py): `backend/app/services/seed_service.py`

### Persistence

- [User Repository](https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/user_repository.py): `backend/app/repositories/user_repository.py`
- [Candidate Repository](https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/candidate_repository.py): `backend/app/repositories/candidate_repository.py`
- [Offer Repository](https://github.com/an90ass/vardigo/blob/main/backend/app/repositories/offer_repository.py): `backend/app/repositories/offer_repository.py`
- [SQL Database](https://github.com/an90ass/vardigo/blob/main/backend/app/config/database.py): `backend/app/config/database.py`

### Other components

- **Employer**
- **Worker**

## Connections

- Employer → Auth Feature: signs in
- Worker → Auth Feature: signs in
- Auth Feature → Network Layer: sends login
- Candidate Feature → Network Layer: requests candidates
- Offer Feature → Network Layer: manages offers
- Network Layer → Auth Routes: calls API
- Network Layer → Candidate Routes: calls API
- Network Layer → Offer Routes: calls API
- FastAPI App → Auth Routes: registers
- FastAPI App → Candidate Routes: registers
- FastAPI App → Offer Routes: registers
- FastAPI App → Seed Service: seeds on startup
- Auth Routes → Auth Service: authenticates
- Candidate Routes → Candidate Service: lists candidates
- Offer Routes → Offer Service: manages offers
- Auth Dependencies → Auth Service: verifies tokens
- Auth Service → User Repository: looks up users
- Candidate Service → Candidate Repository: queries candidates
- Offer Service → Offer Repository: reads and writes
- Offer Service → Candidate Repository: checks candidates
- Seed Service → Candidate Repository: seeds candidates
- Seed Service → Offer Repository: seeds offers
- User Repository → SQL Database: queries users
- Candidate Repository → SQL Database: queries candidates
- Offer Repository → SQL Database: queries offers
- FastAPI App → SQL Database: creates tables
