# saranda-webad/saranda_website_project architecture

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

- Interactive diagram: https://gitdiagram.com/saranda-webad/saranda_website_project
- Repository: https://github.com/saranda-webad/saranda_website_project

## Overview

Saranda House’s Next.js site is a public hub for the IIT Madras BS student house. Visitors browse its home and community pages, events, meetups, gallery, team information, links, and newsletter; route-level pages fetch Sanity content through shared CMS helpers and render it with feature-specific UI. The sampled code confirms the CMS/image path, shared navigation, gallery interactions, and event presentation. Other documented site areas are represented from the tree and README; their internal calls were not sampled, so those links are omitted.

Main entry points: [`lib/cmsdata.js`](https://github.com/saranda-webad/saranda_website_project/blob/main/lib/cmsdata.js) (CMS data services), [`app/layout.js`](https://github.com/saranda-webad/saranda_website_project/blob/main/app/layout.js) (Root layout), [`lib/sanity/client.js`](https://github.com/saranda-webad/saranda_website_project/blob/main/lib/sanity/client.js) (Sanity client), [`components/ui/PhotoOverlay.jsx`](https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/PhotoOverlay.jsx) (Photo viewer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Site experience"]
  node_rootlayout["Root layout<br/>[layout.js]"]
  node_navigation["Header navigation<br/>[Header.jsx]"]
  node_navmenu["Navigation menu<br/>[Nav.jsx]"]
  node_footer["Footer links<br/>[Footer.jsx]"]
end

subgraph group_community["Community content"]
  node_home["Home showcase<br/>[page.js]"]
  node_home_sections["Home sections"]
  node_knowus["Know Us<br/>[page.js]"]
  node_teams["Team profiles"]
  node_community_page["Community pages<br/>[page.js]"]
  node_links["Useful links<br/>[page.js]"]
  node_newsletter["Newsletter<br/>[page.js]"]
end

subgraph group_activities["Activities and media"]
  node_events["Events"]
  node_event_post["Event presentation<br/>[EventPost.jsx]"]
  node_meetups["Meetups"]
  node_meetup_post["Meetup presentation<br/>[MeetupPost.jsx]"]
  node_gallery["Art gallery<br/>[page.js]"]
  node_gallery_client["Gallery interaction"]
  node_photo_overlay["Photo viewer<br/>[PhotoOverlay.jsx]"]
end

subgraph group_content["Content services"]
  node_cmsdata["CMS data services<br/>[cmsdata.js]"]
  node_sanityclient["Sanity client<br/>[client.js]"]
  node_sanityqueries["Content queries<br/>[queries.js]"]
end

node_visitor(("Website visitor"))
node_sanity[("Sanity CMS")]

node_visitor -->|"visits site"| node_rootlayout
node_rootlayout -->|"renders"| node_navigation
node_rootlayout -->|"renders"| node_footer
node_navigation -->|"renders"| node_navmenu
node_rootlayout -->|"loads communities"| node_cmsdata
node_footer -->|"loads footer links"| node_cmsdata
node_visitor -->|"opens pages"| node_home
node_home -.->|"renders sections"| node_home_sections
node_knowus -->|"renders teams"| node_teams
node_knowus -->|"loads teams"| node_cmsdata
node_community_page -->|"loads community"| node_cmsdata
node_events -->|"loads events"| node_cmsdata
node_events -->|"renders posts"| node_event_post
node_event_post -->|"opens photos"| node_photo_overlay
node_meetups -->|"loads meetups"| node_cmsdata
node_meetups -->|"renders posts"| node_meetup_post
node_meetup_post -->|"opens photos"| node_photo_overlay
node_gallery -->|"loads pictures"| node_cmsdata
node_gallery -->|"renders gallery"| node_gallery_client
node_gallery_client -->|"opens photos"| node_photo_overlay
node_links -.->|"fetches links"| node_sanityclient
node_cmsdata -->|"fetches content"| node_sanityclient
node_cmsdata -->|"uses queries"| node_sanityqueries
node_sanityclient -.->|"queries"| node_sanity
node_sanityqueries -.->|"defines content requests"| node_sanity

click node_rootlayout "https://github.com/saranda-webad/saranda_website_project/blob/main/app/layout.js"
click node_navigation "https://github.com/saranda-webad/saranda_website_project/blob/main/components/layout/Header.jsx"
click node_navmenu "https://github.com/saranda-webad/saranda_website_project/blob/main/components/layout/Nav.jsx"
click node_footer "https://github.com/saranda-webad/saranda_website_project/blob/main/components/layout/Footer.jsx"
click node_home "https://github.com/saranda-webad/saranda_website_project/blob/main/app/page.js"
click node_home_sections "https://github.com/saranda-webad/saranda_website_project/tree/main/components/ui/home"
click node_knowus "https://github.com/saranda-webad/saranda_website_project/blob/main/app/know_us/page.js"
click node_teams "https://github.com/saranda-webad/saranda_website_project/tree/main/components/ui/know_us"
click node_community_page "https://github.com/saranda-webad/saranda_website_project/blob/main/app/community/%5Bslug%5D/page.js"
click node_events "https://github.com/saranda-webad/saranda_website_project/tree/main/app/events"
click node_event_post "https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/events/EventPost.jsx"
click node_meetups "https://github.com/saranda-webad/saranda_website_project/tree/main/app/meetups"
click node_meetup_post "https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/meetups/MeetupPost.jsx"
click node_gallery "https://github.com/saranda-webad/saranda_website_project/blob/main/app/art_gallery/page.js"
click node_gallery_client "https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/art_gallery/ArtGalleryClient.jsx"
click node_photo_overlay "https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/PhotoOverlay.jsx"
click node_links "https://github.com/saranda-webad/saranda_website_project/blob/main/app/links/page.js"
click node_newsletter "https://github.com/saranda-webad/saranda_website_project/blob/main/app/newsletter/page.js"
click node_cmsdata "https://github.com/saranda-webad/saranda_website_project/blob/main/lib/cmsdata.js"
click node_sanityclient "https://github.com/saranda-webad/saranda_website_project/blob/main/lib/sanity/client.js"
click node_sanityqueries "https://github.com/saranda-webad/saranda_website_project/blob/main/lib/sanity/queries.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_rootlayout,node_navigation,node_navmenu,node_footer toneBlue
class node_home,node_home_sections,node_knowus,node_teams,node_community_page,node_links,node_newsletter,node_sanity toneAmber
class node_events,node_event_post,node_meetups,node_meetup_post,node_gallery,node_gallery_client,node_photo_overlay toneMint
class node_cmsdata,node_sanityclient,node_sanityqueries toneRose
class node_visitor toneIndigo
```

## Components

### Site experience

- [Root layout](https://github.com/saranda-webad/saranda_website_project/blob/main/app/layout.js): `app/layout.js`
- [Header navigation](https://github.com/saranda-webad/saranda_website_project/blob/main/components/layout/Header.jsx): `components/layout/Header.jsx`
- [Navigation menu](https://github.com/saranda-webad/saranda_website_project/blob/main/components/layout/Nav.jsx): `components/layout/Nav.jsx`
- [Footer links](https://github.com/saranda-webad/saranda_website_project/blob/main/components/layout/Footer.jsx): `components/layout/Footer.jsx`

### Community content

- [Home showcase](https://github.com/saranda-webad/saranda_website_project/blob/main/app/page.js): `app/page.js`
- [Home sections](https://github.com/saranda-webad/saranda_website_project/tree/main/components/ui/home): `components/ui/home`
- [Know Us](https://github.com/saranda-webad/saranda_website_project/blob/main/app/know_us/page.js): `app/know_us/page.js`
- [Team profiles](https://github.com/saranda-webad/saranda_website_project/tree/main/components/ui/know_us): `components/ui/know_us`
- [Community pages](https://github.com/saranda-webad/saranda_website_project/blob/main/app/community/%5Bslug%5D/page.js): `app/community/[slug]/page.js`
- [Useful links](https://github.com/saranda-webad/saranda_website_project/blob/main/app/links/page.js): `app/links/page.js`
- [Newsletter](https://github.com/saranda-webad/saranda_website_project/blob/main/app/newsletter/page.js): `app/newsletter/page.js`

### Activities and media

- [Events](https://github.com/saranda-webad/saranda_website_project/tree/main/app/events): `app/events`
- [Event presentation](https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/events/EventPost.jsx): `components/ui/events/EventPost.jsx`
- [Meetups](https://github.com/saranda-webad/saranda_website_project/tree/main/app/meetups): `app/meetups`
- [Meetup presentation](https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/meetups/MeetupPost.jsx): `components/ui/meetups/MeetupPost.jsx`
- [Art gallery](https://github.com/saranda-webad/saranda_website_project/blob/main/app/art_gallery/page.js): `app/art_gallery/page.js`
- [Gallery interaction](https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/art_gallery/ArtGalleryClient.jsx): `components/ui/art_gallery/ArtGalleryClient.jsx`
- [Photo viewer](https://github.com/saranda-webad/saranda_website_project/blob/main/components/ui/PhotoOverlay.jsx): `components/ui/PhotoOverlay.jsx`

### Content services

- [CMS data services](https://github.com/saranda-webad/saranda_website_project/blob/main/lib/cmsdata.js): `lib/cmsdata.js`
- [Sanity client](https://github.com/saranda-webad/saranda_website_project/blob/main/lib/sanity/client.js): `lib/sanity/client.js`
- [Content queries](https://github.com/saranda-webad/saranda_website_project/blob/main/lib/sanity/queries.js): `lib/sanity/queries.js`

### Other components

- **Website visitor**
- **Sanity CMS**

## Connections

- Website visitor → Root layout: visits site (evidence: `README.md`)
- Root layout → Header navigation: renders (evidence: `app/layout.js`)
- Root layout → Footer links: renders (evidence: `app/layout.js`)
- Header navigation → Navigation menu: renders (evidence: `components/layout/Header.jsx`)
- Root layout → CMS data services: loads communities (evidence: `app/layout.js`)
- Footer links → CMS data services: loads footer links (evidence: `components/layout/Footer.jsx`)
- Website visitor → Home showcase: opens pages (evidence: `README.md`)
- Home showcase → Home sections: renders sections (evidence: `app/page.js`)
- Know Us → Team profiles: renders teams (evidence: `app/know_us/page.js`)
- Know Us → CMS data services: loads teams (evidence: `app/know_us/page.js`)
- Community pages → CMS data services: loads community (evidence: `app/community/[slug]/page.js`)
- Events → CMS data services: loads events (evidence: `app/events/current/page.js`)
- Events → Event presentation: renders posts (evidence: `app/events/current/page.js`)
- Event presentation → Photo viewer: opens photos (evidence: `components/ui/events/EventPost.jsx`)
- Meetups → CMS data services: loads meetups (evidence: `app/meetups/[region]/page.js`)
- Meetups → Meetup presentation: renders posts (evidence: `app/meetups/[region]/page.js`)
- Meetup presentation → Photo viewer: opens photos (evidence: `components/ui/meetups/MeetupPost.jsx`)
- Art gallery → CMS data services: loads pictures (evidence: `app/art_gallery/page.js`)
- Art gallery → Gallery interaction: renders gallery (evidence: `app/art_gallery/page.js`)
- Gallery interaction → Photo viewer: opens photos (evidence: `components/ui/art_gallery/ArtGalleryClient.jsx`)
- Useful links → Sanity client: fetches links (evidence: `app/links/page.js`)
- CMS data services → Sanity client: fetches content (evidence: `lib/cmsdata.js`)
- CMS data services → Content queries: uses queries (evidence: `lib/cmsdata.js`)
- Sanity client → Sanity CMS: queries (evidence: `lib/sanity/client.js`)
- Content queries → Sanity CMS: defines content requests (evidence: `lib/sanity/queries.js`)
