# dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system architecture

> Architecture diagram of the GitHub repository dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system
- Repository: https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system

## Overview

WorkVision is a role-separated employee productivity platform. Employees authenticate, log work and tasks, then review scores, history, and feedback; managers assign/review tasks and compare team performance; administrators oversee organization-wide settings and reporting. Backend routes coordinate domain models, MongoDB, scoring, and PDF generation. The README documents predictive scoring, email verification, and branded reports, but sampled code does not expose every integration or frontend API mapping, so those links are omitted or marked unverified.

Main entry points: [`backend/routes/employee_routes.py`](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/employee_routes.py) (Employee API), [`backend/models.py`](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/models.py) (Domain models), [`backend/db.py`](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/db.py) (MongoDB), [`backend/app.py`](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/app.py) (Flask application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_employee["Employee workflows"]
  node_manager["Manager workflows"]
  node_admin["Administrator workflows<br/>[AdminDashboard.tsx]"]
  node_app["Role-based routing<br/>[App.tsx]"]
end

subgraph group_identity["Identity and access"]
  node_authui["Session context<br/>[AuthContext.tsx]"]
  node_auth["Authentication API<br/>[auth.py]"]
end

subgraph group_operations["Work and performance"]
  node_employee_routes["Employee API<br/>[employee_routes.py]"]
  node_manager_routes["Manager API<br/>[manager_routes.py]"]
  node_task_routes["Task API<br/>[task_routes.py]"]
  node_admin_routes["Admin API<br/>[admin_routes.py]"]
  node_pdf["PDF reports<br/>[pdf_generator.py]"]
  node_server["Flask application<br/>[app.py]"]
end

subgraph group_persistence["Backend and data"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("MongoDB<br/>[db.py]")]
end

node_employee_actor(("Employee"))
node_manager_actor(("Manager"))
node_admin_actor(("Administrator"))
node_mongo_service[("MongoDB service")]

node_app -->|"provides session"| node_authui
node_app -->|"routes to"| node_employee
node_app -->|"routes to"| node_manager
node_app -->|"routes to"| node_admin
node_employee_actor -.->|"uses"| node_employee
node_manager_actor -.->|"uses"| node_manager
node_admin_actor -.->|"uses"| node_admin
node_server -->|"registers"| node_auth
node_server -->|"registers"| node_employee_routes
node_server -->|"registers"| node_manager_routes
node_server -->|"registers"| node_admin_routes
node_server -->|"registers"| node_task_routes
node_auth -->|"uses"| node_models
node_auth -->|"uses"| node_database
node_employee_routes -->|"uses"| node_models
node_employee_routes -->|"queries"| node_database
node_employee_routes -->|"generates report"| node_pdf
node_manager_routes -->|"uses"| node_models
node_manager_routes -->|"queries"| node_database
node_manager_routes -->|"calls scoring"| node_employee_routes
node_admin_routes -->|"uses"| node_models
node_admin_routes -->|"queries"| node_database
node_admin_routes -->|"uses"| node_pdf
node_task_routes -->|"uses"| node_models
node_models -->|"uses"| node_database
node_database -->|"connects"| node_mongo_service
node_employee -.->|"requests API"| node_employee_routes
node_manager -.->|"requests API"| node_manager_routes
node_manager -.->|"requests API"| node_task_routes
node_admin -.->|"requests API"| node_admin_routes

click node_employee "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/tree/main/src/pages/employee"
click node_manager "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/tree/main/src/pages/manager"
click node_admin "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/src/pages/AdminDashboard.tsx"
click node_app "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/src/App.tsx"
click node_authui "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/src/contexts/AuthContext.tsx"
click node_employee_routes "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/employee_routes.py"
click node_manager_routes "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/manager_routes.py"
click node_task_routes "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/task_routes.py"
click node_admin_routes "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/admin_routes.py"
click node_auth "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/auth.py"
click node_models "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/models.py"
click node_database "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/db.py"
click node_pdf "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/pdf_generator.py"
click node_server "https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/app.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_employee,node_manager,node_admin,node_app toneBlue
class node_authui,node_auth,node_mongo_service toneAmber
class node_employee_routes,node_manager_routes,node_task_routes,node_admin_routes,node_pdf,node_server toneMint
class node_models,node_database toneRose
class node_employee_actor,node_manager_actor,node_admin_actor toneIndigo
```

## Components

### Web application

- [Employee workflows](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/tree/main/src/pages/employee): `src/pages/employee`
- [Manager workflows](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/tree/main/src/pages/manager): `src/pages/manager`
- [Administrator workflows](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/src/pages/AdminDashboard.tsx): `src/pages/AdminDashboard.tsx`
- [Role-based routing](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/src/App.tsx): `src/App.tsx`

### Identity and access

- [Session context](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Authentication API](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/auth.py): `backend/auth.py`

### Work and performance

- [Employee API](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/employee_routes.py): `backend/routes/employee_routes.py`
- [Manager API](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/manager_routes.py): `backend/routes/manager_routes.py`
- [Task API](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/task_routes.py): `backend/routes/task_routes.py`
- [Admin API](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/routes/admin_routes.py): `backend/routes/admin_routes.py`
- [PDF reports](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/pdf_generator.py): `backend/pdf_generator.py`
- [Flask application](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/app.py): `backend/app.py`

### Backend and data

- [Domain models](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/models.py): `backend/models.py`
- [MongoDB](https://github.com/dhruvil-10/workvision-ai-based-employee-performance-productivity-analysis-system/blob/main/backend/db.py): `backend/db.py`

### Other components

- **Employee**
- **Manager**
- **Administrator**
- **MongoDB service**

## Connections

- Role-based routing → Session context: provides session (evidence: `src/App.tsx`)
- Role-based routing → Employee workflows: routes to (evidence: `src/App.tsx`)
- Role-based routing → Manager workflows: routes to (evidence: `src/App.tsx`)
- Role-based routing → Administrator workflows: routes to (evidence: `src/App.tsx`)
- Employee → Employee workflows: uses
- Manager → Manager workflows: uses
- Administrator → Administrator workflows: uses
- Flask application → Authentication API: registers (evidence: `backend/app.py`)
- Flask application → Employee API: registers (evidence: `backend/app.py`)
- Flask application → Manager API: registers (evidence: `backend/app.py`)
- Flask application → Admin API: registers (evidence: `backend/app.py`)
- Flask application → Task API: registers (evidence: `backend/app.py`)
- Authentication API → Domain models: uses (evidence: `backend/auth.py`)
- Authentication API → MongoDB: uses (evidence: `backend/auth.py`)
- Employee API → Domain models: uses (evidence: `backend/routes/employee_routes.py`)
- Employee API → MongoDB: queries (evidence: `backend/routes/employee_routes.py`)
- Employee API → PDF reports: generates report (evidence: `backend/routes/employee_routes.py`)
- Manager API → Domain models: uses (evidence: `backend/routes/manager_routes.py`)
- Manager API → MongoDB: queries (evidence: `backend/routes/manager_routes.py`)
- Manager API → Employee API: calls scoring (evidence: `backend/routes/manager_routes.py`)
- Admin API → Domain models: uses (evidence: `backend/routes/admin_routes.py`)
- Admin API → MongoDB: queries (evidence: `backend/routes/admin_routes.py`)
- Admin API → PDF reports: uses (evidence: `backend/routes/admin_routes.py`)
- Task API → Domain models: uses (evidence: `backend/routes/task_routes.py`)
- Domain models → MongoDB: uses (evidence: `backend/models.py`)
- MongoDB → MongoDB service: connects (evidence: `backend/db.py`)
- Employee workflows → Employee API: requests API
- Manager workflows → Manager API: requests API
- Manager workflows → Task API: requests API
- Administrator workflows → Admin API: requests API
