# sonal-patil04/shestay-girls-hostel architecture

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

- Interactive diagram: https://gitdiagram.com/sonal-patil04/shestay-girls-hostel
- Repository: https://github.com/sonal-patil04/shestay-girls-hostel

## Overview

PG Finder is a client-side PG accommodation browsing and booking site. The primary visitor flow is to search rooms, inspect query-selected room details, submit a booking, and reach a confirmation page; the JavaScript persists bookings in browser storage. The README also documents account registration/login and contact enquiries. The map reflects documented behavior and shown JavaScript calls; admin-page internals and the separate Firebase configuration module were not sampled, so their connections are not inferred.

Main entry points: [`js/script.js`](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js) (Page controller), [`rooms.html`](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/rooms.html) (Room search), [`room-details.html`](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/room-details.html) (Room details), [`index.html`](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/index.html) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Accommodation browsing"]
  node_home["Home page<br/>[index.html]"]
  node_rooms["Room search<br/>[rooms.html]"]
  node_details["Room details<br/>[room-details.html]"]
  node_about["About page<br/>[about.html]"]
  node_facilities["Facilities page<br/>[facilities.html]"]
end

subgraph group_booking["Booking flow"]
  node_bookingform["Booking form<br/>[booking.html]"]
  node_confirmation["Booking confirmation"]
end

subgraph group_engagement["Accounts and enquiries"]
  node_login["Login page<br/>[login.html]"]
  node_register["Registration page<br/>[register.html]"]
  node_contact["Contact page<br/>[contact.html]"]
  node_admin["Admin page<br/>[admin.html]"]
end

subgraph group_runtime["Client runtime and persistence"]
  node_roomdata["Room catalogue<br/>[script.js]"]
  node_controller["Page controller<br/>[script.js]"]
  node_storage[("Browser storage")]
  node_firebasewriter["Firebase writer<br/>[script.js]"]
  node_firebaseconfig["Firebase setup module<br/>[firebase-config.js]"]
  node_styles["Shared styles<br/>[style.css]"]
end

node_visitor(("Visitor"))
node_firebase[("Firebase services")]

node_visitor -->|"opens"| node_home
node_home -->|"browses rooms"| node_rooms
node_rooms -->|"searches and filters"| node_roomdata
node_details -->|"loads by query"| node_roomdata
node_rooms -->|"opens room"| node_details
node_details -->|"links to booking"| node_bookingform
node_bookingform -->|"submits form"| node_controller
node_controller -->|"saves records"| node_storage
node_controller -->|"redirects after booking"| node_confirmation
node_login -->|"submits credentials"| node_controller
node_register -->|"submits account"| node_controller
node_contact -->|"submits enquiry"| node_controller
node_controller -->|"invokes when enabled"| node_firebasewriter
node_firebasewriter -.->|"writes records"| node_firebase
node_about -->|"uses shared styles"| node_styles
node_facilities -->|"uses shared styles"| node_styles

click node_home "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/index.html"
click node_rooms "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/rooms.html"
click node_roomdata "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js"
click node_details "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/room-details.html"
click node_about "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/about.html"
click node_facilities "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/facilities.html"
click node_bookingform "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/booking.html"
click node_confirmation "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/booking-success.html"
click node_login "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/login.html"
click node_register "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/register.html"
click node_contact "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/contact.html"
click node_admin "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/admin.html"
click node_controller "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js"
click node_firebasewriter "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js"
click node_firebaseconfig "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/firebase-config.js"
click node_styles "https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/css/style.css"

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_home,node_rooms,node_details,node_about,node_facilities toneBlue
class node_bookingform,node_confirmation,node_firebase toneAmber
class node_login,node_register,node_contact,node_admin toneMint
class node_roomdata,node_controller,node_storage,node_firebasewriter,node_firebaseconfig,node_styles toneRose
class node_visitor toneIndigo
```

## Components

### Accommodation browsing

- [Home page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/index.html): `index.html`
- [Room search](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/rooms.html): `rooms.html`
- [Room details](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/room-details.html): `room-details.html`
- [About page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/about.html): `about.html`
- [Facilities page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/facilities.html): `facilities.html`

### Booking flow

- [Booking form](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/booking.html): `booking.html`
- [Booking confirmation](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/booking-success.html): `booking-success.html`

### Accounts and enquiries

- [Login page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/login.html): `login.html`
- [Registration page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/register.html): `register.html`
- [Contact page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/contact.html): `contact.html`
- [Admin page](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/admin.html): `admin.html`

### Client runtime and persistence

- [Room catalogue](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js): `js/script.js`
- [Page controller](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js): `js/script.js`
- **Browser storage**
- [Firebase writer](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/script.js): `js/script.js`
- [Firebase setup module](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/js/firebase-config.js): `js/firebase-config.js`
- [Shared styles](https://github.com/sonal-patil04/shestay-girls-hostel/blob/main/css/style.css): `css/style.css`

### Other components

- **Visitor**
- **Firebase services**

## Connections

- Visitor → Home page: opens (evidence: `README.md`)
- Home page → Room search: browses rooms (evidence: `README.md`)
- Room search → Room catalogue: searches and filters (evidence: `README.md`)
- Room details → Room catalogue: loads by query (evidence: `js/script.js`)
- Room search → Room details: opens room (evidence: `README.md`)
- Room details → Booking form: links to booking
- Booking form → Page controller: submits form (evidence: `js/script.js`)
- Page controller → Browser storage: saves records (evidence: `js/script.js`)
- Page controller → Booking confirmation: redirects after booking (evidence: `js/script.js`)
- Login page → Page controller: submits credentials (evidence: `js/script.js`)
- Registration page → Page controller: submits account (evidence: `README.md`)
- Contact page → Page controller: submits enquiry (evidence: `js/script.js`)
- Page controller → Firebase writer: invokes when enabled (evidence: `js/script.js`)
- Firebase writer → Firebase services: writes records (evidence: `js/script.js`)
- About page → Shared styles: uses shared styles (evidence: `README.md`)
- Facilities page → Shared styles: uses shared styles (evidence: `README.md`)
