# jplindsey/ingecal-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/jplindsey/ingecal-dashboard
- Repository: https://github.com/jplindsey/ingecal-dashboard

## Overview

#### Purpose and Entry Point
Ingecal Dashboard is a Streamlit-based analytics application. The primary runtime entry point is `app.py`; Streamlit behavior and presentation are configured in `.streamlit/config.toml`. The app is organized as a multi-page dashboard rather than a separate frontend/backend web service.

#### Application Shell and Access Boundary
`app.py` likely owns Streamlit initialization, navigation, and composition of dashboard pages. Authentication is separated into `auth.py`, forming the access-control boundary before users reach analytics views. Shared language or localization behavior is centralized in `translations.py`.

Key paths:
- `app.py`
- `auth.py`
- `translations.py`

#### Page-Level Analytics Domains
The `app_pages/` package divides the product into distinct user workflows: landing/home, data upload, data quality review, business analytics, academy analytics, and webinar analytics. These pages are the presentation and orchestration layer; they should consume shared data, metrics, filters, and charts rather than duplicating calculation or persistence logic.

Key paths:
- `app_pages/home.py`
- `app_pages/upload_data.py`
- `app_pages/data_quality.py`
- `app_pages/business_analytics.py`
- `app_pages/academy_analytics.py`
- `app_pages/webinar_analytics.py`

#### Data Ingestion, Storage, and Processing
Data movement appears to begin with the upload workflow and pass through loader, pipeline, and database layers. `data_loader.py` is the likely file/input normalization boundary; `pipeline.py` is the transformation or processing stage; `database.py` abstracts persistent storage access. This separation is important: UI pages should not directly encode storage or ingestion mechanics.

Key paths:
- `app_pages/upload_data.py`
- `data_loader.py`
- `pipeline.py`
- `database.py`

#### Shared Dashboard Data and Quality Layer
`dashboard_data.py` provides common data access or dashboard-ready datasets across analytics pages. `app_pages/data_quality.py` is the visible validation/review stage, likely operating on uploaded or processed data before it is relied upon for reporting. The main boundary is between raw/uploaded data and trusted, analytics-ready data.

Key paths:
- `dashboard_data.py`
- `app_pages/data_quality.py`
- `pipeline.py`

#### Metrics, Filtering, and Visualization
Business-facing computations are separated into reusable metric modules: general dashboard metrics in `metrics.py` and webinar-specific calculations in `webinar_metrics.py`. `filters.py` likely owns shared selection/filter state or query constraints, while `charts.py` translates prepared datasets and metrics into visual components. Analytics pages should coordinate these modules, not reimplement them.

Key paths:
- `metrics.py`
- `webinar_metrics.py`
- `filters.py`
- `charts.py`

#### Webinar-Specific Data Path
Webinar reporting has its own data and metric boundary, indicating a specialized domain model alongside the general dashboard flow. `webinar_data.py` likely supplies webinar-oriented datasets to `webinar_metrics.py`, which is then surfaced by the webinar analytics page.

Key paths:
- `webinar_data.py`
- `webinar_metrics.py`
- `app_pages/webinar_analytics.py`

#### Runtime and Infrastructure
The material runtime dependency is Streamlit, indicated by `app.py`, `.streamlit/config.toml`, and the page-oriented layout. Python package dependencies are declared in `requirements.txt`. A persistence integration is implied by `database.py`, but the provided repository metadata does not identify the specific database engine or external service.

