# sivabalan0074/hrmsite_miim architecture

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

- Interactive diagram: https://gitdiagram.com/sivabalan0074/hrmsite_miim
- Repository: https://github.com/sivabalan0074/hrmsite_miim

## Overview

MIIM HRM is a Flask-based human-resources application. Employees and HR staff use its web interface and API for authentication and HR workflows; the backend returns records, reports, and status updates. The sampled routes show attendance, holiday requests, leave approvals, and expenses, while the repository’s templates also indicate salary, performance, project-tracking, and HR-dashboard surfaces. The app is largely a monolith, backed by a dual SQLite/MySQL connection layer and a security module. Several product areas are visible only by name; their internal behavior is not inferred here.

Main entry points: [`app.py`](https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py) (HR API and routes), [`db_layer.py`](https://github.com/sivabalan0074/hrmsite_miim/blob/main/db_layer.py) (Database adapter), [`template`](https://github.com/sivabalan0074/hrmsite_miim/tree/main/template) (HR screens), [`security.py`](https://github.com/sivabalan0074/hrmsite_miim/blob/main/security.py) (Authentication and security)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["HR interface"]
  node_web_surfaces["HR screens"]
end

subgraph group_application["HR application"]
  node_hr_backend["HR API and routes<br/>[app.py]"]
  node_attendance["Attendance<br/>[app.py]"]
  node_leave_holidays["Leave and holidays<br/>[app.py]"]
  node_expenses["Expenses<br/>[app.py]"]
  node_salary["Salary and payroll<br/>[app.py]"]
  node_performance_projects["Performance and projects"]
end

subgraph group_security["Security"]
  node_auth_security["Authentication and security<br/>[security.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_adapter["Database adapter<br/>[db_layer.py]"]
  node_sqlite_store[("SQLite store")]
end

node_staff(("Staff and HR"))
node_mysql_store[("MySQL store")]

node_staff -.->|"uses"| node_web_surfaces
node_web_surfaces -.->|"requests HR operations"| node_hr_backend
node_hr_backend -->|"uses security helpers"| node_auth_security
node_hr_backend -->|"opens database"| node_db_adapter
node_hr_backend -->|"routes attendance"| node_attendance
node_hr_backend -->|"handles requests"| node_leave_holidays
node_hr_backend -.->|"serves expenses"| node_expenses
node_hr_backend -.->|"serves payroll"| node_salary
node_staff -.->|"views reports"| node_performance_projects
node_db_adapter -->|"reads and writes"| node_sqlite_store
node_db_adapter -->|"reads and writes"| node_mysql_store

click node_web_surfaces "https://github.com/sivabalan0074/hrmsite_miim/tree/main/template"
click node_hr_backend "https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py"
click node_attendance "https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py"
click node_leave_holidays "https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py"
click node_expenses "https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py"
click node_salary "https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py"
click node_performance_projects "https://github.com/sivabalan0074/hrmsite_miim/tree/main/template"
click node_auth_security "https://github.com/sivabalan0074/hrmsite_miim/blob/main/security.py"
click node_db_adapter "https://github.com/sivabalan0074/hrmsite_miim/blob/main/db_layer.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_web_surfaces toneBlue
class node_hr_backend,node_attendance,node_leave_holidays,node_expenses,node_salary,node_performance_projects,node_mysql_store toneAmber
class node_auth_security toneMint
class node_db_adapter,node_sqlite_store toneRose
class node_staff toneIndigo
```

## Components

### HR interface

- [HR screens](https://github.com/sivabalan0074/hrmsite_miim/tree/main/template): `template`

### HR application

- [HR API and routes](https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py): `app.py`
- [Attendance](https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py): `app.py`
- [Leave and holidays](https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py): `app.py`
- [Expenses](https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py): `app.py`
- [Salary and payroll](https://github.com/sivabalan0074/hrmsite_miim/blob/main/app.py): `app.py`
- [Performance and projects](https://github.com/sivabalan0074/hrmsite_miim/tree/main/template): `template`

### Security

- [Authentication and security](https://github.com/sivabalan0074/hrmsite_miim/blob/main/security.py): `security.py`

### Persistence

- [Database adapter](https://github.com/sivabalan0074/hrmsite_miim/blob/main/db_layer.py): `db_layer.py`
- **SQLite store**

### Other components

- **Staff and HR**
- **MySQL store**

## Connections

- Staff and HR → HR screens: uses (evidence: `README.md`)
- HR screens → HR API and routes: requests HR operations (evidence: `README.md`)
- HR API and routes → Authentication and security: uses security helpers (evidence: `app.py`)
- HR API and routes → Database adapter: opens database (evidence: `app.py`)
- HR API and routes → Attendance: routes attendance (evidence: `app.py`)
- HR API and routes → Leave and holidays: handles requests (evidence: `app.py`)
- HR API and routes → Expenses: serves expenses (evidence: `app.py`)
- HR API and routes → Salary and payroll: serves payroll (evidence: `app.py`)
- Staff and HR → Performance and projects: views reports
- Database adapter → SQLite store: reads and writes (evidence: `db_layer.py`)
- Database adapter → MySQL store: reads and writes (evidence: `db_layer.py`)
