# pranayasheela/intramap architecture

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

- Interactive diagram: https://gitdiagram.com/pranayasheela/intramap
- Repository: https://github.com/pranayasheela/intramap

## Overview

#### Purpose and Runtime
IntraMap is a React single-page campus room-navigation application for IIITDMJ’s Computer Center (CC) and LHTC buildings. It supports room search, building/floor exploration, floor-plan display, and demo login/admin flows. Browser startup is rooted at `src/index.js`, which renders the app shell in `src/App.js`; npm/Node runtime metadata is in `package.json`.

#### Application Composition and Navigation
`src/App.js` is the top-level orchestration boundary: it selects page-level experiences and connects the landing, login, administration, building, and floor-plan views. The application appears to use component/state-driven navigation rather than a separately visible route-directory structure.
- `src/App.js`
- `src/LandingPage.jsx`
- `src/Login.js`

#### Discovery and Room-Selection Flow
The landing experience is the primary user entry point. It presents cross-building room discovery and transitions users from a room result toward its building/floor context. Selected room/building/floor state is the key control payload passed into visualization and floor-plan stages.
- `src/LandingPage.jsx`
- `src/BuildingPage.jsx`
- `src/LHTCBuildingPage.jsx`

#### Building Visualization Boundary
CC and LHTC have intentionally separate visual implementations, reflecting different source assets and interaction models. CC is rendered through a building viewer, while LHTC uses an interactive SVG illustration. Both expose floor-level interactions that drive room-panel and floor-plan selection.
- `src/BuildingViewer.jsx`
- `src/LHTCBuildingSVG.jsx`
- `public/Untitled.glb`

#### Floor-Plan Rendering Pipeline
Building-specific router components map a selected floor to the appropriate detailed plan component. This isolates floor-plan content from top-level navigation and allows CC and LHTC floor inventories/layouts to evolve independently.
- `src/FloorPlanRouter.jsx`
- `src/FloorPlanViewer.jsx`
- `src/LHTCFloorPlanRouter.jsx`
- `src/LHTCFloorPlanViewer1.jsx`
- `src/LHTCFloorPlanViewer2.jsx`

#### Identity, Booking, and Admin Boundary
The repository includes a PHP backend alongside the React client. Login and booking are server-side endpoints, with distinct booking handling for LHTC, and a shared database connector. Admin functionality is represented in the frontend as a dedicated page, likely consuming or coordinating with these backend capabilities.
- `src/AdminPage.jsx`
- `backend/login.php`
- `backend/booking.php`
- `backend/lhtc_booking.php`
- `backend/db.php`

#### Presentation and Static Delivery
React components are styled primarily through application/global/login stylesheets. Static browser assets and PWA metadata are served from `public/`; the GLB asset indicates an available or planned 3D-model integration, separate from the documented 2D/SVG navigation path.
- `src/App.css`
- `src/index.css`
- `src/Login.css`
- `public/index.html`
- `public/manifest.json`

