# revathy07/mini_project_team_7 architecture

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

- Interactive diagram: https://gitdiagram.com/revathy07/mini_project_team_7
- Repository: https://github.com/revathy07/mini_project_team_7

## Overview

This is an HR analytics application spanning synthetic-data generation, staging and OLTP/warehouse loading, operational data entry, and warehouse-backed dashboards. The user workflow runs from Streamlit pages through cached data access and managers to MySQL; review and employee changes can trigger incremental warehouse synchronization. The README documents staging, OLTP, OLAP, SCD Type 2 history, and dashboard capabilities. Several ETL and view implementations were not excerpted, so their links are limited to explicit README or indexed references.

Main entry points: [`app/data.py`](https://github.com/revathy07/mini_project_team_7/blob/main/app/data.py) (Cached data access), [`src/database/base_manager.py`](https://github.com/revathy07/mini_project_team_7/blob/main/src/database/base_manager.py) (Manager plumbing), [`src/managers/employee_manager.py`](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/employee_manager.py) (Employee manager), [`src/managers/project_manager.py`](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/project_manager.py) (Project manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["Data generation"]
  node_synth_pipeline["Synthesis pipeline<br/>[pipeline.py]"]
  node_synth_generators["HR generators"]
end

subgraph group_loading["ETL and storage"]
  node_staging_load["Staging loader<br/>[load_staging.py]"]
  node_oltp_load["OLTP loader<br/>[run_oltp_load.py]"]
  node_warehouse_load["Warehouse ETL<br/>[run_dw_etl.py]"]
  node_dim_employee_etl["Employee history ETL"]
  node_staging_db[("Staging database")]
  node_oltp_db[("OLTP database")]
  node_warehouse_db[("OLAP warehouse")]
end

subgraph group_application["Streamlit application"]
  node_streamlit["Streamlit app<br/>[main.py]"]
  node_dashboard_pages["Dashboard pages"]
  node_entry_pages["Data-entry pages"]
  node_ui_data["Cached data access<br/>[data.py]"]
end

subgraph group_data_access["Data access"]
  node_employee_manager["Employee manager"]
  node_project_manager["Project manager<br/>[project_manager.py]"]
  node_review_manager["Review manager<br/>[review_manager.py]"]
  node_analytics_managers["Analytics managers"]
  node_oltp_analytics["OLTP analytics"]
  node_warehouse_sync["Warehouse sync<br/>[warehouse_sync.py]"]
  node_base_manager["Manager plumbing<br/>[base_manager.py]"]
  node_db_connection["Pooled connections<br/>[db_manager.py]"]
  node_employee_entity["Employee model<br/>[employee.py]"]
  node_project_entity["Project model<br/>[project.py]"]
  node_review_entity["Review model<br/>[review.py]"]
  node_validation["Input validation<br/>[validation.py]"]
  node_error_mapping["Database errors<br/>[exceptions.py]"]
end

node_user(("HR user"))

node_user -->|"uses"| node_streamlit
node_streamlit -->|"navigates"| node_dashboard_pages
node_streamlit -->|"navigates"| node_entry_pages
node_dashboard_pages -->|"requests data"| node_ui_data
node_entry_pages -->|"submits forms"| node_ui_data
node_ui_data -->|"queries"| node_analytics_managers
node_ui_data -->|"queries"| node_oltp_analytics
node_ui_data -->|"calls"| node_employee_manager
node_ui_data -->|"calls"| node_project_manager
node_ui_data -->|"calls"| node_review_manager
node_ui_data -->|"requests refresh"| node_warehouse_sync
node_analytics_managers -->|"queries"| node_warehouse_db
node_oltp_analytics -->|"queries"| node_oltp_db
node_employee_manager -->|"reads and writes"| node_oltp_db
node_project_manager -->|"reads and writes"| node_oltp_db
node_review_manager -->|"reads and writes"| node_oltp_db
node_warehouse_sync -->|"refreshes"| node_warehouse_db
node_warehouse_sync -->|"reads"| node_oltp_db
node_employee_manager -->|"inherits"| node_base_manager
node_project_manager -->|"inherits"| node_base_manager
node_review_manager -->|"inherits"| node_base_manager
node_analytics_managers -->|"inherits"| node_base_manager
node_oltp_analytics -->|"inherits"| node_base_manager
node_base_manager -->|"uses"| node_db_connection
node_base_manager -->|"translates errors"| node_error_mapping
node_employee_manager -->|"validates"| node_employee_entity
node_project_manager -->|"validates"| node_project_entity
node_review_manager -->|"validates"| node_review_entity
node_employee_entity -->|"uses"| node_validation
node_project_entity -->|"uses"| node_validation
node_review_entity -->|"uses"| node_validation
node_synth_pipeline -->|"runs generators"| node_synth_generators
node_synth_pipeline -.->|"produces CSVs for"| node_staging_load
node_staging_load -->|"loads CSVs"| node_staging_db
node_oltp_load -->|"reads"| node_staging_db
node_oltp_load -->|"loads"| node_oltp_db
node_warehouse_load -->|"reads"| node_oltp_db
node_warehouse_load -->|"loads"| node_warehouse_db
node_dim_employee_etl -->|"builds history"| node_warehouse_db

click node_synth_pipeline "https://github.com/revathy07/mini_project_team_7/blob/main/src/synthesizer/pipeline.py"
click node_synth_generators "https://github.com/revathy07/mini_project_team_7/tree/main/src/synthesizer"
click node_staging_load "https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/load_staging.py"
click node_oltp_load "https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/run_oltp_load.py"
click node_warehouse_load "https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/run_dw_etl.py"
click node_dim_employee_etl "https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/run_dim_employee.py"
click node_streamlit "https://github.com/revathy07/mini_project_team_7/blob/main/app/main.py"
click node_dashboard_pages "https://github.com/revathy07/mini_project_team_7/tree/main/app/views"
click node_entry_pages "https://github.com/revathy07/mini_project_team_7/tree/main/app/views"
click node_ui_data "https://github.com/revathy07/mini_project_team_7/blob/main/app/data.py"
click node_employee_manager "https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/employee_manager.py"
click node_project_manager "https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/project_manager.py"
click node_review_manager "https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/review_manager.py"
click node_analytics_managers "https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/analytics_manager.py"
click node_oltp_analytics "https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/oltp_analytics_manager.py"
click node_warehouse_sync "https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/warehouse_sync.py"
click node_base_manager "https://github.com/revathy07/mini_project_team_7/blob/main/src/database/base_manager.py"
click node_db_connection "https://github.com/revathy07/mini_project_team_7/blob/main/src/database/db_manager.py"
click node_employee_entity "https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/employee.py"
click node_project_entity "https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/project.py"
click node_review_entity "https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/review.py"
click node_validation "https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/validation.py"
click node_error_mapping "https://github.com/revathy07/mini_project_team_7/blob/main/src/database/exceptions.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_synth_pipeline,node_synth_generators,node_user toneBlue
class node_staging_load,node_oltp_load,node_warehouse_load,node_dim_employee_etl,node_staging_db,node_oltp_db,node_warehouse_db toneAmber
class node_streamlit,node_dashboard_pages,node_entry_pages,node_ui_data toneMint
class node_employee_manager,node_project_manager,node_review_manager,node_analytics_managers,node_oltp_analytics,node_warehouse_sync,node_base_manager,node_db_connection,node_employee_entity,node_project_entity,node_review_entity,node_validation,node_error_mapping toneRose
```

## Components

### Data generation

- [Synthesis pipeline](https://github.com/revathy07/mini_project_team_7/blob/main/src/synthesizer/pipeline.py): `src/synthesizer/pipeline.py`
- [HR generators](https://github.com/revathy07/mini_project_team_7/tree/main/src/synthesizer): `src/synthesizer`

### ETL and storage

- [Staging loader](https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/load_staging.py): `src/etls/load_staging.py`
- [OLTP loader](https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/run_oltp_load.py): `src/etls/run_oltp_load.py`
- [Warehouse ETL](https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/run_dw_etl.py): `src/etls/run_dw_etl.py`
- [Employee history ETL](https://github.com/revathy07/mini_project_team_7/blob/main/src/etls/run_dim_employee.py): `src/etls/run_dim_employee.py`
- **Staging database**
- **OLTP database**
- **OLAP warehouse**

### Streamlit application

- [Streamlit app](https://github.com/revathy07/mini_project_team_7/blob/main/app/main.py): `app/main.py`
- [Dashboard pages](https://github.com/revathy07/mini_project_team_7/tree/main/app/views): `app/views`
- [Data-entry pages](https://github.com/revathy07/mini_project_team_7/tree/main/app/views): `app/views`
- [Cached data access](https://github.com/revathy07/mini_project_team_7/blob/main/app/data.py): `app/data.py`

### Data access

- [Employee manager](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/employee_manager.py): `src/managers/employee_manager.py`
- [Project manager](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/project_manager.py): `src/managers/project_manager.py`
- [Review manager](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/review_manager.py): `src/managers/review_manager.py`
- [Analytics managers](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/analytics_manager.py): `src/managers/analytics_manager.py`
- [OLTP analytics](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/oltp_analytics_manager.py): `src/managers/oltp_analytics_manager.py`
- [Warehouse sync](https://github.com/revathy07/mini_project_team_7/blob/main/src/managers/warehouse_sync.py): `src/managers/warehouse_sync.py`
- [Manager plumbing](https://github.com/revathy07/mini_project_team_7/blob/main/src/database/base_manager.py): `src/database/base_manager.py`
- [Pooled connections](https://github.com/revathy07/mini_project_team_7/blob/main/src/database/db_manager.py): `src/database/db_manager.py`
- [Employee model](https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/employee.py): `src/entities/employee.py`
- [Project model](https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/project.py): `src/entities/project.py`
- [Review model](https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/review.py): `src/entities/review.py`
- [Input validation](https://github.com/revathy07/mini_project_team_7/blob/main/src/entities/validation.py): `src/entities/validation.py`
- [Database errors](https://github.com/revathy07/mini_project_team_7/blob/main/src/database/exceptions.py): `src/database/exceptions.py`

### Other components

- **HR user**

## Connections

- HR user → Streamlit app: uses
- Streamlit app → Dashboard pages: navigates
- Streamlit app → Data-entry pages: navigates
- Dashboard pages → Cached data access: requests data (evidence: `app/views/reviews.py`)
- Data-entry pages → Cached data access: submits forms (evidence: `app/views/reviews.py`)
- Cached data access → Analytics managers: queries (evidence: `app/data.py`)
- Cached data access → OLTP analytics: queries (evidence: `app/data.py`)
- Cached data access → Employee manager: calls (evidence: `app/data.py`)
- Cached data access → Project manager: calls (evidence: `app/data.py`)
- Cached data access → Review manager: calls (evidence: `app/data.py`)
- Cached data access → Warehouse sync: requests refresh (evidence: `app/data.py`)
- Analytics managers → OLAP warehouse: queries
- OLTP analytics → OLTP database: queries
- Employee manager → OLTP database: reads and writes
- Project manager → OLTP database: reads and writes
- Review manager → OLTP database: reads and writes (evidence: `src/managers/review_manager.py`)
- Warehouse sync → OLAP warehouse: refreshes
- Warehouse sync → OLTP database: reads
- Employee manager → Manager plumbing: inherits (evidence: `src/managers/employee_manager.py`)
- Project manager → Manager plumbing: inherits (evidence: `src/managers/project_manager.py`)
- Review manager → Manager plumbing: inherits (evidence: `src/managers/review_manager.py`)
- Analytics managers → Manager plumbing: inherits (evidence: `src/managers/analytics_manager.py`)
- OLTP analytics → Manager plumbing: inherits (evidence: `src/managers/oltp_analytics_manager.py`)
- Manager plumbing → Pooled connections: uses (evidence: `src/database/base_manager.py`)
- Manager plumbing → Database errors: translates errors (evidence: `src/database/base_manager.py`)
- Employee manager → Employee model: validates (evidence: `src/managers/employee_manager.py`)
- Project manager → Project model: validates (evidence: `src/managers/project_manager.py`)
- Review manager → Review model: validates (evidence: `src/managers/review_manager.py`)
- Employee model → Input validation: uses (evidence: `src/entities/employee.py`)
- Project model → Input validation: uses (evidence: `src/entities/project.py`)
- Review model → Input validation: uses (evidence: `src/entities/review.py`)
- Synthesis pipeline → HR generators: runs generators (evidence: `src/synthesizer/pipeline.py`)
- Synthesis pipeline → Staging loader: produces CSVs for
- Staging loader → Staging database: loads CSVs
- OLTP loader → Staging database: reads
- OLTP loader → OLTP database: loads
- Warehouse ETL → OLTP database: reads
- Warehouse ETL → OLAP warehouse: loads
- Employee history ETL → OLAP warehouse: builds history
