# tylerrottmann/fantasyfootballanalyzer architecture

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

- Interactive diagram: https://gitdiagram.com/tylerrottmann/fantasyfootballanalyzer
- Repository: https://github.com/tylerrottmann/fantasyfootballanalyzer

## Overview

This is a Django fantasy-football analysis application. The visible user workflow is a browser request routed to the home or signup view; signup uses a custom form and user model. The repository also contains player, roster, team, and matchup data-loading/feature-building scripts, but the excerpts do not establish their full source-to-database relationships. The leagues app is referenced by project configuration but is absent from the supplied tree, so it is not modeled here.

Main entry points: [`analyzer/views.py`](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/views.py) (Home and signup views), [`FantasyFootballAnalyzer/urls.py`](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/FantasyFootballAnalyzer/urls.py) (Project routes), [`FantasyFootballAnalyzer/settings.py`](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/FantasyFootballAnalyzer/settings.py) (Django settings), [`analyzer/urls.py`](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/urls.py) (Account routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_project_config["Django settings<br/>[settings.py]"]
  node_project_routes["Project routes<br/>[urls.py]"]
  node_analyzer_routes["Account routes<br/>[urls.py]"]
  node_web_views["Home and signup views<br/>[views.py]"]
  node_home_page["Home page<br/>[home.html]"]
  node_signup_page["Signup page<br/>[signup.html]"]
  node_base_template["Base layout<br/>[base.html]"]
end

subgraph group_accounts["User accounts"]
  node_user_form["Custom user forms<br/>[forms.py]"]
  node_user_model["Custom user<br/>[models.py]"]
end

subgraph group_data["Fantasy data processing"]
  node_player_loader["Player data loader"]
  node_stats_loader["Player stats loader"]
  node_ownership_loader["Ownership loader"]
  node_roster_loader["Fantasy roster loader"]
  node_team_loader["Team data loader<br/>[load_team_data.py]"]
  node_advanced_loader["Advanced team loader"]
  node_team_features["Team feature builder"]
  node_matchup_features["Matchup feature builder"]
end

node_visitor(("Browser user"))
node_postgres[("PostgreSQL")]

node_project_config -->|"configures"| node_postgres
node_project_config -->|"selects routes"| node_project_routes
node_project_routes -->|"routes home"| node_web_views
node_project_routes -->|"includes"| node_analyzer_routes
node_analyzer_routes -->|"routes signup"| node_web_views
node_visitor -.-> node_project_routes
node_web_views -->|"renders"| node_home_page
node_web_views -->|"uses form"| node_user_form
node_web_views -->|"selects template"| node_signup_page
node_user_form -->|"defines fields"| node_user_model
node_team_features -->|"reads and writes"| node_postgres

click node_project_config "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/FantasyFootballAnalyzer/settings.py"
click node_project_routes "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/FantasyFootballAnalyzer/urls.py"
click node_analyzer_routes "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/urls.py"
click node_web_views "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/views.py"
click node_home_page "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/templates/home.html"
click node_signup_page "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/templates/registration/signup.html"
click node_base_template "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/templates/base.html"
click node_user_form "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/forms.py"
click node_user_model "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/models.py"
click node_player_loader "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_player_data.py"
click node_stats_loader "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_player_stats.py"
click node_ownership_loader "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_player_ownership_percentage.py"
click node_roster_loader "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_fantasy_rosters.py"
click node_team_loader "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_team_data.py"
click node_advanced_loader "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_advanced_team_data.py"
click node_team_features "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/build_team_features.py"
click node_matchup_features "https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/build_matchup_features.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_project_config,node_project_routes,node_analyzer_routes,node_web_views,node_home_page,node_signup_page,node_base_template,node_visitor toneBlue
class node_user_form,node_user_model,node_postgres toneAmber
class node_player_loader,node_stats_loader,node_ownership_loader,node_roster_loader,node_team_loader,node_advanced_loader,node_team_features,node_matchup_features toneMint
```

## Components

### Web application

- [Django settings](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/FantasyFootballAnalyzer/settings.py): `FantasyFootballAnalyzer/settings.py`
- [Project routes](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/FantasyFootballAnalyzer/urls.py): `FantasyFootballAnalyzer/urls.py`
- [Account routes](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/urls.py): `analyzer/urls.py`
- [Home and signup views](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/views.py): `analyzer/views.py`
- [Home page](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/templates/home.html): `templates/home.html`
- [Signup page](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/templates/registration/signup.html): `templates/registration/signup.html`
- [Base layout](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/templates/base.html): `templates/base.html`

### User accounts

- [Custom user forms](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/forms.py): `analyzer/forms.py`
- [Custom user](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/analyzer/models.py): `analyzer/models.py`

### Fantasy data processing

- [Player data loader](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_player_data.py): `scripts/load_player_data.py`
- [Player stats loader](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_player_stats.py): `scripts/load_player_stats.py`
- [Ownership loader](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_player_ownership_percentage.py): `scripts/load_player_ownership_percentage.py`
- [Fantasy roster loader](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_fantasy_rosters.py): `scripts/load_fantasy_rosters.py`
- [Team data loader](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_team_data.py): `scripts/load_team_data.py`
- [Advanced team loader](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/load_advanced_team_data.py): `scripts/load_advanced_team_data.py`
- [Team feature builder](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/build_team_features.py): `scripts/build_team_features.py`
- [Matchup feature builder](https://github.com/tylerrottmann/fantasyfootballanalyzer/blob/main/scripts/build_matchup_features.py): `scripts/build_matchup_features.py`

### Other components

- **Browser user**
- **PostgreSQL**

## Connections

- Django settings → PostgreSQL: configures (evidence: `FantasyFootballAnalyzer/settings.py`)
- Django settings → Project routes: selects routes (evidence: `FantasyFootballAnalyzer/settings.py`)
- Project routes → Home and signup views: routes home (evidence: `FantasyFootballAnalyzer/urls.py`)
- Project routes → Account routes: includes (evidence: `FantasyFootballAnalyzer/urls.py`)
- Account routes → Home and signup views: routes signup (evidence: `analyzer/urls.py`)
- Browser user → Project routes
- Home and signup views → Home page: renders (evidence: `analyzer/views.py`)
- Home and signup views → Custom user forms: uses form (evidence: `analyzer/views.py`)
- Home and signup views → Signup page: selects template (evidence: `analyzer/views.py`)
- Custom user forms → Custom user: defines fields (evidence: `analyzer/forms.py`)
- Team feature builder → PostgreSQL: reads and writes (evidence: `scripts/build_team_features.py`)
