# 0770-lakshya/messwebsite-react architecture

> Architecture diagram of the GitHub repository 0770-lakshya/messwebsite-react, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/0770-lakshya/messwebsite-react
- Repository: https://github.com/0770-lakshya/messwebsite-react

## Overview

Pakadarpanalaya is IIT Bhilai’s static mess portal. Visitors navigate to daily and weekly menus, browse notices and poll results, and view committee and contact information; the menu supports a vegetarian-mode toggle. The complaints desk adds Google sign-in and an institute-domain check before exposing the complaint form/QR flow. The README documents live Google Sheets content and menu data, plus the weekly schedule and committee hierarchy. Source excerpts confirm routing, content and poll loading, and complaint sign-in; menu parsing and several page implementations were not sampled, so their internal wiring is kept minimal.

Main entry points: [`src/App.jsx`](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/App.jsx) (App and routes), [`src/pages/Home.jsx`](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Home.jsx) (Home overview), [`src/pages/Menu.jsx`](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Menu.jsx) (Daily menu), [`src/pages/Complaints.jsx`](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Complaints.jsx) (Complaints desk)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Portal shell"]
  node_app["App and routes<br/>[App.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_dining["Dining information"]
  node_home["Home overview<br/>[Home.jsx]"]
  node_menu_page["Daily menu<br/>[Menu.jsx]"]
  node_weekly["Weekly schedule<br/>[WeeklyMenu.jsx]"]
  node_veg["Vegetarian mode<br/>[VegMode.jsx]"]
  node_menu_hook["Menu loading hook<br/>[useMenu.js]"]
  node_menu_logic["Menu data logic<br/>[menu.js]"]
  node_menu_bits["Menu display components<br/>[MenuBits.jsx]"]
end

subgraph group_community["Community pages"]
  node_committee["Committee hierarchy<br/>[Committee.jsx]"]
  node_contact["Contact information<br/>[Contact.jsx]"]
end

subgraph group_feedback["Feedback and polls"]
  node_poll_data["Poll sheet loader<br/>[pollData.js]"]
  node_complaints["Complaints desk<br/>[Complaints.jsx]"]
end

subgraph group_content["Content and data"]
  node_site_data["Site content<br/>[siteData.js]"]
  node_content_hook["Notices and announcements<br/>[useContent.js]"]
end

node_visitor(("Visitor"))
node_menu_sheet[("Menu spreadsheet")]
node_content_sheet[("Content spreadsheet")]
node_poll_sheet[("Public poll totals")]
node_google_login["Google sign-in"]
node_identity["Google identity service"]
node_complaint_form["Complaint form and QR"]

node_visitor -->|"opens portal"| node_app
node_app -->|"renders routes"| node_layout
node_layout -->|"displays navigation"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_menu_page
node_app -->|"routes to"| node_weekly
node_app -->|"routes to"| node_committee
node_app -->|"routes to"| node_contact
node_app -->|"routes to"| node_complaints
node_home -->|"loads menu"| node_menu_hook
node_menu_page -->|"loads menu"| node_menu_hook
node_weekly -->|"loads schedule"| node_menu_hook
node_menu_hook -->|"calls fetchers"| node_menu_logic
node_menu_logic -->|"fetches and parses"| node_menu_sheet
node_home -->|"reads mode"| node_veg
node_menu_page -->|"uses mode"| node_veg
node_home -->|"loads notices"| node_content_hook
node_content_hook -->|"fetches workbook"| node_content_sheet
node_content_hook -->|"caches locally"| node_content_hook
node_home -->|"loads poll totals"| node_poll_data
node_poll_data -->|"fetches totals"| node_poll_sheet
node_home -->|"reads page content"| node_site_data
node_committee -->|"reads hierarchy"| node_site_data
node_contact -->|"reads contact details"| node_site_data
node_complaints -->|"reads access settings"| node_site_data
node_complaints -->|"starts sign-in"| node_google_login
node_google_login -->|"requests profile"| node_identity
node_complaints -->|"reveals after access check"| node_complaint_form
node_home -->|"renders menu sections"| node_menu_bits
node_menu_page -->|"renders menu sections"| node_menu_bits
node_weekly -->|"renders weekly table"| node_menu_bits

click node_app "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/App.jsx"
click node_layout "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/components/Layout.jsx"
click node_navbar "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/components/Navbar.jsx"
click node_home "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Home.jsx"
click node_menu_page "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Menu.jsx"
click node_weekly "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/WeeklyMenu.jsx"
click node_veg "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/VegMode.jsx"
click node_menu_hook "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/useMenu.js"
click node_menu_logic "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/menu.js"
click node_committee "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Committee.jsx"
click node_contact "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Contact.jsx"
click node_site_data "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/data/siteData.js"
click node_content_hook "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/useContent.js"
click node_menu_bits "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/components/MenuBits.jsx"
click node_poll_data "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/data/pollData.js"
click node_complaints "https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Complaints.jsx"

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_navbar toneBlue
class node_home,node_menu_page,node_weekly,node_veg,node_menu_hook,node_menu_logic,node_menu_bits,node_menu_sheet,node_content_sheet,node_poll_sheet toneAmber
class node_committee,node_contact toneMint
class node_poll_data,node_complaints toneRose
class node_site_data,node_content_hook,node_visitor,node_google_login,node_identity,node_complaint_form toneIndigo
```

## Components

### Portal shell

- [App and routes](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/App.jsx): `src/App.jsx`
- [Shared layout](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/components/Layout.jsx): `src/components/Layout.jsx`
- [Navigation](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/components/Navbar.jsx): `src/components/Navbar.jsx`

### Dining information

- [Home overview](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Daily menu](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Menu.jsx): `src/pages/Menu.jsx`
- [Weekly schedule](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/WeeklyMenu.jsx): `src/pages/WeeklyMenu.jsx`
- [Vegetarian mode](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/VegMode.jsx): `src/lib/VegMode.jsx`
- [Menu loading hook](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/useMenu.js): `src/lib/useMenu.js`
- [Menu data logic](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/menu.js): `src/lib/menu.js`
- [Menu display components](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/components/MenuBits.jsx): `src/components/MenuBits.jsx`

### Community pages

- [Committee hierarchy](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Committee.jsx): `src/pages/Committee.jsx`
- [Contact information](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Contact.jsx): `src/pages/Contact.jsx`

### Feedback and polls

- [Poll sheet loader](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/data/pollData.js): `src/data/pollData.js`
- [Complaints desk](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/pages/Complaints.jsx): `src/pages/Complaints.jsx`

### Content and data

- [Site content](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/data/siteData.js): `src/data/siteData.js`
- [Notices and announcements](https://github.com/0770-lakshya/messwebsite-react/blob/master/src/lib/useContent.js): `src/lib/useContent.js`

### Other components

- **Visitor**
- **Menu spreadsheet**
- **Content spreadsheet**
- **Public poll totals**
- **Google sign-in**
- **Google identity service**
- **Complaint form and QR**

## Connections

- Visitor → App and routes: opens portal
- App and routes → Shared layout: renders routes
- Shared layout → Navigation: displays navigation
- App and routes → Home overview: routes to
- App and routes → Daily menu: routes to
- App and routes → Weekly schedule: routes to
- App and routes → Committee hierarchy: routes to
- App and routes → Contact information: routes to
- App and routes → Complaints desk: routes to
- Home overview → Menu loading hook: loads menu
- Daily menu → Menu loading hook: loads menu
- Weekly schedule → Menu loading hook: loads schedule
- Menu loading hook → Menu data logic: calls fetchers
- Menu data logic → Menu spreadsheet: fetches and parses
- Home overview → Vegetarian mode: reads mode
- Daily menu → Vegetarian mode: uses mode
- Home overview → Notices and announcements: loads notices
- Notices and announcements → Content spreadsheet: fetches workbook
- Notices and announcements → Notices and announcements: caches locally
- Home overview → Poll sheet loader: loads poll totals
- Poll sheet loader → Public poll totals: fetches totals
- Home overview → Site content: reads page content
- Committee hierarchy → Site content: reads hierarchy
- Contact information → Site content: reads contact details
- Complaints desk → Site content: reads access settings
- Complaints desk → Google sign-in: starts sign-in
- Google sign-in → Google identity service: requests profile
- Complaints desk → Complaint form and QR: reveals after access check
- Home overview → Menu display components: renders menu sections
- Daily menu → Menu display components: renders menu sections
- Weekly schedule → Menu display components: renders weekly table