Main entry points: [`src/App.js`](https://github.com/pranayasheela/intramap/blob/main/src/App.js) (App shell), [`src/LandingPage.jsx`](https://github.com/pranayasheela/intramap/blob/main/src/LandingPage.jsx) (Room discovery), [`src/AdminPage.jsx`](https://github.com/pranayasheela/intramap/blob/main/src/AdminPage.jsx) (Admin page), [`src/BuildingViewer.jsx`](https://github.com/pranayasheela/intramap/blob/main/src/BuildingViewer.jsx) (CC building viewer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_browser["Browser entry<br/>static host<br/>[index.html]"]
  node_bootstrap["React bootstrap<br/>client entry<br/>[index.js]"]
  node_app["App shell<br/>navigation orchestration<br/>[App.js]"]
  node_landing["Room discovery<br/>landing page<br/>[LandingPage.jsx]"]
  node_login["Login view<br/>identity UI<br/>[Login.js]"]
  node_admin["Admin page<br/>admin UI<br/>[AdminPage.jsx]"]
end

subgraph group_visualization["Building visualization"]
  node_ccpage["CC building page<br/>building selection UI<br/>[BuildingPage.jsx]"]
  node_lhtcpage["LHTC building page<br/>building selection UI"]
  node_ccviewer["CC building viewer<br/>[BuildingViewer.jsx]"]
  node_lhtcsvg["LHTC SVG viewer<br/>interactive SVG"]
  node_ccrouter["CC plan router<br/>floor router"]
  node_ccplans["CC plan viewer<br/>floor-plan renderer"]
  node_lhtcrouter["LHTC plan router<br/>floor router"]
  node_lhtcplans1["LHTC plan viewer 1<br/>floor-plan renderer"]
  node_lhtcplans2["LHTC plan viewer 2<br/>floor-plan renderer"]
  node_glb["CC 3D model<br/>GLB asset<br/>[Untitled.glb]"]
end

subgraph group_server["PHP services"]
  node_loginapi["Login endpoint<br/>PHP endpoint<br/>[login.php]"]
  node_ccbooking["CC booking endpoint<br/>PHP endpoint<br/>[booking.php]"]
  node_lhtcbooking["LHTC booking endpoint<br/>PHP endpoint<br/>[lhtc_booking.php]"]
  node_db[("Database connector<br/>database access<br/>[db.php]")]
end

node_browser -->|"loads SPA"| node_bootstrap
node_bootstrap -->|"renders"| node_app
node_app -->|"primary entry"| node_landing
node_app -->|"identity flow"| node_login
node_app -->|"admin flow"| node_admin
node_landing -->|"CC selection"| node_ccpage
node_landing -->|"LHTC selection"| node_lhtcpage
node_ccpage -->|"building interaction"| node_ccviewer
node_lhtcpage -->|"building interaction"| node_lhtcsvg
node_ccviewer -->|"selected floor"| node_ccrouter
node_lhtcsvg -->|"selected floor"| node_lhtcrouter
node_ccrouter -->|"renders plan"| node_ccplans
node_lhtcrouter -->|"floor plan"| node_lhtcplans1
node_lhtcrouter -->|"floor plan"| node_lhtcplans2
node_ccviewer -.->|"3D asset option"| node_glb
node_login -->|"auth request"| node_loginapi
node_admin -->|"CC booking"| node_ccbooking
node_admin -->|"LHTC booking"| node_lhtcbooking
node_loginapi -->|"uses"| node_db
node_ccbooking -->|"uses"| node_db
node_lhtcbooking -->|"uses"| node_db

click node_browser "https://github.com/pranayasheela/intramap/blob/main/public/index.html"
click node_bootstrap "https://github.com/pranayasheela/intramap/blob/main/src/index.js"
click node_app "https://github.com/pranayasheela/intramap/blob/main/src/App.js"
click node_landing "https://github.com/pranayasheela/intramap/blob/main/src/LandingPage.jsx"
click node_login "https://github.com/pranayasheela/intramap/blob/main/src/Login.js"
click node_admin "https://github.com/pranayasheela/intramap/blob/main/src/AdminPage.jsx"
click node_ccpage "https://github.com/pranayasheela/intramap/blob/main/src/BuildingPage.jsx"
click node_lhtcpage "https://github.com/pranayasheela/intramap/blob/main/src/LHTCBuildingPage.jsx"
click node_ccviewer "https://github.com/pranayasheela/intramap/blob/main/src/BuildingViewer.jsx"
click node_lhtcsvg "https://github.com/pranayasheela/intramap/blob/main/src/LHTCBuildingSVG.jsx"
click node_ccrouter "https://github.com/pranayasheela/intramap/blob/main/src/FloorPlanRouter.jsx"
click node_ccplans "https://github.com/pranayasheela/intramap/blob/main/src/FloorPlanViewer.jsx"
click node_lhtcrouter "https://github.com/pranayasheela/intramap/blob/main/src/LHTCFloorPlanRouter.jsx"
click node_lhtcplans1 "https://github.com/pranayasheela/intramap/blob/main/src/LHTCFloorPlanViewer1.jsx"
click node_lhtcplans2 "https://github.com/pranayasheela/intramap/blob/main/src/LHTCFloorPlanViewer2.jsx"
click node_glb "https://github.com/pranayasheela/intramap/blob/main/public/Untitled.glb"
click node_loginapi "https://github.com/pranayasheela/intramap/blob/main/backend/login.php"
click node_ccbooking "https://github.com/pranayasheela/intramap/blob/main/backend/booking.php"
click node_lhtcbooking "https://github.com/pranayasheela/intramap/blob/main/backend/lhtc_booking.php"
click node_db "https://github.com/pranayasheela/intramap/blob/main/backend/db.php"

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_browser,node_bootstrap,node_app,node_landing,node_login,node_admin toneBlue
class node_ccpage,node_lhtcpage,node_ccviewer,node_lhtcsvg,node_ccrouter,node_ccplans,node_lhtcrouter,node_lhtcplans1,node_lhtcplans2,node_glb toneAmber
class node_loginapi,node_ccbooking,node_lhtcbooking,node_db toneMint
```

## Components

### React client

- [Browser entry](https://github.com/pranayasheela/intramap/blob/main/public/index.html): static host · Serves the SPA shell and PWA metadata. · `public/index.html`
- [React bootstrap](https://github.com/pranayasheela/intramap/blob/main/src/index.js): client entry · `src/index.js`
- [App shell](https://github.com/pranayasheela/intramap/blob/main/src/App.js): navigation orchestration · Selects landing, login, admin, building, and plan experiences. · `src/App.js`
- [Room discovery](https://github.com/pranayasheela/intramap/blob/main/src/LandingPage.jsx): landing page · Searches rooms and carries selected room, building, and floor context. · `src/LandingPage.jsx`
- [Login view](https://github.com/pranayasheela/intramap/blob/main/src/Login.js): identity UI · `src/Login.js`
- [Admin page](https://github.com/pranayasheela/intramap/blob/main/src/AdminPage.jsx): admin UI · `src/AdminPage.jsx`

### Building visualization

- [CC building page](https://github.com/pranayasheela/intramap/blob/main/src/BuildingPage.jsx): building selection UI · `src/BuildingPage.jsx`
- [LHTC building page](https://github.com/pranayasheela/intramap/blob/main/src/LHTCBuildingPage.jsx): building selection UI · `src/LHTCBuildingPage.jsx`
- [CC building viewer](https://github.com/pranayasheela/intramap/blob/main/src/BuildingViewer.jsx): building viewer · Provides CC floor-level interactions. · `src/BuildingViewer.jsx`
- [LHTC SVG viewer](https://github.com/pranayasheela/intramap/blob/main/src/LHTCBuildingSVG.jsx): interactive SVG · Provides LHTC floor-level interactions. · `src/LHTCBuildingSVG.jsx`
- [CC plan router](https://github.com/pranayasheela/intramap/blob/main/src/FloorPlanRouter.jsx): floor router · Maps a selected CC floor to its detailed plan. · `src/FloorPlanRouter.jsx`
- [CC plan viewer](https://github.com/pranayasheela/intramap/blob/main/src/FloorPlanViewer.jsx): floor-plan renderer · `src/FloorPlanViewer.jsx`
- [LHTC plan router](https://github.com/pranayasheela/intramap/blob/main/src/LHTCFloorPlanRouter.jsx): floor router · Maps a selected LHTC floor to its detailed plan. · `src/LHTCFloorPlanRouter.jsx`
- [LHTC plan viewer 1](https://github.com/pranayasheela/intramap/blob/main/src/LHTCFloorPlanViewer1.jsx): floor-plan renderer · `src/LHTCFloorPlanViewer1.jsx`
- [LHTC plan viewer 2](https://github.com/pranayasheela/intramap/blob/main/src/LHTCFloorPlanViewer2.jsx): floor-plan renderer · `src/LHTCFloorPlanViewer2.jsx`
- [CC 3D model](https://github.com/pranayasheela/intramap/blob/main/public/Untitled.glb): GLB asset · Available 3D asset separate from the 2D navigation path. · `public/Untitled.glb`

### PHP services

- [Login endpoint](https://github.com/pranayasheela/intramap/blob/main/backend/login.php): PHP endpoint · `backend/login.php`
- [CC booking endpoint](https://github.com/pranayasheela/intramap/blob/main/backend/booking.php): PHP endpoint · `backend/booking.php`
- [LHTC booking endpoint](https://github.com/pranayasheela/intramap/blob/main/backend/lhtc_booking.php): PHP endpoint · `backend/lhtc_booking.php`
- [Database connector](https://github.com/pranayasheela/intramap/blob/main/backend/db.php): database access · Shared backend database connection. · `backend/db.php`

## Connections

- Browser entry → React bootstrap: loads SPA
- React bootstrap → App shell: renders
- App shell → Room discovery: primary entry
- App shell → Login view: identity flow
- App shell → Admin page: admin flow
- Room discovery → CC building page: CC selection
- Room discovery → LHTC building page: LHTC selection
- CC building page → CC building viewer: building interaction
- LHTC building page → LHTC SVG viewer: building interaction
- CC building viewer → CC plan router: selected floor
- LHTC SVG viewer → LHTC plan router: selected floor
- CC plan router → CC plan viewer: renders plan
- LHTC plan router → LHTC plan viewer 1: floor plan
- LHTC plan router → LHTC plan viewer 2: floor plan
- CC building viewer → CC 3D model: 3D asset option
- Login view → Login endpoint: auth request
- Admin page → CC booking endpoint: CC booking
- Admin page → LHTC booking endpoint: LHTC booking
- Login endpoint → Database connector: uses
- CC booking endpoint → Database connector: uses
- LHTC booking endpoint → Database connector: uses
