# paulo-victor-silva-santos/vaga-radar architecture

> Architecture diagram of the GitHub repository paulo-victor-silva-santos/vaga-radar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/paulo-victor-silva-santos/vaga-radar
- Repository: https://github.com/paulo-victor-silva-santos/vaga-radar

## Overview

Vaga Radar is a job-feed monitor that normalizes public listings, checks freshness and prior notifications, applies keyword and optional semantic filters, then sends suitable jobs to Telegram. The main module coordinates those stages and records execution health. Additional sources include email alerts and the Programathor listing; the README documents email as an extra source, while the excerpts do not establish how Programathor is wired into the main fetcher. Edges reflect the main excerpt, SOURCE INDEX references, or README statements; unsampled wiring is omitted.

Main entry points: [`src/main.py`](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/main.py) (Run coordinator), [`src/config.py`](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/config.py) (Profile and settings), [`src/fontes.py`](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes.py) (Feed normalization), [`src/filtro_ia.py`](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_ia.py) (Semantic filter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Run coordination"]
  node_main["Run coordinator<br/>[main.py]"]
  node_config["Profile and settings<br/>[config.py]"]
end

subgraph group_sources["Job sources"]
  node_feeds["Feed normalization<br/>[fontes.py]"]
  node_github_source["GitHub listings<br/>[fontes_github.py]"]
  node_email_source["Email alerts<br/>[fontes_email.py]"]
  node_programathor["Programathor listings"]
end

subgraph group_filtering["Filtering"]
  node_freshness["Freshness filter<br/>[filtro_data.py]"]
  node_history["Seen-job filter<br/>[historico.py]"]
  node_keywords["Keyword filter<br/>[filtro_keyword.py]"]
  node_semantic["Semantic filter<br/>[filtro_ia.py]"]
end

subgraph group_delivery_state["Delivery and state"]
  node_telegram_sender["Telegram delivery<br/>[telegram.py]"]
  node_seen_store[("Seen jobs JSON<br/>[vagas_vistas.json]")]
  node_audit["Health and audit<br/>[auditoria.py]"]
  node_audit_store[("Audit log JSON<br/>[log_auditoria.json]")]
end

node_scheduler(("Scheduled run"))
node_gemini{{"Gemini API"}}
node_telegram_service{{"Telegram Bot API"}}
node_imap{{"Gmail IMAP"}}
node_public_sites{{"Programathor site"}}

node_scheduler -.->|"starts"| node_main
node_main -->|"fetches listings"| node_feeds
node_feeds -->|"fetches listings"| node_github_source
node_feeds -->|"fetches alerts"| node_email_source
node_email_source -->|"reads alerts"| node_imap
node_programathor -->|"requests listings"| node_public_sites
node_main -->|"filters by date"| node_freshness
node_main -->|"removes seen jobs"| node_history
node_history -.->|"reads and writes"| node_seen_store
node_main -->|"filters keywords"| node_keywords
node_main -->|"filters semantically"| node_semantic
node_semantic -->|"classifies jobs"| node_gemini
node_main -->|"sends approved jobs"| node_telegram_sender
node_telegram_sender -->|"posts messages"| node_telegram_service
node_main -->|"checks system health"| node_audit
node_audit -->|"persists execution log"| node_audit_store
node_main -->|"uses settings"| node_config
node_feeds -->|"uses settings"| node_config
node_freshness -->|"uses date limit"| node_config
node_keywords -->|"uses filter rules"| node_config
node_semantic -->|"uses profile and key"| node_config
node_telegram_sender -->|"uses bot settings"| node_config
node_audit -->|"uses health limits"| node_config

click node_main "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/main.py"
click node_config "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/config.py"
click node_feeds "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes.py"
click node_github_source "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes_github.py"
click node_email_source "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes_email.py"
click node_programathor "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes_programathor.py"
click node_freshness "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_data.py"
click node_history "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/historico.py"
click node_keywords "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_keyword.py"
click node_semantic "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_ia.py"
click node_telegram_sender "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/telegram.py"
click node_seen_store "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/vagas_vistas.json"
click node_audit "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/auditoria.py"
click node_audit_store "https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/log_auditoria.json"

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_main,node_config toneBlue
class node_feeds,node_github_source,node_email_source,node_programathor toneAmber
class node_freshness,node_history,node_keywords,node_semantic,node_gemini,node_telegram_service toneMint
class node_telegram_sender,node_seen_store,node_audit,node_audit_store toneRose
class node_scheduler,node_imap,node_public_sites toneIndigo
```

## Components

### Run coordination

- [Run coordinator](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/main.py): `src/main.py`
- [Profile and settings](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/config.py): `src/config.py`

### Job sources

- [Feed normalization](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes.py): `src/fontes.py`
- [GitHub listings](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes_github.py): `src/fontes_github.py`
- [Email alerts](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes_email.py): `src/fontes_email.py`
- [Programathor listings](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/fontes_programathor.py): `src/fontes_programathor.py`

### Filtering

- [Freshness filter](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_data.py): `src/filtro_data.py`
- [Seen-job filter](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/historico.py): `src/historico.py`
- [Keyword filter](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_keyword.py): `src/filtro_keyword.py`
- [Semantic filter](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/filtro_ia.py): `src/filtro_ia.py`

### Delivery and state

- [Telegram delivery](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/telegram.py): `src/telegram.py`
- [Seen jobs JSON](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/vagas_vistas.json): `vagas_vistas.json`
- [Health and audit](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/src/auditoria.py): `src/auditoria.py`
- [Audit log JSON](https://github.com/paulo-victor-silva-santos/vaga-radar/blob/main/log_auditoria.json): `log_auditoria.json`

### Other components

- **Scheduled run**
- **Gemini API**
- **Telegram Bot API**
- **Gmail IMAP**
- **Programathor site**

## Connections

- Scheduled run → Run coordinator: starts (evidence: `README.md`)
- Run coordinator → Feed normalization: fetches listings (evidence: `src/main.py`)
- Feed normalization → GitHub listings: fetches listings (evidence: `src/fontes.py`)
- Feed normalization → Email alerts: fetches alerts (evidence: `src/fontes.py`)
- Email alerts → Gmail IMAP: reads alerts (evidence: `README.md`)
- Programathor listings → Programathor site: requests listings (evidence: `src/fontes_programathor.py`)
- Run coordinator → Freshness filter: filters by date (evidence: `src/main.py`)
- Run coordinator → Seen-job filter: removes seen jobs (evidence: `src/main.py`)
- Seen-job filter → Seen jobs JSON: reads and writes (evidence: `README.md`)
- Run coordinator → Keyword filter: filters keywords (evidence: `README.md`)
- Run coordinator → Semantic filter: filters semantically (evidence: `src/main.py`)
- Semantic filter → Gemini API: classifies jobs (evidence: `src/filtro_ia.py`)
- Run coordinator → Telegram delivery: sends approved jobs (evidence: `src/main.py`)
- Telegram delivery → Telegram Bot API: posts messages (evidence: `src/telegram.py`)
- Run coordinator → Health and audit: checks system health (evidence: `src/main.py`)
- Health and audit → Audit log JSON: persists execution log (evidence: `src/auditoria.py`)
- Run coordinator → Profile and settings: uses settings (evidence: `src/main.py`)
- Feed normalization → Profile and settings: uses settings (evidence: `src/fontes.py`)
- Freshness filter → Profile and settings: uses date limit (evidence: `src/filtro_data.py`)
- Keyword filter → Profile and settings: uses filter rules (evidence: `src/filtro_keyword.py`)
- Semantic filter → Profile and settings: uses profile and key (evidence: `src/filtro_ia.py`)
- Telegram delivery → Profile and settings: uses bot settings (evidence: `src/telegram.py`)
- Health and audit → Profile and settings: uses health limits (evidence: `src/auditoria.py`)
