# josediaz99/powerliftingcomphandler architecture

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

- Interactive diagram: https://gitdiagram.com/josediaz99/powerliftingcomphandler
- Repository: https://github.com/josediaz99/powerliftingcomphandler

## Overview

This Django application collects upcoming LiftingCast competitions and their athlete rosters, stores them, and provides competition browsing and filtered athlete selection. Its main synchronization entry point coordinates competition discovery, database updates, and athlete scraping; a management command or daily scheduler can invoke it. The README describes attempt-decision support as the goal, but the shown models and views do not implement attempt recommendations or a live dashboard. The graph reflects sampled code and documented behavior; it does not assume those unfinished capabilities exist.

Main entry points: [`powerliftingcomphandler/ironCrawler/scrape_athlete_data.py`](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scrape_athlete_data.py) (Athlete export and ingest), [`powerliftingcomphandler/ironCrawler/views.py`](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/views.py) (Competition and athlete views), [`powerliftingcomphandler/ironCrawler/scraper.py`](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scraper.py) (Scrape and load), [`powerliftingcomphandler/ironCrawler/scrape_competition_data.py`](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scrape_competition_data.py) (Competition discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_comp_scrape["Competition discovery"]
  node_driver["Browser setup"]
  node_athlete_scrape["Athlete export and ingest"]
end

subgraph group_sync["Sync orchestration"]
  node_commands["Scrape commands"]
  node_scheduler["Daily scheduler<br/>[run_scheduler.py]"]
  node_sync_entry["Scrape and load<br/>[scraper.py]"]
end

subgraph group_storage["Competition data"]
  node_competition[("Competition records<br/>[models.py]")]
  node_athlete[("Athlete records<br/>[models.py]")]
end

subgraph group_web["Web experience"]
  node_routes["Web routes<br/>[urls.py]"]
  node_views["Competition and athlete views<br/>[views.py]"]
  node_competition_page["Competition list<br/>[index.html]"]
  node_athlete_page["Filtered athlete selection"]
end

node_handler(("Coach or handler"))
node_liftingcast["LiftingCast"]

node_handler -.->|"runs sync"| node_commands
node_scheduler -->|"schedules"| node_sync_entry
node_commands -->|"invokes"| node_sync_entry
node_sync_entry -->|"fetches meets"| node_comp_scrape
node_sync_entry -->|"scrapes rosters"| node_athlete_scrape
node_sync_entry -->|"creates and deletes"| node_competition
node_comp_scrape -->|"creates browser"| node_driver
node_comp_scrape -->|"reads meet listings"| node_liftingcast
node_athlete_scrape -->|"creates browser"| node_driver
node_athlete_scrape -->|"exports roster CSV"| node_liftingcast
node_athlete_scrape -->|"creates records"| node_athlete
node_athlete_scrape -->|"links roster"| node_competition
node_handler -.->|"opens pages"| node_routes
node_routes -->|"routes requests"| node_views
node_views -->|"queries meets"| node_competition
node_views -->|"filters athletes"| node_athlete
node_views -->|"renders list"| node_competition_page
node_views -->|"renders selection"| node_athlete_page

click node_commands "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/management/commands/scrape_competitions.py"
click node_scheduler "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/management/commands/run_scheduler.py"
click node_sync_entry "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scraper.py"
click node_comp_scrape "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scrape_competition_data.py"
click node_driver "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/create_selenium_driver.py"
click node_athlete_scrape "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scrape_athlete_data.py"
click node_competition "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/models.py"
click node_athlete "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/models.py"
click node_routes "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/urls.py"
click node_views "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/views.py"
click node_competition_page "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/templates/ironCrawler/index.html"
click node_athlete_page "https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/templates/ironCrawler/athlete_select.html"

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_comp_scrape,node_driver,node_athlete_scrape toneBlue
class node_commands,node_scheduler,node_sync_entry toneAmber
class node_competition,node_athlete,node_handler toneMint
class node_routes,node_views,node_competition_page,node_athlete_page toneRose
class node_liftingcast toneIndigo
```

## Components

### Data collection

- [Competition discovery](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scrape_competition_data.py): `powerliftingcomphandler/ironCrawler/scrape_competition_data.py`
- [Browser setup](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/create_selenium_driver.py): `powerliftingcomphandler/ironCrawler/create_selenium_driver.py`
- [Athlete export and ingest](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scrape_athlete_data.py): `powerliftingcomphandler/ironCrawler/scrape_athlete_data.py`

### Sync orchestration

- [Scrape commands](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/management/commands/scrape_competitions.py): `powerliftingcomphandler/ironCrawler/management/commands/scrape_competitions.py`
- [Daily scheduler](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/management/commands/run_scheduler.py): `powerliftingcomphandler/ironCrawler/management/commands/run_scheduler.py`
- [Scrape and load](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/scraper.py): `powerliftingcomphandler/ironCrawler/scraper.py`

### Competition data

- [Competition records](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/models.py): `powerliftingcomphandler/ironCrawler/models.py`
- [Athlete records](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/models.py): `powerliftingcomphandler/ironCrawler/models.py`

### Web experience

- [Web routes](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/urls.py): `powerliftingcomphandler/ironCrawler/urls.py`
- [Competition and athlete views](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/views.py): `powerliftingcomphandler/ironCrawler/views.py`
- [Competition list](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/templates/ironCrawler/index.html): `powerliftingcomphandler/ironCrawler/templates/ironCrawler/index.html`
- [Filtered athlete selection](https://github.com/josediaz99/powerliftingcomphandler/blob/main/powerliftingcomphandler/ironCrawler/templates/ironCrawler/athlete_select.html): `powerliftingcomphandler/ironCrawler/templates/ironCrawler/athlete_select.html`

### Other components

- **Coach or handler**
- **LiftingCast**

## Connections

- Coach or handler → Scrape commands: runs sync
- Daily scheduler → Scrape and load: schedules (evidence: `powerliftingcomphandler/ironCrawler/management/commands/run_scheduler.py`)
- Scrape commands → Scrape and load: invokes (evidence: `powerliftingcomphandler/ironCrawler/management/commands/scrape_competitions.py`)
- Scrape and load → Competition discovery: fetches meets (evidence: `powerliftingcomphandler/ironCrawler/scraper.py`)
- Scrape and load → Athlete export and ingest: scrapes rosters (evidence: `powerliftingcomphandler/ironCrawler/scraper.py`)
- Scrape and load → Competition records: creates and deletes (evidence: `powerliftingcomphandler/ironCrawler/scraper.py`)
- Competition discovery → Browser setup: creates browser (evidence: `powerliftingcomphandler/ironCrawler/scrape_competition_data.py`)
- Competition discovery → LiftingCast: reads meet listings (evidence: `powerliftingcomphandler/ironCrawler/scrape_competition_data.py`)
- Athlete export and ingest → Browser setup: creates browser (evidence: `powerliftingcomphandler/ironCrawler/scrape_athlete_data.py`)
- Athlete export and ingest → LiftingCast: exports roster CSV (evidence: `powerliftingcomphandler/ironCrawler/scrape_athlete_data.py`)
- Athlete export and ingest → Athlete records: creates records (evidence: `powerliftingcomphandler/ironCrawler/scrape_athlete_data.py`)
- Athlete export and ingest → Competition records: links roster (evidence: `powerliftingcomphandler/ironCrawler/scrape_athlete_data.py`)
- Coach or handler → Web routes: opens pages
- Web routes → Competition and athlete views: routes requests (evidence: `powerliftingcomphandler/ironCrawler/urls.py`)
- Competition and athlete views → Competition records: queries meets (evidence: `powerliftingcomphandler/ironCrawler/views.py`)
- Competition and athlete views → Athlete records: filters athletes (evidence: `powerliftingcomphandler/ironCrawler/views.py`)
- Competition and athlete views → Competition list: renders list (evidence: `powerliftingcomphandler/ironCrawler/views.py`)
- Competition and athlete views → Filtered athlete selection: renders selection (evidence: `powerliftingcomphandler/ironCrawler/views.py`)
