# sumanth-9515/hostelmanagment architecture

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

- Interactive diagram: https://gitdiagram.com/sumanth-9515/hostelmanagment
- Repository: https://github.com/sumanth-9515/hostelmanagment

## Overview

This is a hostel-management product for owners and platform administrators. Owners manage buildings and rooms, onboard tenants, track rent and payment requests, and configure automated reminders; platform administrators oversee users, plans, and approvals. The browser app routes users to these workflows, while the Express server exposes their API routes and MongoDB-backed models. The graph reflects the supplied excerpts and SOURCE INDEX; frontend-to-API calls and some unsampled route internals are not shown where the evidence does not establish them.

Main entry points: [`client/src/App.jsx`](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/App.jsx) (Route access), [`backend/server.js`](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/server.js) (API server), [`backend/routes/masterRoutes.js`](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/masterRoutes.js) (Platform operations), [`backend/models/Tenant.js`](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Tenant.js) (Tenants)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Owner application"]
  node_app["Route access<br/>[App.jsx]"]
  node_layout["Owner workspace<br/>[Layout.jsx]"]
  node_propertyui["Building management<br/>[Addhostel.jsx]"]
  node_candidateui["Candidate management"]
  node_onboardui["Tenant onboarding"]
  node_onboardmanage["Onboarding review"]
  node_overview["Owner overview<br/>[Overview.jsx]"]
  node_rentui["Rent management<br/>[Rentmanagement.jsx]"]
  node_paymentui["Payment requests"]
  node_masterui["Master console"]
  node_approvalui["Plan approvals"]
  node_planui["Plan monitoring"]
end

subgraph group_property["Property and tenants"]
  node_buildingroutes["Building operations<br/>[buildingRoutes.js]"]
  node_tenantroutes["Tenant operations<br/>[tenantRoutes.js]"]
end

subgraph group_finance["Rent and payments"]
  node_rentui_backend["Rent operations<br/>[rentroutes.js]"]
  node_payroutes["Payment requests"]
  node_automail["Reminder scheduling<br/>[Automailroutes.js]"]
end

subgraph group_platform["Platform administration"]
  node_masterroutes["Platform operations<br/>[masterRoutes.js]"]
  node_approvalroutes["Plan approvals<br/>[approvalroutes.js]"]
  node_planroutes["Plan operations<br/>[planroutes.js]"]
  node_activityroutes["Activity log API<br/>[activityRoutes.js]"]
end

subgraph group_data["Backend and data"]
  node_building[("Buildings<br/>[Building.js]")]
  node_tenant[("Tenants<br/>[Tenant.js]")]
  node_rentpayment[("Rent records<br/>[Rentpayment.js]")]
  node_payrequest[("Payment requests<br/>[PaymentRequest.js]")]
  node_automailconfig[("Reminder settings<br/>[Automailconfig.js]")]
  node_user[("Users and plans<br/>[User.js]")]
  node_plan[("Plans<br/>[Plan.js]")]
  node_activity[("Activity history<br/>[ActivityLog.js]")]
  node_server["API server<br/>[server.js]"]
end

node_owner(("Owner"))
node_master(("Master admin"))

node_owner -.->|"uses"| node_app
node_master -.->|"uses"| node_app
node_app -->|"routes through"| node_layout
node_app -->|"routes to"| node_propertyui
node_app -->|"routes to"| node_candidateui
node_app -->|"routes to"| node_onboardui
node_app -->|"routes to"| node_onboardmanage
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_rentui
node_app -->|"routes to"| node_paymentui
node_app -->|"routes to"| node_masterui
node_app -->|"routes to"| node_approvalui
node_app -->|"routes to"| node_planui
node_server -->|"registers routes"| node_buildingroutes
node_server -->|"registers routes"| node_tenantroutes
node_server -->|"registers routes"| node_rentui_backend
node_server -->|"registers routes"| node_payroutes
node_server -->|"registers routes"| node_automail
node_server -->|"registers routes"| node_masterroutes
node_server -->|"registers routes"| node_approvalroutes
node_server -->|"registers routes"| node_planroutes
node_server -->|"registers routes"| node_activityroutes
node_buildingroutes -->|"reads and writes"| node_building
node_buildingroutes -->|"reads"| node_tenant
node_tenantroutes -->|"reads and writes"| node_tenant
node_tenantroutes -->|"reads"| node_building
node_rentui_backend -->|"reads and writes"| node_tenant
node_rentui_backend -->|"reads"| node_building
node_rentui_backend -.->|"writes payments"| node_rentpayment
node_payroutes -->|"reads and writes"| node_payrequest
node_payroutes -->|"reads"| node_tenant
node_payroutes -->|"records payments"| node_rentpayment
node_payroutes -->|"calls payment helpers"| node_rentui_backend
node_automail -.->|"reads and writes"| node_automailconfig
node_automail -->|"reads"| node_tenant
node_automail -->|"reads"| node_rentpayment
node_automail -->|"reads"| node_building
node_masterroutes -->|"reads"| node_user
node_masterroutes -->|"reads"| node_building
node_masterroutes -->|"reads"| node_tenant
node_masterroutes -->|"reads"| node_rentpayment
node_masterroutes -->|"reads"| node_payrequest
node_masterroutes -->|"reads"| node_automailconfig
node_masterroutes -->|"reads"| node_activity
node_approvalroutes -->|"updates"| node_user
node_approvalroutes -->|"reads"| node_plan
node_planroutes -.->|"manages"| node_plan
node_activityroutes -.->|"reads"| node_activity