Main entry points: [`app.py`](https://github.com/jplindsey/ingecal-dashboard/blob/main/app.py) (Application shell), [`dashboard_data.py`](https://github.com/jplindsey/ingecal-dashboard/blob/main/dashboard_data.py) (Dashboard data), [`charts.py`](https://github.com/jplindsey/ingecal-dashboard/blob/main/charts.py) (Charts), [`filters.py`](https://github.com/jplindsey/ingecal-dashboard/blob/main/filters.py) (Filters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App Shell"]
  node_streamlit{{"Streamlit runtime"}}
  node_app["Application shell<br/>Streamlit entry<br/>[app.py]"]
  node_auth["Authentication<br/>access control<br/>[auth.py]"]
  node_translations["Translations<br/>localization<br/>[translations.py]"]
  node_dependencies["Python dependencies<br/>package manifest<br/>[requirements.txt]"]
end

subgraph group_pages["Dashboard Pages"]
  node_home["Home<br/>dashboard page<br/>[home.py]"]
  node_upload["Data upload<br/>ingestion page<br/>[upload_data.py]"]
  node_quality["Data quality<br/>review page<br/>[data_quality.py]"]
  node_business["Business analytics<br/>analytics page"]
  node_academy["Academy analytics<br/>analytics page"]
  node_webinar["Webinar analytics<br/>analytics page"]
end

subgraph group_data["Data Platform"]
  node_loader["Data loader<br/>input normalization<br/>[data_loader.py]"]
  node_pipeline["Processing pipeline<br/>transformation<br/>[pipeline.py]"]
  node_database[("Database access<br/>persistence adapter<br/>[database.py]")]
  node_dashboard_data["Dashboard data<br/>shared data access<br/>[dashboard_data.py]"]
  node_webinar_data["Webinar data<br/>domain data access<br/>[webinar_data.py]"]
end

subgraph group_analytics["Analytics Components"]
  node_filters["Filters<br/>shared query state<br/>[filters.py]"]
  node_metrics["Dashboard metrics<br/>metric calculations<br/>[metrics.py]"]
  node_webinar_metrics["Webinar metrics<br/>domain metrics<br/>[webinar_metrics.py]"]
  node_charts["Charts<br/>visualization<br/>[charts.py]"]
end

node_dependencies -.->|"declares"| node_streamlit
node_streamlit -->|"runs"| node_app
node_auth -->|"protects"| node_app
node_translations -->|"localizes"| node_app
node_app -->|"navigates to"| node_home
node_app -->|"navigates to"| node_upload
node_app -->|"navigates to"| node_quality
node_app -->|"navigates to"| node_business
node_app -->|"navigates to"| node_academy
node_app -->|"navigates to"| node_webinar
node_upload -->|"submits files"| node_loader
node_loader -->|"normalizes input"| node_pipeline
node_pipeline -->|"persists processed data"| node_database
node_pipeline -->|"prepares datasets"| node_dashboard_data
node_database -->|"reads stored data"| node_dashboard_data
node_quality -->|"reviews"| node_dashboard_data
node_dashboard_data -->|"supplies datasets"| node_metrics
node_filters -->|"constrains queries"| node_dashboard_data
node_business -->|"applies"| node_filters
node_academy -->|"applies"| node_filters
node_metrics -->|"provides metrics"| node_charts
node_business -->|"renders"| node_charts
node_academy -->|"renders"| node_charts
node_database -->|"reads webinar data"| node_webinar_data
node_webinar_data -->|"supplies datasets"| node_webinar_metrics
node_webinar_metrics -->|"provides metrics"| node_charts
node_webinar -->|"applies"| node_filters
node_webinar -->|"renders"| node_charts

click node_app "https://github.com/jplindsey/ingecal-dashboard/blob/main/app.py"
click node_auth "https://github.com/jplindsey/ingecal-dashboard/blob/main/auth.py"
click node_translations "https://github.com/jplindsey/ingecal-dashboard/blob/main/translations.py"
click node_home "https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/home.py"
click node_upload "https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/upload_data.py"
click node_quality "https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/data_quality.py"
click node_business "https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/business_analytics.py"
click node_academy "https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/academy_analytics.py"
click node_webinar "https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/webinar_analytics.py"
click node_loader "https://github.com/jplindsey/ingecal-dashboard/blob/main/data_loader.py"
click node_pipeline "https://github.com/jplindsey/ingecal-dashboard/blob/main/pipeline.py"
click node_database "https://github.com/jplindsey/ingecal-dashboard/blob/main/database.py"
click node_dashboard_data "https://github.com/jplindsey/ingecal-dashboard/blob/main/dashboard_data.py"
click node_webinar_data "https://github.com/jplindsey/ingecal-dashboard/blob/main/webinar_data.py"
click node_filters "https://github.com/jplindsey/ingecal-dashboard/blob/main/filters.py"
click node_metrics "https://github.com/jplindsey/ingecal-dashboard/blob/main/metrics.py"
click node_webinar_metrics "https://github.com/jplindsey/ingecal-dashboard/blob/main/webinar_metrics.py"
click node_charts "https://github.com/jplindsey/ingecal-dashboard/blob/main/charts.py"
click node_dependencies "https://github.com/jplindsey/ingecal-dashboard/blob/main/requirements.txt"

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_streamlit,node_app,node_auth,node_translations,node_dependencies toneBlue
class node_home,node_upload,node_quality,node_business,node_academy,node_webinar toneAmber
class node_loader,node_pipeline,node_database,node_dashboard_data,node_webinar_data toneMint
class node_filters,node_metrics,node_webinar_metrics,node_charts toneRose
```

## Components

### App Shell

- **Streamlit runtime**: runtime · Hosts the multi-page dashboard.
- [Application shell](https://github.com/jplindsey/ingecal-dashboard/blob/main/app.py): Streamlit entry · Initializes navigation and composes pages. · `app.py`
- [Authentication](https://github.com/jplindsey/ingecal-dashboard/blob/main/auth.py): access control · Guards access to analytics views. · `auth.py`
- [Translations](https://github.com/jplindsey/ingecal-dashboard/blob/main/translations.py): localization · `translations.py`
- [Python dependencies](https://github.com/jplindsey/ingecal-dashboard/blob/main/requirements.txt): package manifest · `requirements.txt`

### Dashboard Pages

- [Home](https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/home.py): dashboard page · `app_pages/home.py`
- [Data upload](https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/upload_data.py): ingestion page · Starts the uploaded-data workflow. · `app_pages/upload_data.py`
- [Data quality](https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/data_quality.py): review page · Reviews data before reporting. · `app_pages/data_quality.py`
- [Business analytics](https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/business_analytics.py): analytics page · `app_pages/business_analytics.py`
- [Academy analytics](https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/academy_analytics.py): analytics page · `app_pages/academy_analytics.py`
- [Webinar analytics](https://github.com/jplindsey/ingecal-dashboard/blob/main/app_pages/webinar_analytics.py): analytics page · `app_pages/webinar_analytics.py`

### Data Platform

- [Data loader](https://github.com/jplindsey/ingecal-dashboard/blob/main/data_loader.py): input normalization · Normalizes uploaded inputs. · `data_loader.py`
- [Processing pipeline](https://github.com/jplindsey/ingecal-dashboard/blob/main/pipeline.py): transformation · Transforms ingested data into reporting-ready data. · `pipeline.py`
- [Database access](https://github.com/jplindsey/ingecal-dashboard/blob/main/database.py): persistence adapter · Abstracts persistent storage. · `database.py`
- [Dashboard data](https://github.com/jplindsey/ingecal-dashboard/blob/main/dashboard_data.py): shared data access · Supplies common analytics-ready datasets. · `dashboard_data.py`
- [Webinar data](https://github.com/jplindsey/ingecal-dashboard/blob/main/webinar_data.py): domain data access · Supplies webinar-oriented datasets. · `webinar_data.py`

### Analytics Components

- [Filters](https://github.com/jplindsey/ingecal-dashboard/blob/main/filters.py): shared query state · `filters.py`
- [Dashboard metrics](https://github.com/jplindsey/ingecal-dashboard/blob/main/metrics.py): metric calculations · Computes reusable general metrics. · `metrics.py`
- [Webinar metrics](https://github.com/jplindsey/ingecal-dashboard/blob/main/webinar_metrics.py): domain metrics · Computes webinar-specific metrics. · `webinar_metrics.py`
- [Charts](https://github.com/jplindsey/ingecal-dashboard/blob/main/charts.py): visualization · Renders prepared data and metrics. · `charts.py`

## Connections

- Python dependencies → Streamlit runtime: declares
- Streamlit runtime → Application shell: runs
- Authentication → Application shell: protects
- Translations → Application shell: localizes
- Application shell → Home: navigates to
- Application shell → Data upload: navigates to
- Application shell → Data quality: navigates to
- Application shell → Business analytics: navigates to
- Application shell → Academy analytics: navigates to
- Application shell → Webinar analytics: navigates to
- Data upload → Data loader: submits files
- Data loader → Processing pipeline: normalizes input
- Processing pipeline → Database access: persists processed data
- Processing pipeline → Dashboard data: prepares datasets
- Database access → Dashboard data: reads stored data
- Data quality → Dashboard data: reviews
- Dashboard data → Dashboard metrics: supplies datasets
- Filters → Dashboard data: constrains queries
- Business analytics → Filters: applies
- Academy analytics → Filters: applies
- Dashboard metrics → Charts: provides metrics
- Business analytics → Charts: renders
- Academy analytics → Charts: renders
- Database access → Webinar data: reads webinar data
- Webinar data → Webinar metrics: supplies datasets
- Webinar metrics → Charts: provides metrics
- Webinar analytics → Filters: applies
- Webinar analytics → Charts: renders
