# mervin414-a/gyan architecture

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

- Interactive diagram: https://gitdiagram.com/mervin414-a/gyan
- Repository: https://github.com/mervin414-a/gyan

## Overview

This is a conference-hall booking and administration application. Employees register or sign in, request a hall booking, and review bookings and notifications; administrators manage employees and booking decisions, configure booking rules, and view reports. The frontend routes these workflows, while Django views implement the API and use account, booking, notification, and settings models. The sampled sources support these responsibilities, but do not show enough frontend API wiring to map most page-to-endpoint calls; those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/mervin414-a/gyan/blob/main/frontend/src/App.jsx) (App routing), [`backend/bookings/views.py`](https://github.com/mervin414-a/gyan/blob/main/backend/bookings/views.py) (Booking endpoints), [`backend/bookings/models.py`](https://github.com/mervin414-a/gyan/blob/main/backend/bookings/models.py) (Bookings and permissions), [`backend/accounts/models.py`](https://github.com/mervin414-a/gyan/blob/main/backend/accounts/models.py) (User accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app_routes["App routing<br/>[App.jsx]"]
  node_employee_dashboard["Employee dashboard"]
  node_employee_booking["Booking request"]
  node_employee_registration["Employee registration"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_my_bookings["My bookings<br/>[MyBookings.jsx]"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_admin_employees["Employee management<br/>[AdminEmployees.jsx]"]
  node_admin_bookings["Booking management<br/>[AdminBookings.jsx]"]
  node_admin_reports["Admin reports<br/>[AdminReports.jsx]"]
  node_admin_settings["Booking settings<br/>[AdminSettings.jsx]"]
  node_admin_notifications["Admin notifications"]
  node_notifications_page["Employee notifications<br/>[Notifications.jsx]"]
  node_employee_activity["Activity history<br/>[MyActivity.jsx]"]
  node_employee_profile["Profile<br/>[Profile.jsx]"]
end

subgraph group_identity["Accounts and access"]
  node_user_api["Account endpoints<br/>[views.py]"]
  node_user_model["User accounts<br/>[models.py]"]
end

subgraph group_reservations["Booking operations"]
  node_booking_api["Booking endpoints<br/>[views.py]"]
  node_booking_models["Bookings and permissions<br/>[models.py]"]
  node_booking_serializers["Booking serializers<br/>[serializers.py]"]
end

subgraph group_admin_data["Administration and insights"]
  node_reports_api["Reports and settings<br/>[views.py]"]
  node_settings_model["System settings<br/>[models.py]"]
end

subgraph group_messaging["Notifications and messaging"]
  node_sms_service["SMS service<br/>[sms_service.py]"]
  node_notification_api["Notification endpoints<br/>[views.py]"]
  node_notification_model["Notification records<br/>[models.py]"]
  node_notification_utils["Notification utilities"]
  node_email_utils["Booking email utilities<br/>[email_utils.py]"]
end

node_employee(("Employee"))
node_administrator(("Administrator"))

node_employee -->|"uses"| node_app_routes
node_administrator -->|"uses"| node_app_routes
node_app_routes -->|"routes to"| node_login
node_app_routes -->|"routes to"| node_employee_registration
node_app_routes -->|"routes to"| node_employee_dashboard
node_app_routes -->|"routes to"| node_employee_booking
node_app_routes -->|"routes to"| node_my_bookings
node_app_routes -->|"routes to"| node_notifications_page
node_app_routes -->|"routes to"| node_employee_activity
node_app_routes -->|"routes to"| node_employee_profile
node_app_routes -->|"routes to"| node_admin_dashboard
node_app_routes -->|"routes to"| node_admin_employees
node_app_routes -->|"routes to"| node_admin_bookings
node_app_routes -->|"routes to"| node_admin_reports
node_app_routes -->|"routes to"| node_admin_settings
node_app_routes -->|"routes to"| node_admin_notifications
node_employee_dashboard -.->|"requests bookings"| node_booking_api
node_user_api -->|"reads and updates"| node_user_model
node_user_api -->|"queries bookings"| node_booking_models
node_user_api -->|"sends SMS"| node_sms_service
node_booking_api -->|"reads and writes"| node_booking_models
node_booking_api -->|"serializes bookings"| node_booking_serializers
node_booking_api -->|"reads settings"| node_settings_model
node_booking_api -->|"sends email"| node_email_utils
node_booking_api -->|"creates notifications"| node_notification_utils
node_booking_api -->|"sends SMS"| node_sms_service
node_booking_models -->|"references employees"| node_user_model
node_booking_serializers -->|"serializes"| node_booking_models
node_reports_api -->|"aggregates bookings"| node_booking_models
node_reports_api -->|"aggregates employees"| node_user_model
node_reports_api -->|"reads and updates"| node_settings_model
node_notification_api -->|"reads and updates"| node_notification_model
node_notification_utils -->|"creates records"| node_notification_model
node_notification_model -->|"references recipient"| node_user_model

click node_app_routes "https://github.com/mervin414-a/gyan/blob/main/frontend/src/App.jsx"
click node_employee_dashboard "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/EmployeeDashboard.jsx"
click node_employee_booking "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/EmployeeBooking.jsx"
click node_employee_registration "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/EmployeeRegister.jsx"
click node_login "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/Login.jsx"
click node_my_bookings "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/MyBookings.jsx"
click node_admin_dashboard "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_admin_employees "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminEmployees.jsx"
click node_admin_bookings "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminBookings.jsx"
click node_admin_reports "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminReports.jsx"
click node_admin_settings "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminSettings.jsx"
click node_admin_notifications "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminNotifications.jsx"
click node_notifications_page "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/Notifications.jsx"
click node_employee_activity "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/MyActivity.jsx"
click node_employee_profile "https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/Profile.jsx"
click node_user_api "https://github.com/mervin414-a/gyan/blob/main/backend/accounts/views.py"
click node_user_model "https://github.com/mervin414-a/gyan/blob/main/backend/accounts/models.py"
click node_sms_service "https://github.com/mervin414-a/gyan/blob/main/backend/accounts/sms_service.py"
click node_booking_api "https://github.com/mervin414-a/gyan/blob/main/backend/bookings/views.py"
click node_booking_models "https://github.com/mervin414-a/gyan/blob/main/backend/bookings/models.py"
click node_booking_serializers "https://github.com/mervin414-a/gyan/blob/main/backend/bookings/serializers.py"
click node_reports_api "https://github.com/mervin414-a/gyan/blob/main/backend/reports/views.py"
click node_settings_model "https://github.com/mervin414-a/gyan/blob/main/backend/reports/models.py"
click node_notification_api "https://github.com/mervin414-a/gyan/blob/main/backend/notifications/views.py"
click node_notification_model "https://github.com/mervin414-a/gyan/blob/main/backend/notifications/models.py"
click node_notification_utils "https://github.com/mervin414-a/gyan/blob/main/backend/notifications/notification_utils.py"
click node_email_utils "https://github.com/mervin414-a/gyan/blob/main/backend/bookings/email_utils.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_app_routes,node_employee_dashboard,node_employee_booking,node_employee_registration,node_login,node_my_bookings,node_admin_dashboard,node_admin_employees,node_admin_bookings,node_admin_reports,node_admin_settings,node_admin_notifications,node_notifications_page,node_employee_activity,node_employee_profile toneBlue
class node_user_api,node_user_model toneAmber
class node_booking_api,node_booking_models,node_booking_serializers toneMint
class node_reports_api,node_settings_model toneRose
class node_sms_service,node_notification_api,node_notification_model,node_notification_utils,node_email_utils,node_employee,node_administrator toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/mervin414-a/gyan/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Employee dashboard](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/EmployeeDashboard.jsx): `frontend/src/pages/EmployeeDashboard.jsx`
- [Booking request](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/EmployeeBooking.jsx): `frontend/src/pages/EmployeeBooking.jsx`
- [Employee registration](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/EmployeeRegister.jsx): `frontend/src/pages/EmployeeRegister.jsx`
- [Sign in](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [My bookings](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/MyBookings.jsx): `frontend/src/pages/MyBookings.jsx`
- [Admin dashboard](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Employee management](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminEmployees.jsx): `frontend/src/pages/AdminEmployees.jsx`
- [Booking management](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminBookings.jsx): `frontend/src/pages/AdminBookings.jsx`
- [Admin reports](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminReports.jsx): `frontend/src/pages/AdminReports.jsx`
- [Booking settings](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminSettings.jsx): `frontend/src/pages/AdminSettings.jsx`
- [Admin notifications](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/AdminNotifications.jsx): `frontend/src/pages/AdminNotifications.jsx`
- [Employee notifications](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/Notifications.jsx): `frontend/src/pages/Notifications.jsx`
- [Activity history](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/MyActivity.jsx): `frontend/src/pages/MyActivity.jsx`
- [Profile](https://github.com/mervin414-a/gyan/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`

### Accounts and access

- [Account endpoints](https://github.com/mervin414-a/gyan/blob/main/backend/accounts/views.py): `backend/accounts/views.py`
- [User accounts](https://github.com/mervin414-a/gyan/blob/main/backend/accounts/models.py): `backend/accounts/models.py`

### Booking operations

- [Booking endpoints](https://github.com/mervin414-a/gyan/blob/main/backend/bookings/views.py): `backend/bookings/views.py`
- [Bookings and permissions](https://github.com/mervin414-a/gyan/blob/main/backend/bookings/models.py): `backend/bookings/models.py`
- [Booking serializers](https://github.com/mervin414-a/gyan/blob/main/backend/bookings/serializers.py): `backend/bookings/serializers.py`

### Administration and insights

- [Reports and settings](https://github.com/mervin414-a/gyan/blob/main/backend/reports/views.py): `backend/reports/views.py`
- [System settings](https://github.com/mervin414-a/gyan/blob/main/backend/reports/models.py): `backend/reports/models.py`

### Notifications and messaging

- [SMS service](https://github.com/mervin414-a/gyan/blob/main/backend/accounts/sms_service.py): `backend/accounts/sms_service.py`
- [Notification endpoints](https://github.com/mervin414-a/gyan/blob/main/backend/notifications/views.py): `backend/notifications/views.py`
- [Notification records](https://github.com/mervin414-a/gyan/blob/main/backend/notifications/models.py): `backend/notifications/models.py`
- [Notification utilities](https://github.com/mervin414-a/gyan/blob/main/backend/notifications/notification_utils.py): `backend/notifications/notification_utils.py`
- [Booking email utilities](https://github.com/mervin414-a/gyan/blob/main/backend/bookings/email_utils.py): `backend/bookings/email_utils.py`

### Other components

- **Employee**
- **Administrator**

## Connections

- Employee → App routing: uses (evidence: `frontend/src/App.jsx`)
- Administrator → App routing: uses (evidence: `frontend/src/App.jsx`)
- App routing → Sign in: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Employee registration: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Employee dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Booking request: routes to (evidence: `frontend/src/App.jsx`)
- App routing → My bookings: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Employee notifications: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Activity history: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Profile: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Admin dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Employee management: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Booking management: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Admin reports: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Booking settings: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Admin notifications: routes to (evidence: `frontend/src/App.jsx`)
- Employee dashboard → Booking endpoints: requests bookings
- Account endpoints → User accounts: reads and updates (evidence: `backend/accounts/views.py`)
- Account endpoints → Bookings and permissions: queries bookings (evidence: `backend/accounts/views.py`)
- Account endpoints → SMS service: sends SMS (evidence: `backend/accounts/views.py`)
- Booking endpoints → Bookings and permissions: reads and writes (evidence: `backend/bookings/views.py`)
- Booking endpoints → Booking serializers: serializes bookings (evidence: `backend/bookings/views.py`)
- Booking endpoints → System settings: reads settings (evidence: `backend/bookings/views.py`)
- Booking endpoints → Booking email utilities: sends email (evidence: `backend/bookings/views.py`)
- Booking endpoints → Notification utilities: creates notifications (evidence: `backend/bookings/views.py`)
- Booking endpoints → SMS service: sends SMS (evidence: `backend/bookings/views.py`)
- Bookings and permissions → User accounts: references employees (evidence: `backend/bookings/models.py`)
- Booking serializers → Bookings and permissions: serializes (evidence: `backend/bookings/serializers.py`)
- Reports and settings → Bookings and permissions: aggregates bookings (evidence: `backend/reports/views.py`)
- Reports and settings → User accounts: aggregates employees (evidence: `backend/reports/views.py`)
- Reports and settings → System settings: reads and updates (evidence: `backend/reports/views.py`)
- Notification endpoints → Notification records: reads and updates (evidence: `backend/notifications/views.py`)
- Notification utilities → Notification records: creates records (evidence: `backend/notifications/notification_utils.py`)
- Notification records → User accounts: references recipient (evidence: `backend/notifications/models.py`)
