# bangaru2021wa86916/employee-productivity-report architecture

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

- Interactive diagram: https://gitdiagram.com/bangaru2021wa86916/employee-productivity-report
- Repository: https://github.com/bangaru2021wa86916/employee-productivity-report

## Overview

This is an employee productivity management web application. An administrator signs in, then views and manages employee productivity records, edits feedback, and downloads CSV or PDF reports. The browser stores a JWT and sends it with protected API requests; the Flask service handles authentication, record operations, and report generation using MySQL. The excerpts show the browser/API calls and database access, but the README is empty and the schema and visual frontend files were not sampled.

Main entry points: [`frontend/script.js`](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js) (Employee dashboard), [`backend/app.py`](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py) (Employee routes), [`database/init.sql`](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/database/init.sql) (Employee database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser application"]
  node_browser["Employee dashboard<br/>[script.js]"]
  node_auth_ui["Sign-in and session<br/>[script.js]"]
  node_roster_ui["Employee roster<br/>[script.js]"]
  node_feedback_ui["Feedback editor<br/>[script.js]"]
  node_export_ui["Report downloads<br/>[script.js]"]
end

subgraph group_backend["Flask API"]
  node_auth_api["Authentication routes<br/>[app.py]"]
  node_employee_api["Employee routes<br/>[app.py]"]
  node_export_api["Report generation<br/>[app.py]"]
  node_db_access["Connection pool<br/>[app.py]"]
end

subgraph group_persistence["Persistence"]
  node_mysql[("Employee database<br/>[init.sql]")]
end

node_admin(("Administrator"))

node_admin -->|"uses"| node_browser
node_browser -->|"signs in"| node_auth_ui
node_browser -->|"manages records"| node_roster_ui
node_browser -->|"opens editor"| node_feedback_ui
node_browser -->|"downloads reports"| node_export_ui
node_auth_ui -->|"requests login"| node_auth_api
node_browser -->|"requests logout"| node_auth_api
node_roster_ui -->|"loads records"| node_employee_api
node_roster_ui -->|"adds records"| node_employee_api
node_roster_ui -->|"updates records"| node_employee_api
node_roster_ui -->|"deletes records"| node_employee_api
node_feedback_ui -->|"saves feedback"| node_employee_api
node_export_ui -->|"requests exports"| node_export_api
node_auth_api -->|"queries admins"| node_db_access
node_employee_api -->|"reads and writes"| node_db_access
node_export_api -->|"reads records"| node_db_access
node_db_access -->|"opens pooled connections"| node_mysql

click node_browser "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js"
click node_auth_ui "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js"
click node_roster_ui "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js"
click node_feedback_ui "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js"
click node_export_ui "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js"
click node_auth_api "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py"
click node_employee_api "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py"
click node_export_api "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py"
click node_db_access "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py"
click node_mysql "https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/database/init.sql"

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_browser,node_auth_ui,node_roster_ui,node_feedback_ui,node_export_ui toneBlue
class node_auth_api,node_employee_api,node_export_api,node_db_access toneAmber
class node_mysql toneMint
class node_admin toneIndigo
```

## Components

### Browser application

- [Employee dashboard](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js): `frontend/script.js`
- [Sign-in and session](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js): `frontend/script.js`
- [Employee roster](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js): `frontend/script.js`
- [Feedback editor](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js): `frontend/script.js`
- [Report downloads](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/frontend/script.js): `frontend/script.js`

### Flask API

- [Authentication routes](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py): `backend/app.py`
- [Employee routes](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py): `backend/app.py`
- [Report generation](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py): `backend/app.py`
- [Connection pool](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/backend/app.py): `backend/app.py`

### Persistence

- [Employee database](https://github.com/bangaru2021wa86916/employee-productivity-report/blob/main/database/init.sql): `database/init.sql`

### Other components

- **Administrator**

## Connections

- Administrator → Employee dashboard: uses
- Employee dashboard → Sign-in and session: signs in (evidence: `frontend/script.js`)
- Employee dashboard → Employee roster: manages records (evidence: `frontend/script.js`)
- Employee dashboard → Feedback editor: opens editor (evidence: `frontend/script.js`)
- Employee dashboard → Report downloads: downloads reports (evidence: `frontend/script.js`)
- Sign-in and session → Authentication routes: requests login (evidence: `frontend/script.js`)
- Employee dashboard → Authentication routes: requests logout (evidence: `frontend/script.js`)
- Employee roster → Employee routes: loads records (evidence: `frontend/script.js`)
- Employee roster → Employee routes: adds records (evidence: `frontend/script.js`)
- Employee roster → Employee routes: updates records (evidence: `frontend/script.js`)
- Employee roster → Employee routes: deletes records (evidence: `frontend/script.js`)
- Feedback editor → Employee routes: saves feedback (evidence: `frontend/script.js`)
- Report downloads → Report generation: requests exports (evidence: `frontend/script.js`)
- Authentication routes → Connection pool: queries admins (evidence: `backend/app.py`)
- Employee routes → Connection pool: reads and writes (evidence: `backend/app.py`)
- Report generation → Connection pool: reads records (evidence: `backend/app.py`)
- Connection pool → Employee database: opens pooled connections (evidence: `backend/app.py`)
