# sanathmandala391-stack/polyconnect-frontend architecture

> Architecture diagram of the GitHub repository sanathmandala391-stack/polyconnect-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sanathmandala391-stack/polyconnect-frontend
- Repository: https://github.com/sanathmandala391-stack/polyconnect-frontend

## Overview

PolyConnect is a React frontend for public technical-education information and authenticated student, HOD, and administrator services. Users enter through the routed application, browse public services or authenticate, then use role-specific academic, community, and administrative features backed by the PolyConnect API. The graph includes major product areas visible in the source index; several page-to-API details are unsampled, so those links are omitted. The backend is external to this repository; the API client documents SBTET data as backend-proxied.

Main entry points: [`src/App.jsx`](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/App.jsx) (Routes and guards), [`src/api/client.js`](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/api/client.js) (HTTP API client), [`src/components/Layout.jsx`](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/Layout.jsx) (Shared layout), [`src/context/PresenceContext.jsx`](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/PresenceContext.jsx) (Presence state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["Routes and guards<br/>[App.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
  node_header["Government header<br/>[GovHeader.jsx]"]
  node_footer["Government footer<br/>[GovFooter.jsx]"]
end

subgraph group_public["Public information"]
  node_home["Home and updates<br/>[HomePage.jsx]"]
  node_rti["RTI information<br/>[RtiDetailsPage.jsx]"]
  node_publicservices["Public services"]
  node_ecet["ECET papers<br/>[EcetPapersPage.jsx]"]
  node_ecetdata["ECET paper catalog<br/>[papers.js]"]
end

subgraph group_student["Student services"]
  node_studentdash["Student dashboard"]
  node_attendance["Attendance<br/>[AttendancePage.jsx]"]
  node_results["Student results<br/>[ResultsPage.jsx]"]
  node_doubts["Doubt solver<br/>[DoubtsPage.jsx]"]
  node_community["Student community<br/>[CommunityPage.jsx]"]
  node_seniors["Senior connect<br/>[SeniorsPage.jsx]"]
  node_chat["Messaging and calls<br/>[ChatPage.jsx]"]
  node_notifications["Notifications"]
end

subgraph group_admin["Administration and identity"]
  node_authpages["Login and registration"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_adminhome["Admin dashboard"]
  node_hod["HOD services"]
end

subgraph group_integration["API and live state"]
  node_api["HTTP API client<br/>[client.js]"]
  node_presence["Presence state"]
  node_polling["Adaptive polling<br/>[usePolling.js]"]
  node_updates["Updates provider<br/>[UpdatesContext.jsx]"]
end

node_visitor(("Site user"))
node_backend["PolyConnect backend"]

node_visitor -->|"opens"| node_app
node_app -->|"wraps routes"| node_layout
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_rti
node_app -->|"routes to"| node_publicservices
node_app -->|"routes to"| node_authpages
node_app -->|"routes to"| node_adminhome
node_app -->|"routes to"| node_hod
node_app -->|"routes to"| node_studentdash
node_app -->|"routes to"| node_attendance
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_doubts
node_app -->|"routes to"| node_community
node_app -->|"routes to"| node_seniors
node_app -->|"routes to"| node_chat
node_app -->|"routes to"| node_notifications
node_app -->|"routes to"| node_ecet
node_authpages -->|"uses auth"| node_auth
node_auth -->|"requests auth"| node_api
node_presence -->|"sends heartbeat"| node_api
node_presence -->|"reads user"| node_auth
node_app -->|"provides state"| node_presence
node_api -->|"sends requests"| node_backend
node_updates -->|"uses hook"| node_polling
node_updates -->|"fetches updates"| node_api
node_chat -->|"polls data"| node_polling
node_community -->|"polls data"| node_polling
node_adminhome -->|"loads overview"| node_api
node_ecet -->|"reads catalog"| node_ecetdata

click node_app "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/App.jsx"
click node_layout "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/Layout.jsx"
click node_header "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/GovHeader.jsx"
click node_footer "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/GovFooter.jsx"
click node_home "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/HomePage.jsx"
click node_rti "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/RtiDetailsPage.jsx"
click node_publicservices "https://github.com/sanathmandala391-stack/polyconnect-frontend/tree/main/src/pages"
click node_authpages "https://github.com/sanathmandala391-stack/polyconnect-frontend/tree/main/src/pages"
click node_auth "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/AuthContext.jsx"
click node_adminhome "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/admin/AdminDashboardPage.jsx"
click node_hod "https://github.com/sanathmandala391-stack/polyconnect-frontend/tree/main/src/pages/hod"
click node_studentdash "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/StudentDashboardPage.jsx"
click node_attendance "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/AttendancePage.jsx"
click node_results "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/ResultsPage.jsx"
click node_doubts "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/DoubtsPage.jsx"
click node_community "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/CommunityPage.jsx"
click node_seniors "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/SeniorsPage.jsx"
click node_chat "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/ChatPage.jsx"
click node_notifications "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/NotificationsPage.jsx"
click node_api "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/api/client.js"
click node_presence "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/PresenceContext.jsx"
click node_polling "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/hooks/usePolling.js"
click node_updates "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/UpdatesContext.jsx"
click node_ecet "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/ecet/EcetPapersPage.jsx"
click node_ecetdata "https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/data/ecet/papers.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_layout,node_header,node_footer,node_visitor toneBlue
class node_home,node_rti,node_publicservices,node_ecet,node_ecetdata toneAmber
class node_studentdash,node_attendance,node_results,node_doubts,node_community,node_seniors,node_chat,node_notifications toneMint
class node_authpages,node_auth,node_adminhome,node_hod toneRose
class node_api,node_presence,node_polling,node_updates,node_backend toneIndigo
```

## Components

### Application shell

- [Routes and guards](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/App.jsx): `src/App.jsx`
- [Shared layout](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/Layout.jsx): `src/components/Layout.jsx`
- [Government header](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/GovHeader.jsx): `src/components/GovHeader.jsx`
- [Government footer](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/components/GovFooter.jsx): `src/components/GovFooter.jsx`

### Public information

- [Home and updates](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`
- [RTI information](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/RtiDetailsPage.jsx): `src/pages/RtiDetailsPage.jsx`
- [Public services](https://github.com/sanathmandala391-stack/polyconnect-frontend/tree/main/src/pages): `src/pages`
- [ECET papers](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/ecet/EcetPapersPage.jsx): `src/pages/ecet/EcetPapersPage.jsx`
- [ECET paper catalog](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/data/ecet/papers.js): `src/data/ecet/papers.js`

### Student services

- [Student dashboard](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/StudentDashboardPage.jsx): `src/pages/student/StudentDashboardPage.jsx`
- [Attendance](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/AttendancePage.jsx): `src/pages/student/AttendancePage.jsx`
- [Student results](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/ResultsPage.jsx): `src/pages/student/ResultsPage.jsx`
- [Doubt solver](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/DoubtsPage.jsx): `src/pages/student/DoubtsPage.jsx`
- [Student community](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/CommunityPage.jsx): `src/pages/student/CommunityPage.jsx`
- [Senior connect](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/SeniorsPage.jsx): `src/pages/student/SeniorsPage.jsx`
- [Messaging and calls](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/ChatPage.jsx): `src/pages/student/ChatPage.jsx`
- [Notifications](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/student/NotificationsPage.jsx): `src/pages/student/NotificationsPage.jsx`

### Administration and identity

- [Login and registration](https://github.com/sanathmandala391-stack/polyconnect-frontend/tree/main/src/pages): `src/pages`
- [Authentication state](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Admin dashboard](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/pages/admin/AdminDashboardPage.jsx): `src/pages/admin/AdminDashboardPage.jsx`
- [HOD services](https://github.com/sanathmandala391-stack/polyconnect-frontend/tree/main/src/pages/hod): `src/pages/hod`

### API and live state

- [HTTP API client](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/api/client.js): `src/api/client.js`
- [Presence state](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/PresenceContext.jsx): `src/context/PresenceContext.jsx`
- [Adaptive polling](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/hooks/usePolling.js): `src/hooks/usePolling.js`
- [Updates provider](https://github.com/sanathmandala391-stack/polyconnect-frontend/blob/main/src/context/UpdatesContext.jsx): `src/context/UpdatesContext.jsx`

### Other components

- **Site user**
- **PolyConnect backend**

## Connections

- Site user → Routes and guards: opens (evidence: `src/App.jsx`)
- Routes and guards → Shared layout: wraps routes (evidence: `src/App.jsx`)
- Shared layout → Government header: renders (evidence: `src/components/Layout.jsx`)
- Shared layout → Government footer: renders (evidence: `src/components/Layout.jsx`)
- Routes and guards → Home and updates: routes to (evidence: `src/App.jsx`)
- Routes and guards → RTI information: routes to (evidence: `src/App.jsx`)
- Routes and guards → Public services: routes to (evidence: `src/App.jsx`)
- Routes and guards → Login and registration: routes to (evidence: `src/App.jsx`)
- Routes and guards → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Routes and guards → HOD services: routes to (evidence: `src/App.jsx`)
- Routes and guards → Student dashboard: routes to (evidence: `src/App.jsx`)
- Routes and guards → Attendance: routes to (evidence: `src/App.jsx`)
- Routes and guards → Student results: routes to (evidence: `src/App.jsx`)
- Routes and guards → Doubt solver: routes to (evidence: `src/App.jsx`)
- Routes and guards → Student community: routes to (evidence: `src/App.jsx`)
- Routes and guards → Senior connect: routes to (evidence: `src/App.jsx`)
- Routes and guards → Messaging and calls: routes to (evidence: `src/App.jsx`)
- Routes and guards → Notifications: routes to (evidence: `src/App.jsx`)
- Routes and guards → ECET papers: routes to (evidence: `src/App.jsx`)
- Login and registration → Authentication state: uses auth (evidence: `src/pages/RegisterStudentPage.jsx`)
- Authentication state → HTTP API client: requests auth (evidence: `src/context/AuthContext.jsx`)
- Presence state → HTTP API client: sends heartbeat (evidence: `src/context/PresenceContext.jsx`)
- Presence state → Authentication state: reads user (evidence: `src/context/PresenceContext.jsx`)
- Routes and guards → Presence state: provides state (evidence: `src/App.jsx`)
- HTTP API client → PolyConnect backend: sends requests (evidence: `src/api/client.js`)
- Updates provider → Adaptive polling: uses hook (evidence: `src/context/UpdatesContext.jsx`)
- Updates provider → HTTP API client: fetches updates (evidence: `src/context/UpdatesContext.jsx`)
- Messaging and calls → Adaptive polling: polls data (evidence: `src/pages/student/ChatPage.jsx`)
- Student community → Adaptive polling: polls data (evidence: `src/pages/student/CommunityPage.jsx`)
- Admin dashboard → HTTP API client: loads overview (evidence: `src/pages/admin/AdminDashboardPage.jsx`)
- ECET papers → ECET paper catalog: reads catalog (evidence: `src/pages/ecet/EcetPapersPage.jsx`)
