# surya-narayanan-k-s/srecieeesb architecture

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

- Interactive diagram: https://gitdiagram.com/surya-narayanan-k-s/srecieeesb
- Repository: https://github.com/surya-narayanan-k-s/srecieeesb

## Overview

IEEE SREC is a public student-branch portal with society chapter pages, event and leadership information, student membership services, and administrative controls. Visitors enter through the routed React app and browse the portal; students can register or access member features, while administrators manage content and visibility. Supabase-backed services provide content and records, and the documented currency and credential capabilities support membership workflows. The sampled app, services, and server establish only some wiring; unsampled page-to-service links are omitted rather than inferred.

Main entry points: [`src/core/App.js`](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/core/App.js) (Routed Application), [`src/lib/supabase.js`](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/lib/supabase.js) (Supabase Client), [`src/utils/currency.js`](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/utils/currency.js) (Forex Calculator), [`src/hooks/useCurrencyExchange.js`](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/hooks/useCurrencyExchange.js) (Currency Polling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portal Experience"]
  node_app["Routed Application<br/>[App.js]"]
  node_home["Home Page<br/>[HomePage.js]"]
end

subgraph group_domain["Branch Information"]
  node_info["Information Pages"]
  node_societies["Society Chapters"]
  node_reports["Event Reports"]
  node_leadership["Leadership Rosters"]
  node_gallery["Gallery<br/>[GalleryPage.js]"]
end

subgraph group_members["Member Services"]
  node_registration["Membership Registration"]
  node_studentportal["Student Portal"]
  node_credential["Credential PDF<br/>[cardPdfHelper.js]"]
  node_currencyhook["Currency Polling"]
  node_currency["Forex Calculator<br/>[currency.js]"]
end

subgraph group_admin["Administration"]
  node_visibility["Page Visibility"]
  node_adminviews["Admin Console"]
end

subgraph group_runtime["Data and Runtime"]
  node_activitiesdata["Activity Data Service"]
  node_membersdata["Member Data Service<br/>[membersService.js]"]
  node_contentdata["Content Data Service<br/>[contentService.js]"]
  node_bearersdata["Leadership Data Service"]
  node_supabaseclient["Supabase Client<br/>[supabase.js]"]
  node_server["HTTP Server<br/>[index.js]"]
  node_static["Static and SPA Handler<br/>[staticHandler.js]"]
end

node_visitor(("Visitor"))
node_student(("Student"))
node_administrator(("Administrator"))
node_supabase[("Supabase")]
node_forexapi["Currency API"]

node_visitor -->|"opens portal"| node_app
node_student -->|"opens portal"| node_app
node_administrator -->|"opens portal"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_info
node_app -->|"routes to"| node_societies
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_leadership
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_registration
node_app -->|"routes to"| node_studentportal
node_app -->|"routes to"| node_adminviews
node_currencyhook -->|"calculates with"| node_currency
node_currency -.->|"fetches rates"| node_forexapi
node_visibility -->|"reads and writes"| node_supabaseclient
node_contentdata -->|"reads and writes"| node_supabaseclient
node_membersdata -->|"reads and writes"| node_supabaseclient
node_activitiesdata -->|"reads and writes"| node_supabaseclient
node_bearersdata -->|"reads"| node_supabaseclient
node_supabaseclient -->|"queries"| node_supabase
node_server -->|"dispatches requests"| node_static

click node_app "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/core/App.js"
click node_home "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/home/HomePage.js"
click node_info "https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/info"
click node_societies "https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/societies"
click node_reports "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/reports/EventReportsPage.js"
click node_leadership "https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/office-bearers"
click node_gallery "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/info/GalleryPage.js"
click node_registration "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/student/MembershipRegistrationPage.js"
click node_studentportal "https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/student"
click node_credential "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/utils/cardPdfHelper.js"
click node_currencyhook "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/hooks/useCurrencyExchange.js"
click node_currency "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/utils/currency.js"
click node_visibility "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/hooks/usePageVisibility.js"
click node_adminviews "https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/admin"
click node_activitiesdata "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/database/services/activitiesService.js"
click node_membersdata "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/database/services/membersService.js"
click node_contentdata "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/services/contentService.js"
click node_bearersdata "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/services/officeBearersService.js"
click node_supabaseclient "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/lib/supabase.js"
click node_server "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/server/index.js"
click node_static "https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/server/handlers/staticHandler.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_home toneBlue
class node_info,node_societies,node_reports,node_leadership,node_gallery,node_supabase toneAmber
class node_registration,node_studentportal,node_credential,node_currencyhook,node_currency,node_forexapi toneMint
class node_visibility,node_adminviews toneRose
class node_activitiesdata,node_membersdata,node_contentdata,node_bearersdata,node_supabaseclient,node_server,node_static,node_visitor,node_student,node_administrator toneIndigo
```

## Components

### Portal Experience

- [Routed Application](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/core/App.js): `src/core/App.js`
- [Home Page](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/home/HomePage.js): `src/views/home/HomePage.js`

### Branch Information

- [Information Pages](https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/info): `src/views/info`
- [Society Chapters](https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/societies): `src/views/societies`
- [Event Reports](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/reports/EventReportsPage.js): `src/views/reports/EventReportsPage.js`
- [Leadership Rosters](https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/office-bearers): `src/views/office-bearers`
- [Gallery](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/info/GalleryPage.js): `src/views/info/GalleryPage.js`

### Member Services

- [Membership Registration](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/views/student/MembershipRegistrationPage.js): `src/views/student/MembershipRegistrationPage.js`
- [Student Portal](https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/student): `src/views/student`
- [Credential PDF](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/utils/cardPdfHelper.js): `src/utils/cardPdfHelper.js`
- [Currency Polling](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/hooks/useCurrencyExchange.js): `src/hooks/useCurrencyExchange.js`
- [Forex Calculator](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/utils/currency.js): `src/utils/currency.js`

### Administration

- [Page Visibility](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/hooks/usePageVisibility.js): `src/hooks/usePageVisibility.js`
- [Admin Console](https://github.com/surya-narayanan-k-s/srecieeesb/tree/main/src/views/admin): `src/views/admin`

### Data and Runtime

- [Activity Data Service](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/database/services/activitiesService.js): `src/database/services/activitiesService.js`
- [Member Data Service](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/database/services/membersService.js): `src/database/services/membersService.js`
- [Content Data Service](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/services/contentService.js): `src/services/contentService.js`
- [Leadership Data Service](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/services/officeBearersService.js): `src/services/officeBearersService.js`
- [Supabase Client](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- [HTTP Server](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/server/index.js): `server/index.js`
- [Static and SPA Handler](https://github.com/surya-narayanan-k-s/srecieeesb/blob/main/server/handlers/staticHandler.js): `server/handlers/staticHandler.js`

### Other components

- **Visitor**
- **Student**
- **Administrator**
- **Supabase**
- **Currency API**

## Connections

- Visitor → Routed Application: opens portal
- Student → Routed Application: opens portal
- Administrator → Routed Application: opens portal
- Routed Application → Home Page: routes to
- Routed Application → Information Pages: routes to
- Routed Application → Society Chapters: routes to
- Routed Application → Event Reports: routes to
- Routed Application → Leadership Rosters: routes to
- Routed Application → Gallery: routes to
- Routed Application → Membership Registration: routes to
- Routed Application → Student Portal: routes to
- Routed Application → Admin Console: routes to
- Currency Polling → Forex Calculator: calculates with
- Forex Calculator → Currency API: fetches rates
- Page Visibility → Supabase Client: reads and writes
- Content Data Service → Supabase Client: reads and writes
- Member Data Service → Supabase Client: reads and writes
- Activity Data Service → Supabase Client: reads and writes
- Leadership Data Service → Supabase Client: reads
- Supabase Client → Supabase: queries
- HTTP Server → Static and SPA Handler: dispatches requests
