# rahulsrepository/lms-public_website architecture

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

- Interactive diagram: https://gitdiagram.com/rahulsrepository/lms-public_website
- Repository: https://github.com/rahulsrepository/lms-public_website

## Overview

C2C Academy is a training-institute website and LMS. Visitors explore courses and institute information, then use staff/student login to reach permission-guarded staff operations or the student learning portal. Staff workflows cover people, academic content, exams, fees, CRM, and campus services; shared LMS state selects demo-local or Supabase-backed operations. The graph follows documented routing and sampled calls; several page-to-store interactions are known from imports but not asserted as calls where excerpts do not show them.

Main entry points: [`src/App.jsx`](https://github.com/rahulsrepository/lms-public_website/blob/main/src/App.jsx) (Route access), [`src/lib/store.jsx`](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/store.jsx) (LMS state and actions), [`src/pages/app/lookups.js`](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/lookups.js) (Domain lookups), [`src/lib/supabase.js`](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/supabase.js) (Supabase adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public and enrollment"]
  node_publicsite["Public pages"]
  node_publiclayout["Public layout<br/>[PublicLayout.jsx]"]
  node_coursecatalog["Course catalog<br/>[catalog.js]"]
end

subgraph group_identity["Identity and access"]
  node_login["Login<br/>[Login.jsx]"]
  node_access["Route access<br/>[App.jsx]"]
  node_permissions["Role permissions<br/>[permissions.js]"]
  node_staffshell["Staff workspace shell<br/>[AppShell.jsx]"]
end

subgraph group_learning["Learning operations"]
  node_studentportal["Student portal<br/>[StudentPortal.jsx]"]
  node_academic["Academic content<br/>[Academic.jsx]"]
  node_exams["Exams and assignments<br/>[Exams.jsx]"]
end

subgraph group_admin["Institute operations"]
  node_people["People management<br/>[People.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_crm["CRM<br/>[Crm.jsx]"]
  node_fees["Fees<br/>[Fees.jsx]"]
  node_desk["Campus services<br/>[Desk.jsx]"]
  node_system["System administration<br/>[System.jsx]"]
end

subgraph group_platform["Shared platform"]
  node_state["LMS state and actions<br/>[store.jsx]"]
  node_lookups["Domain lookups<br/>[lookups.js]"]
  node_demoauth["Demo authentication<br/>[demoAuth.js]"]
  node_supabase["Supabase adapter<br/>[supabase.js]"]
  node_db[("Supabase database<br/>[schema.sql]")]
  node_stafffunction["Create staff function<br/>[index.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_publicsite
node_publicsite -->|"renders"| node_publiclayout
node_publiclayout -->|"reads"| node_coursecatalog
node_visitor -->|"signs in"| node_login
node_login -->|"requests access"| node_state
node_state -->|"verifies locally"| node_demoauth
node_state -->|"uses when configured"| node_supabase
node_supabase -.->|"reads and writes"| node_db
node_supabase -.->|"creates staff"| node_stafffunction
node_state -.->|"provides session"| node_access
node_access -->|"checks roles"| node_permissions
node_access -->|"renders staff"| node_staffshell
node_access -->|"routes students"| node_studentportal
node_staffshell -.->|"hosts routes"| node_dashboard
node_access -->|"routes to"| node_people
node_access -->|"routes to"| node_academic
node_access -->|"routes to"| node_exams
node_access -->|"routes to"| node_fees
node_access -.->|"routes to"| node_crm
node_access -->|"routes to"| node_desk
node_access -->|"routes to"| node_system
node_studentportal -.->|"uses LMS state"| node_state
node_people -->|"uses lookups"| node_lookups
node_academic -->|"uses lookups"| node_lookups
node_exams -->|"uses lookups"| node_lookups
node_fees -->|"uses lookups"| node_lookups
node_crm -->|"uses lookups"| node_lookups
node_desk -->|"uses lookups"| node_lookups
node_dashboard -->|"uses lookups"| node_lookups
node_lookups -->|"reads LMS state"| node_state
node_people -.->|"uses actions"| node_state
node_academic -.->|"uses actions"| node_state
node_exams -.->|"uses actions"| node_state
node_fees -.->|"uses actions"| node_state
node_crm -.->|"uses actions"| node_state
node_desk -.->|"uses actions"| node_state
node_system -->|"uses adapter"| node_supabase

click node_publicsite "https://github.com/rahulsrepository/lms-public_website/tree/main/src/pages/public"
click node_publiclayout "https://github.com/rahulsrepository/lms-public_website/blob/main/src/components/PublicLayout.jsx"
click node_coursecatalog "https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/catalog.js"
click node_login "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/auth/Login.jsx"
click node_access "https://github.com/rahulsrepository/lms-public_website/blob/main/src/App.jsx"
click node_permissions "https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/permissions.js"
click node_staffshell "https://github.com/rahulsrepository/lms-public_website/blob/main/src/components/AppShell.jsx"
click node_studentportal "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/learn/StudentPortal.jsx"
click node_academic "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Academic.jsx"
click node_exams "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Exams.jsx"
click node_people "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/People.jsx"
click node_dashboard "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Dashboard.jsx"
click node_crm "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Crm.jsx"
click node_fees "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Fees.jsx"
click node_desk "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Desk.jsx"
click node_system "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/System.jsx"
click node_state "https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/store.jsx"
click node_lookups "https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/lookups.js"
click node_demoauth "https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/demoAuth.js"
click node_supabase "https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/supabase.js"
click node_db "https://github.com/rahulsrepository/lms-public_website/blob/main/supabase/schema.sql"
click node_stafffunction "https://github.com/rahulsrepository/lms-public_website/blob/main/supabase/functions/create-staff/index.ts"

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_publicsite,node_publiclayout,node_coursecatalog toneBlue
class node_login,node_access,node_permissions,node_staffshell toneAmber
class node_studentportal,node_academic,node_exams toneMint
class node_people,node_dashboard,node_crm,node_fees,node_desk,node_system toneRose
class node_state,node_lookups,node_demoauth,node_supabase,node_db,node_stafffunction,node_visitor toneIndigo
```

## Components

### Public and enrollment

- [Public pages](https://github.com/rahulsrepository/lms-public_website/tree/main/src/pages/public): `src/pages/public`
- [Public layout](https://github.com/rahulsrepository/lms-public_website/blob/main/src/components/PublicLayout.jsx): `src/components/PublicLayout.jsx`
- [Course catalog](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/catalog.js): `src/lib/catalog.js`

### Identity and access

- [Login](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/auth/Login.jsx): `src/pages/auth/Login.jsx`
- [Route access](https://github.com/rahulsrepository/lms-public_website/blob/main/src/App.jsx): `src/App.jsx`
- [Role permissions](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/permissions.js): `src/lib/permissions.js`
- [Staff workspace shell](https://github.com/rahulsrepository/lms-public_website/blob/main/src/components/AppShell.jsx): `src/components/AppShell.jsx`

### Learning operations

- [Student portal](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/learn/StudentPortal.jsx): `src/pages/learn/StudentPortal.jsx`
- [Academic content](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Academic.jsx): `src/pages/app/Academic.jsx`
- [Exams and assignments](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Exams.jsx): `src/pages/app/Exams.jsx`

### Institute operations

- [People management](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/People.jsx): `src/pages/app/People.jsx`
- [Dashboard](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Dashboard.jsx): `src/pages/app/Dashboard.jsx`
- [CRM](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Crm.jsx): `src/pages/app/Crm.jsx`
- [Fees](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Fees.jsx): `src/pages/app/Fees.jsx`
- [Campus services](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/Desk.jsx): `src/pages/app/Desk.jsx`
- [System administration](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/System.jsx): `src/pages/app/System.jsx`

### Shared platform

- [LMS state and actions](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/store.jsx): `src/lib/store.jsx`
- [Domain lookups](https://github.com/rahulsrepository/lms-public_website/blob/main/src/pages/app/lookups.js): `src/pages/app/lookups.js`
- [Demo authentication](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/demoAuth.js): `src/lib/demoAuth.js`
- [Supabase adapter](https://github.com/rahulsrepository/lms-public_website/blob/main/src/lib/supabase.js): `src/lib/supabase.js`
- [Supabase database](https://github.com/rahulsrepository/lms-public_website/blob/main/supabase/schema.sql): `supabase/schema.sql`
- [Create staff function](https://github.com/rahulsrepository/lms-public_website/blob/main/supabase/functions/create-staff/index.ts): `supabase/functions/create-staff/index.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Public pages: browses
- Public pages → Public layout: renders (evidence: `src/pages/public/Home.jsx`)
- Public layout → Course catalog: reads (evidence: `src/components/PublicLayout.jsx`)
- Visitor → Login: signs in
- Login → LMS state and actions: requests access (evidence: `src/pages/auth/Login.jsx`)
- LMS state and actions → Demo authentication: verifies locally (evidence: `src/lib/store.jsx`)
- LMS state and actions → Supabase adapter: uses when configured (evidence: `src/lib/store.jsx`)
- Supabase adapter → Supabase database: reads and writes
- Supabase adapter → Create staff function: creates staff
- LMS state and actions → Route access: provides session (evidence: `src/App.jsx`)
- Route access → Role permissions: checks roles (evidence: `src/App.jsx`)
- Route access → Staff workspace shell: renders staff (evidence: `src/App.jsx`)
- Route access → Student portal: routes students (evidence: `src/App.jsx`)
- Staff workspace shell → Dashboard: hosts routes
- Route access → People management: routes to (evidence: `src/App.jsx`)
- Route access → Academic content: routes to (evidence: `src/App.jsx`)
- Route access → Exams and assignments: routes to (evidence: `src/App.jsx`)
- Route access → Fees: routes to (evidence: `src/App.jsx`)
- Route access → CRM: routes to (evidence: `src/App.jsx`)
- Route access → Campus services: routes to (evidence: `src/App.jsx`)
- Route access → System administration: routes to (evidence: `src/App.jsx`)
- Student portal → LMS state and actions: uses LMS state
- People management → Domain lookups: uses lookups (evidence: `src/pages/app/People.jsx`)
- Academic content → Domain lookups: uses lookups (evidence: `src/pages/app/Academic.jsx`)
- Exams and assignments → Domain lookups: uses lookups (evidence: `src/pages/app/Exams.jsx`)
- Fees → Domain lookups: uses lookups (evidence: `src/pages/app/Fees.jsx`)
- CRM → Domain lookups: uses lookups (evidence: `src/pages/app/Crm.jsx`)
- Campus services → Domain lookups: uses lookups (evidence: `src/pages/app/Desk.jsx`)
- Dashboard → Domain lookups: uses lookups (evidence: `src/pages/app/Dashboard.jsx`)
- Domain lookups → LMS state and actions: reads LMS state (evidence: `src/pages/app/lookups.js`)
- People management → LMS state and actions: uses actions
- Academic content → LMS state and actions: uses actions
- Exams and assignments → LMS state and actions: uses actions
- Fees → LMS state and actions: uses actions
- CRM → LMS state and actions: uses actions
- Campus services → LMS state and actions: uses actions
- System administration → Supabase adapter: uses adapter (evidence: `src/pages/app/System.jsx`)