click node_app "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/App.jsx"
click node_layout "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/components/Layout.jsx"
click node_propertyui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Addhostel.jsx"
click node_candidateui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Candidatesmanagement.jsx"
click node_onboardui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Tenantonboardingform.jsx"
click node_onboardmanage "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Onboardingmanager.jsx"
click node_overview "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Overview.jsx"
click node_rentui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Rentmanagement.jsx"
click node_paymentui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Paymentrequests.jsx"
click node_masterui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/master/MasterDashboard.jsx"
click node_approvalui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/master/Masterapprovals.jsx"
click node_planui "https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/master/Masterplanmonitor.jsx"
click node_buildingroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/buildingRoutes.js"
click node_tenantroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/tenantRoutes.js"
click node_building "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Building.js"
click node_tenant "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Tenant.js"
click node_rentui_backend "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/rentroutes.js"
click node_payroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/paymentRequestRoutes.js"
click node_rentpayment "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Rentpayment.js"
click node_payrequest "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/PaymentRequest.js"
click node_automail "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/Automailroutes.js"
click node_automailconfig "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Automailconfig.js"
click node_masterroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/masterRoutes.js"
click node_approvalroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/approvalroutes.js"
click node_planroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/planroutes.js"
click node_user "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/User.js"
click node_plan "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Plan.js"
click node_activity "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/ActivityLog.js"
click node_activityroutes "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/activityRoutes.js"
click node_server "https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/server.js"

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,node_layout,node_propertyui,node_candidateui,node_onboardui,node_onboardmanage,node_overview,node_rentui,node_paymentui,node_masterui,node_approvalui,node_planui toneBlue
class node_buildingroutes,node_tenantroutes toneAmber
class node_rentui_backend,node_payroutes,node_automail toneMint
class node_masterroutes,node_approvalroutes,node_planroutes,node_activityroutes toneRose
class node_building,node_tenant,node_rentpayment,node_payrequest,node_automailconfig,node_user,node_plan,node_activity,node_server,node_owner,node_master toneIndigo
```

## Components

### Owner application

- [Route access](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Owner workspace](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/components/Layout.jsx): `client/src/components/Layout.jsx`
- [Building management](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Addhostel.jsx): `client/src/pages/Addhostel.jsx`
- [Candidate management](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Candidatesmanagement.jsx): `client/src/pages/Candidatesmanagement.jsx`
- [Tenant onboarding](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Tenantonboardingform.jsx): `client/src/pages/Tenantonboardingform.jsx`
- [Onboarding review](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Onboardingmanager.jsx): `client/src/pages/Onboardingmanager.jsx`
- [Owner overview](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Overview.jsx): `client/src/pages/Overview.jsx`
- [Rent management](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Rentmanagement.jsx): `client/src/pages/Rentmanagement.jsx`
- [Payment requests](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/Paymentrequests.jsx): `client/src/pages/Paymentrequests.jsx`
- [Master console](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/master/MasterDashboard.jsx): `client/src/pages/master/MasterDashboard.jsx`
- [Plan approvals](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/master/Masterapprovals.jsx): `client/src/pages/master/Masterapprovals.jsx`
- [Plan monitoring](https://github.com/sumanth-9515/hostelmanagment/blob/main/client/src/pages/master/Masterplanmonitor.jsx): `client/src/pages/master/Masterplanmonitor.jsx`

### Property and tenants

- [Building operations](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/buildingRoutes.js): `backend/routes/buildingRoutes.js`
- [Tenant operations](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/tenantRoutes.js): `backend/routes/tenantRoutes.js`

### Rent and payments

- [Rent operations](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/rentroutes.js): `backend/routes/rentroutes.js`
- [Payment requests](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/paymentRequestRoutes.js): `backend/routes/paymentRequestRoutes.js`
- [Reminder scheduling](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/Automailroutes.js): `backend/routes/Automailroutes.js`

### Platform administration

- [Platform operations](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/masterRoutes.js): `backend/routes/masterRoutes.js`
- [Plan approvals](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/approvalroutes.js): `backend/routes/approvalroutes.js`
- [Plan operations](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/planroutes.js): `backend/routes/planroutes.js`
- [Activity log API](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/routes/activityRoutes.js): `backend/routes/activityRoutes.js`

### Backend and data

- [Buildings](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Building.js): `backend/models/Building.js`
- [Tenants](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Tenant.js): `backend/models/Tenant.js`
- [Rent records](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Rentpayment.js): `backend/models/Rentpayment.js`
- [Payment requests](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/PaymentRequest.js): `backend/models/PaymentRequest.js`
- [Reminder settings](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Automailconfig.js): `backend/models/Automailconfig.js`
- [Users and plans](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/User.js): `backend/models/User.js`
- [Plans](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/Plan.js): `backend/models/Plan.js`
- [Activity history](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/models/ActivityLog.js): `backend/models/ActivityLog.js`
- [API server](https://github.com/sumanth-9515/hostelmanagment/blob/main/backend/server.js): `backend/server.js`

### Other components

- **Owner**
- **Master admin**

## Connections

- Owner → Route access: uses
- Master admin → Route access: uses
- Route access → Owner workspace: routes through (evidence: `client/src/App.jsx`)
- Route access → Building management: routes to (evidence: `client/src/App.jsx`)
- Route access → Candidate management: routes to (evidence: `client/src/App.jsx`)
- Route access → Tenant onboarding: routes to (evidence: `client/src/App.jsx`)
- Route access → Onboarding review: routes to (evidence: `client/src/App.jsx`)
- Route access → Owner overview: routes to (evidence: `client/src/App.jsx`)
- Route access → Rent management: routes to (evidence: `client/src/App.jsx`)
- Route access → Payment requests: routes to (evidence: `client/src/App.jsx`)
- Route access → Master console: routes to (evidence: `client/src/App.jsx`)
- Route access → Plan approvals: routes to (evidence: `client/src/App.jsx`)
- Route access → Plan monitoring: routes to (evidence: `client/src/App.jsx`)
- API server → Building operations: registers routes (evidence: `backend/server.js`)
- API server → Tenant operations: registers routes (evidence: `backend/server.js`)
- API server → Rent operations: registers routes (evidence: `backend/server.js`)
- API server → Payment requests: registers routes (evidence: `backend/server.js`)
- API server → Reminder scheduling: registers routes (evidence: `backend/server.js`)
- API server → Platform operations: registers routes (evidence: `backend/server.js`)
- API server → Plan approvals: registers routes (evidence: `backend/server.js`)
- API server → Plan operations: registers routes (evidence: `backend/server.js`)
- API server → Activity log API: registers routes (evidence: `backend/server.js`)
- Building operations → Buildings: reads and writes (evidence: `backend/routes/buildingRoutes.js`)
- Building operations → Tenants: reads (evidence: `backend/routes/buildingRoutes.js`)
- Tenant operations → Tenants: reads and writes (evidence: `backend/routes/tenantRoutes.js`)
- Tenant operations → Buildings: reads (evidence: `backend/routes/tenantRoutes.js`)
- Rent operations → Tenants: reads and writes (evidence: `backend/routes/rentroutes.js`)
- Rent operations → Buildings: reads (evidence: `backend/routes/rentroutes.js`)
- Rent operations → Rent records: writes payments (evidence: `backend/routes/rentroutes.js`)
- Payment requests → Payment requests: reads and writes (evidence: `backend/routes/paymentRequestRoutes.js`)
- Payment requests → Tenants: reads (evidence: `backend/routes/paymentRequestRoutes.js`)
- Payment requests → Rent records: records payments (evidence: `backend/routes/paymentRequestRoutes.js`)
- Payment requests → Rent operations: calls payment helpers (evidence: `backend/routes/paymentRequestRoutes.js`)
- Reminder scheduling → Reminder settings: reads and writes (evidence: `backend/routes/Automailroutes.js`)
- Reminder scheduling → Tenants: reads (evidence: `backend/routes/Automailroutes.js`)
- Reminder scheduling → Rent records: reads (evidence: `backend/routes/Automailroutes.js`)
- Reminder scheduling → Buildings: reads (evidence: `backend/routes/Automailroutes.js`)
- Platform operations → Users and plans: reads (evidence: `backend/routes/masterRoutes.js`)
- Platform operations → Buildings: reads (evidence: `backend/routes/masterRoutes.js`)
- Platform operations → Tenants: reads (evidence: `backend/routes/masterRoutes.js`)
- Platform operations → Rent records: reads (evidence: `backend/routes/masterRoutes.js`)
- Platform operations → Payment requests: reads (evidence: `backend/routes/masterRoutes.js`)
- Platform operations → Reminder settings: reads (evidence: `backend/routes/masterRoutes.js`)
- Platform operations → Activity history: reads (evidence: `backend/routes/masterRoutes.js`)
- Plan approvals → Users and plans: updates (evidence: `backend/routes/approvalroutes.js`)
- Plan approvals → Plans: reads (evidence: `backend/routes/approvalroutes.js`)
- Plan operations → Plans: manages
- Activity log API → Activity history: reads
