# b-mohid/proboard architecture

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

## Overview

PROBOARD is a Streamlit dashboard for turning student profile links from a sheet or upload into platform statistics, cohort analytics, and intervention views. Its main path runs from dashboard input through cleaning, asynchronous platform fetches, persistent snapshots, and analytics back to the dashboard. A separate notifier uses stored performance data to email at-risk students. The graph follows README-described capabilities and source-index references; some app and notifier internals were only partially excerpted, so unsupported implementation details are omitted.

Main entry points: [`app.py`](https://github.com/b-mohid/proboard/blob/main/app.py) (Streamlit Dashboard), [`config.py`](https://github.com/b-mohid/proboard/blob/main/config.py) (App Configuration), [`database.py`](https://github.com/b-mohid/proboard/blob/main/database.py) (Database Operations), [`notifier.py`](https://github.com/b-mohid/proboard/blob/main/notifier.py) (At-Risk Notifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Input Processing"]
  node_cleaner["Input Cleaner<br/>[cleaner.py]"]
  node_sheets["Google Sheets"]
end

subgraph group_collection["Stats Collection"]
  node_fetcher["Fetch Orchestrator<br/>[fetcher.py]"]
  node_leetcode["LeetCode API"]
  node_hackerrank["HackerRank API"]
end

subgraph group_persistence["Persistence"]
  node_database["Database Operations<br/>[database.py]"]
  node_models["Student and Snapshot Models<br/>[models.py]"]
  node_sqlite[("SQLite Store<br/>[proboard.db]")]
end

subgraph group_insights["Analytics and Dashboard"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_analytics["Cohort Analytics<br/>[analytics.py]"]
end

subgraph group_alerts["Automated Alerts"]
  node_notifier["At-Risk Notifier<br/>[notifier.py]"]
  node_smtp["SMTP Service"]
end

node_professor(("Professor"))
node_config["App Configuration<br/>[config.py]"]

node_professor -->|"provides input"| node_dashboard
node_dashboard -->|"cleans data"| node_cleaner
node_cleaner -->|"downloads sheet"| node_sheets
node_dashboard -->|"requests stats"| node_fetcher
node_fetcher -->|"queries profiles"| node_leetcode
node_fetcher -->|"queries profiles"| node_hackerrank
node_dashboard -->|"stores and reads"| node_database
node_dashboard -->|"builds leaderboard"| node_analytics
node_analytics -->|"queries snapshots"| node_models
node_database -->|"uses ORM models"| node_models
node_database -->|"persists records"| node_sqlite
node_dashboard -->|"uses settings"| node_config
node_cleaner -->|"uses schema settings"| node_config
node_fetcher -->|"uses fetch limits"| node_config
node_database -->|"uses database URL"| node_config
node_analytics -->|"uses scoring settings"| node_config
node_notifier -->|"loads and logs alerts"| node_database
node_notifier -->|"finds at-risk students"| node_analytics
node_notifier -->|"sends email"| node_smtp
node_notifier -->|"uses SMTP settings"| node_config

click node_dashboard "https://github.com/b-mohid/proboard/blob/main/app.py"
click node_cleaner "https://github.com/b-mohid/proboard/blob/main/cleaner.py"
click node_fetcher "https://github.com/b-mohid/proboard/blob/main/fetcher.py"
click node_analytics "https://github.com/b-mohid/proboard/blob/main/analytics.py"
click node_database "https://github.com/b-mohid/proboard/blob/main/database.py"
click node_models "https://github.com/b-mohid/proboard/blob/main/models.py"
click node_sqlite "https://github.com/b-mohid/proboard/blob/main/data/proboard.db"
click node_config "https://github.com/b-mohid/proboard/blob/main/config.py"
click node_notifier "https://github.com/b-mohid/proboard/blob/main/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_cleaner,node_sheets toneBlue
class node_fetcher,node_leetcode,node_hackerrank toneAmber
class node_database,node_models,node_sqlite toneMint
class node_dashboard,node_analytics toneRose
class node_notifier,node_smtp,node_professor toneIndigo
class node_config toneTeal
```

## Components

### Input Processing

- [Input Cleaner](https://github.com/b-mohid/proboard/blob/main/cleaner.py): `cleaner.py`
- **Google Sheets**

### Stats Collection

- [Fetch Orchestrator](https://github.com/b-mohid/proboard/blob/main/fetcher.py): `fetcher.py`
- **LeetCode API**
- **HackerRank API**

### Persistence

- [Database Operations](https://github.com/b-mohid/proboard/blob/main/database.py): `database.py`
- [Student and Snapshot Models](https://github.com/b-mohid/proboard/blob/main/models.py): `models.py`
- [SQLite Store](https://github.com/b-mohid/proboard/blob/main/data/proboard.db): `data/proboard.db`

### Analytics and Dashboard

- [Streamlit Dashboard](https://github.com/b-mohid/proboard/blob/main/app.py): `app.py`
- [Cohort Analytics](https://github.com/b-mohid/proboard/blob/main/analytics.py): `analytics.py`

### Automated Alerts

- [At-Risk Notifier](https://github.com/b-mohid/proboard/blob/main/notifier.py): `notifier.py`
- **SMTP Service**

### Other components

- **Professor**
- [App Configuration](https://github.com/b-mohid/proboard/blob/main/config.py): `config.py`

## Connections

- Professor → Streamlit Dashboard: provides input (evidence: `README.md`)
- Streamlit Dashboard → Input Cleaner: cleans data (evidence: `app.py`)
- Input Cleaner → Google Sheets: downloads sheet (evidence: `cleaner.py`)
- Streamlit Dashboard → Fetch Orchestrator: requests stats (evidence: `app.py`)
- Fetch Orchestrator → LeetCode API: queries profiles (evidence: `fetcher.py`)
- Fetch Orchestrator → HackerRank API: queries profiles (evidence: `fetcher.py`)
- Streamlit Dashboard → Database Operations: stores and reads (evidence: `app.py`)
- Streamlit Dashboard → Cohort Analytics: builds leaderboard (evidence: `app.py`)
- Cohort Analytics → Student and Snapshot Models: queries snapshots (evidence: `analytics.py`)
- Database Operations → Student and Snapshot Models: uses ORM models (evidence: `database.py`)
- Database Operations → SQLite Store: persists records (evidence: `database.py`)
- Streamlit Dashboard → App Configuration: uses settings (evidence: `app.py`)
- Input Cleaner → App Configuration: uses schema settings (evidence: `cleaner.py`)
- Fetch Orchestrator → App Configuration: uses fetch limits (evidence: `fetcher.py`)
- Database Operations → App Configuration: uses database URL (evidence: `database.py`)
- Cohort Analytics → App Configuration: uses scoring settings (evidence: `analytics.py`)
- At-Risk Notifier → Database Operations: loads and logs alerts (evidence: `notifier.py`)
- At-Risk Notifier → Cohort Analytics: finds at-risk students (evidence: `notifier.py`)
- At-Risk Notifier → SMTP Service: sends email (evidence: `notifier.py`)
- At-Risk Notifier → App Configuration: uses SMTP settings (evidence: `notifier.py`)
