# 13mayankjoshi13/hostel_management_system_tqm architecture

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

- Interactive diagram: https://gitdiagram.com/13mayankjoshi13/hostel_management_system_tqm
- Repository: https://github.com/13mayankjoshi13/hostel_management_system_tqm

## Overview

This is a Tkinter hostel-management desktop application. Users sign in, then role-aware screens support student and room records, room allocation, complaints, leave, and calendar operations; administrators and wardens also manage events, while students use a self-service portal. Quality features include bug tracking, error/audit logging, and Pareto/Fishbone monitoring. The graph follows documented imports and README capabilities; some unsampled service details are represented at subsystem level, and no external integrations are documented.

Main entry points: [`app/screens/main_window.py`](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/main_window.py) (Main window), [`app/database/db.py`](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/database/db.py) (SQLite database), [`app/screens`](https://github.com/13mayankjoshi13/hostel_management_system_tqm/tree/main/app/screens) (Hostel screens), [`app/screens/dashboard_screen.py`](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/dashboard_screen.py) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_shell["Main window<br/>[main_window.py]"]
  node_login["Login screen<br/>[login_screen.py]"]
  node_dashboard["Dashboard"]
  node_records_ui["Hostel screens"]
  node_calendar_ui["Calendar interface<br/>[calendar_screen.py]"]
  node_portal_ui["Student portal<br/>[my_room_screen.py]"]
  node_calendar_widget["Calendar widget<br/>[calendar_widget.py]"]
  node_quality_ui["Quality monitor screen<br/>[quality_screen.py]"]
end

subgraph group_operations["Hostel operations"]
  node_auth["Authentication and users<br/>[auth_service.py]"]
  node_students["Student management<br/>[student_service.py]"]
  node_rooms["Room management<br/>[room_service.py]"]
  node_allocation["Room allocation"]
  node_complaints["Complaint resolution"]
  node_leave["Leave tracking<br/>[leave_service.py]"]
  node_portal["Student self-service"]
  node_events["Calendar events<br/>[event_service.py]"]
end

subgraph group_quality["Quality monitoring"]
  node_bugs["Bug tracker<br/>[bug_service.py]"]
  node_quality_analysis["Quality analysis<br/>[quality_service.py]"]
  node_logging["Error and audit logs<br/>[logging_service.py]"]
end

subgraph group_foundation["Application foundation"]
  node_entry["Application startup<br/>[main.py]"]
  node_database[("SQLite database<br/>[db.py]")]
  node_validation["Input validation<br/>[validation.py]"]
  node_exception["Exception handling"]
  node_session["Session state<br/>[session.py]"]
  node_config["Application configuration<br/>[config.py]"]
  node_theme["UI theme<br/>[theme.py]"]
end

node_user(("Hostel user"))

node_user -->|"launches"| node_entry
node_entry -->|"opens"| node_shell
node_shell -->|"shows"| node_login
node_shell -->|"routes to"| node_dashboard
node_shell -->|"routes to"| node_records_ui
node_shell -->|"routes to"| node_calendar_ui
node_shell -->|"routes to"| node_portal_ui
node_user -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth
node_records_ui -->|"manages"| node_students
node_records_ui -->|"manages"| node_rooms
node_records_ui -->|"allocates rooms"| node_allocation
node_records_ui -->|"handles complaints"| node_complaints
node_records_ui -->|"tracks leave"| node_leave
node_calendar_ui -->|"manages events"| node_events
node_calendar_ui -->|"embeds"| node_calendar_widget
node_calendar_widget -->|"loads events"| node_events
node_portal_ui -->|"requests self-service"| node_portal
node_portal -->|"uses complaint service"| node_complaints
node_portal -->|"uses leave service"| node_leave
node_dashboard -->|"loads calendar"| node_events
node_dashboard -->|"loads allocations"| node_allocation
node_dashboard -->|"loads complaints"| node_complaints
node_dashboard -->|"loads bug data"| node_bugs
node_quality_ui -->|"requests analysis"| node_quality_analysis
node_quality_analysis -->|"analyzes defects"| node_bugs
node_auth -->|"reads and writes"| node_database
node_students -->|"reads and writes"| node_database
node_allocation -->|"reads and writes"| node_database
node_complaints -->|"reads and writes"| node_database
node_leave -->|"reads and writes"| node_database
node_events -->|"reads and writes"| node_database
node_bugs -->|"reads and writes"| node_database
node_auth -->|"validates input"| node_validation
node_allocation -->|"validates input"| node_validation
node_events -->|"validates input"| node_validation
node_students -->|"records activity"| node_logging
node_bugs -->|"records defects"| node_logging
node_exception -->|"logs errors"| node_logging
node_auth -->|"sets session"| node_session
node_logging -->|"reads identity"| node_session
node_database -->|"uses paths"| node_config
node_entry -->|"initializes"| node_logging
node_shell -->|"styles screens"| node_theme

click node_entry "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/main.py"
click node_shell "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/main_window.py"
click node_login "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/login_screen.py"
click node_dashboard "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/dashboard_screen.py"
click node_records_ui "https://github.com/13mayankjoshi13/hostel_management_system_tqm/tree/main/app/screens"
click node_calendar_ui "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/calendar_screen.py"
click node_portal_ui "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/my_room_screen.py"
click node_calendar_widget "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/calendar_widget.py"
click node_auth "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/auth_service.py"
click node_students "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/student_service.py"
click node_rooms "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/room_service.py"
click node_allocation "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/allocation_service.py"
click node_complaints "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/complaint_service.py"
click node_leave "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/leave_service.py"
click node_portal "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/student_portal_service.py"
click node_events "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/event_service.py"
click node_bugs "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/bug_service.py"
click node_quality_analysis "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/quality_service.py"
click node_quality_ui "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/quality_screen.py"
click node_database "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/database/db.py"
click node_validation "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/validation.py"
click node_logging "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/logging_service.py"
click node_exception "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/exception_handler.py"
click node_session "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/session.py"
click node_config "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/config.py"
click node_theme "https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/theme.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_shell,node_login,node_dashboard,node_records_ui,node_calendar_ui,node_portal_ui,node_calendar_widget,node_quality_ui,node_user toneBlue
class node_auth,node_students,node_rooms,node_allocation,node_complaints,node_leave,node_portal,node_events toneAmber
class node_bugs,node_quality_analysis,node_logging toneMint
class node_entry,node_database,node_validation,node_exception,node_session,node_config,node_theme toneRose
```

## Components

### Desktop interface

- [Main window](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/main_window.py): `app/screens/main_window.py`
- [Login screen](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/login_screen.py): `app/screens/login_screen.py`
- [Dashboard](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/dashboard_screen.py): `app/screens/dashboard_screen.py`
- [Hostel screens](https://github.com/13mayankjoshi13/hostel_management_system_tqm/tree/main/app/screens): `app/screens`
- [Calendar interface](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/calendar_screen.py): `app/screens/calendar_screen.py`
- [Student portal](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/my_room_screen.py): `app/screens/my_room_screen.py`
- [Calendar widget](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/calendar_widget.py): `app/screens/calendar_widget.py`
- [Quality monitor screen](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/screens/quality_screen.py): `app/screens/quality_screen.py`

### Hostel operations

- [Authentication and users](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/auth_service.py): `app/services/auth_service.py`
- [Student management](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/student_service.py): `app/services/student_service.py`
- [Room management](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/room_service.py): `app/services/room_service.py`
- [Room allocation](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/allocation_service.py): `app/services/allocation_service.py`
- [Complaint resolution](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/complaint_service.py): `app/services/complaint_service.py`
- [Leave tracking](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/leave_service.py): `app/services/leave_service.py`
- [Student self-service](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/student_portal_service.py): `app/services/student_portal_service.py`
- [Calendar events](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/event_service.py): `app/services/event_service.py`

### Quality monitoring

- [Bug tracker](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/bug_service.py): `app/services/bug_service.py`
- [Quality analysis](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/services/quality_service.py): `app/services/quality_service.py`
- [Error and audit logs](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/logging_service.py): `app/utils/logging_service.py`

### Application foundation

- [Application startup](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/main.py): `app/main.py`
- [SQLite database](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/database/db.py): `app/database/db.py`
- [Input validation](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/validation.py): `app/utils/validation.py`
- [Exception handling](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/exception_handler.py): `app/utils/exception_handler.py`
- [Session state](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/utils/session.py): `app/utils/session.py`
- [Application configuration](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/config.py): `app/config.py`
- [UI theme](https://github.com/13mayankjoshi13/hostel_management_system_tqm/blob/main/app/theme.py): `app/theme.py`

### Other components

- **Hostel user**

## Connections

- Hostel user → Application startup: launches
- Application startup → Main window: opens (evidence: `app/main.py`)
- Main window → Login screen: shows (evidence: `app/screens/main_window.py`)
- Main window → Dashboard: routes to (evidence: `app/screens/main_window.py`)
- Main window → Hostel screens: routes to (evidence: `app/screens/main_window.py`)
- Main window → Calendar interface: routes to (evidence: `app/screens/main_window.py`)
- Main window → Student portal: routes to (evidence: `app/screens/main_window.py`)
- Hostel user → Login screen: signs in
- Login screen → Authentication and users: authenticates (evidence: `app/screens/login_screen.py`)
- Hostel screens → Student management: manages (evidence: `app/screens/student_screen.py`)
- Hostel screens → Room management: manages (evidence: `app/screens/room_screen.py`)
- Hostel screens → Room allocation: allocates rooms (evidence: `app/screens/allocation_screen.py`)
- Hostel screens → Complaint resolution: handles complaints (evidence: `app/screens/complaint_screen.py`)
- Hostel screens → Leave tracking: tracks leave (evidence: `app/screens/leave_screen.py`)
- Calendar interface → Calendar events: manages events (evidence: `app/screens/calendar_screen.py`)
- Calendar interface → Calendar widget: embeds (evidence: `app/screens/calendar_screen.py`)
- Calendar widget → Calendar events: loads events (evidence: `app/screens/calendar_widget.py`)
- Student portal → Student self-service: requests self-service (evidence: `app/screens/my_room_screen.py`)
- Student self-service → Complaint resolution: uses complaint service (evidence: `app/services/student_portal_service.py`)
- Student self-service → Leave tracking: uses leave service (evidence: `app/services/student_portal_service.py`)
- Dashboard → Calendar events: loads calendar (evidence: `app/screens/dashboard_screen.py`)
- Dashboard → Room allocation: loads allocations (evidence: `app/screens/dashboard_screen.py`)
- Dashboard → Complaint resolution: loads complaints (evidence: `app/screens/dashboard_screen.py`)
- Dashboard → Bug tracker: loads bug data (evidence: `app/screens/dashboard_screen.py`)
- Quality monitor screen → Quality analysis: requests analysis (evidence: `app/screens/quality_screen.py`)
- Quality analysis → Bug tracker: analyzes defects (evidence: `app/services/quality_service.py`)
- Authentication and users → SQLite database: reads and writes (evidence: `app/services/auth_service.py`)
- Student management → SQLite database: reads and writes (evidence: `app/services/student_service.py`)
- Room allocation → SQLite database: reads and writes (evidence: `app/services/allocation_service.py`)
- Complaint resolution → SQLite database: reads and writes (evidence: `app/services/complaint_service.py`)
- Leave tracking → SQLite database: reads and writes (evidence: `app/services/leave_service.py`)
- Calendar events → SQLite database: reads and writes (evidence: `app/services/event_service.py`)
- Bug tracker → SQLite database: reads and writes (evidence: `app/services/bug_service.py`)
- Authentication and users → Input validation: validates input (evidence: `app/services/auth_service.py`)
- Room allocation → Input validation: validates input (evidence: `app/services/allocation_service.py`)
- Calendar events → Input validation: validates input (evidence: `app/services/event_service.py`)
- Student management → Error and audit logs: records activity (evidence: `app/services/student_service.py`)
- Bug tracker → Error and audit logs: records defects (evidence: `app/services/bug_service.py`)
- Exception handling → Error and audit logs: logs errors (evidence: `app/utils/exception_handler.py`)
- Authentication and users → Session state: sets session (evidence: `app/services/auth_service.py`)
- Error and audit logs → Session state: reads identity (evidence: `app/utils/logging_service.py`)
- SQLite database → Application configuration: uses paths (evidence: `app/database/db.py`)
- Application startup → Error and audit logs: initializes (evidence: `app/main.py`)
- Main window → UI theme: styles screens (evidence: `app/screens/main_window.py`)
