# fercaires/liveloscrapper architecture

> Architecture diagram of the GitHub repository fercaires/liveloscrapper, 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/fercaires/liveloscrapper
- Repository: https://github.com/fercaires/liveloscrapper

## Overview

LiveloScrapper fetches Livelo partner data, extracts partner and parity details, then filters results for console ranking and optional Telegram notification while saving complete JSON and CSV snapshots. The entry point runs once or starts the daily scheduler. The README documents Docker and GitHub Actions execution, but these are deployment mechanisms rather than runtime product components; source confirms the workflow and storage behavior shown here.

Main entry points: [`src/scheduler.py`](https://github.com/fercaires/liveloscrapper/blob/main/src/scheduler.py) (Job scheduler), [`src/scraper.py`](https://github.com/fercaires/liveloscrapper/blob/main/src/scraper.py) (Partner scraper), [`main.py`](https://github.com/fercaires/liveloscrapper/blob/main/main.py) (CLI entry), [`src/storage.py`](https://github.com/fercaires/liveloscrapper/blob/main/src/storage.py) (File storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Execution"]
  node_entry["CLI entry<br/>[main.py]"]
  node_scheduler["Job scheduler<br/>[scheduler.py]"]
end

subgraph group_collection["Partner collection"]
  node_scraper["Partner scraper<br/>[scraper.py]"]
  node_partner_model["Partner model<br/>[partner.py]"]
  node_parity_model["Parity model<br/>[parity.py]"]
end

subgraph group_processing["Processing"]
  node_filters["Category filter<br/>[filters.py]"]
end

subgraph group_outputs["Results and notifications"]
  node_storage["File storage<br/>[storage.py]"]
  node_data_files["JSON and CSV"]
  node_notifier["Telegram notifier<br/>[notifier.py]"]
end

node_user(("Operator"))
node_schedule_lib["Schedule library"]
node_livelo["Livelo site"]
node_telegram["Telegram API"]

node_user -->|"runs"| node_entry
node_entry -->|"runs job"| node_scheduler
node_entry -->|"starts schedule"| node_scheduler
node_schedule_lib -->|"dispatches job"| node_scheduler
node_scheduler -->|"scrapes partners"| node_scraper
node_scraper -->|"fetches page"| node_livelo
node_scraper -->|"constructs"| node_partner_model
node_scraper -->|"constructs"| node_parity_model
node_scheduler -->|"saves results"| node_storage
node_storage -->|"serializes data"| node_scraper
node_storage -->|"writes JSON and CSV"| node_data_files
node_scheduler -->|"filters partners"| node_filters
node_scheduler -->|"notifies"| node_notifier
node_notifier -.->|"sends message"| node_telegram

click node_entry "https://github.com/fercaires/liveloscrapper/blob/main/main.py"
click node_scheduler "https://github.com/fercaires/liveloscrapper/blob/main/src/scheduler.py"
click node_scraper "https://github.com/fercaires/liveloscrapper/blob/main/src/scraper.py"
click node_partner_model "https://github.com/fercaires/liveloscrapper/blob/main/src/models/partner.py"
click node_parity_model "https://github.com/fercaires/liveloscrapper/blob/main/src/models/parity.py"
click node_filters "https://github.com/fercaires/liveloscrapper/blob/main/src/filters.py"
click node_storage "https://github.com/fercaires/liveloscrapper/blob/main/src/storage.py"
click node_data_files "https://github.com/fercaires/liveloscrapper/tree/main/data"
click node_notifier "https://github.com/fercaires/liveloscrapper/blob/main/src/notifier.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_entry,node_scheduler toneBlue
class node_scraper,node_partner_model,node_parity_model toneAmber
class node_filters,node_telegram toneMint
class node_storage,node_data_files,node_notifier toneRose
class node_user,node_schedule_lib,node_livelo toneIndigo
```

## Components

### Execution

- [CLI entry](https://github.com/fercaires/liveloscrapper/blob/main/main.py): `main.py`
- [Job scheduler](https://github.com/fercaires/liveloscrapper/blob/main/src/scheduler.py): `src/scheduler.py`

### Partner collection

- [Partner scraper](https://github.com/fercaires/liveloscrapper/blob/main/src/scraper.py): `src/scraper.py`
- [Partner model](https://github.com/fercaires/liveloscrapper/blob/main/src/models/partner.py): `src/models/partner.py`
- [Parity model](https://github.com/fercaires/liveloscrapper/blob/main/src/models/parity.py): `src/models/parity.py`

### Processing

- [Category filter](https://github.com/fercaires/liveloscrapper/blob/main/src/filters.py): `src/filters.py`

### Results and notifications

- [File storage](https://github.com/fercaires/liveloscrapper/blob/main/src/storage.py): `src/storage.py`
- [JSON and CSV](https://github.com/fercaires/liveloscrapper/tree/main/data): `data`
- [Telegram notifier](https://github.com/fercaires/liveloscrapper/blob/main/src/notifier.py): `src/notifier.py`

### Other components

- **Operator**
- **Schedule library**
- **Livelo site**
- **Telegram API**

## Connections

- Operator → CLI entry: runs
- CLI entry → Job scheduler: runs job
- CLI entry → Job scheduler: starts schedule
- Schedule library → Job scheduler: dispatches job
- Job scheduler → Partner scraper: scrapes partners
- Partner scraper → Livelo site: fetches page
- Partner scraper → Partner model: constructs
- Partner scraper → Parity model: constructs
- Job scheduler → File storage: saves results
- File storage → Partner scraper: serializes data
- File storage → JSON and CSV: writes JSON and CSV
- Job scheduler → Category filter: filters partners
- Job scheduler → Telegram notifier: notifies
- Telegram notifier → Telegram API: sends message
