# norms7/ijed-experiment architecture

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

- Interactive diagram: https://gitdiagram.com/norms7/ijed-experiment
- Repository: https://github.com/norms7/ijed-experiment

## Overview

IJED LMS is a browser-based, role-based learning management system whose static frontend communicates directly with Supabase. Users authenticate, enter a role-specific dashboard, and complete administration, teaching, or student learning tasks through frontend controllers and a shared Supabase API. The product also includes calendar, attendance, notifications, and student performance analytics. README capabilities guide inclusion of unsampled areas; source excerpts directly support only selected controller and API interactions, so uncertain internal wiring is omitted.

Main entry points: [`lms-frontend/assets/js/lms-supabase-api.js`](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/lms-supabase-api.js) (Supabase API), [`lms-frontend/controllers/dashboard.controller.js`](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/dashboard.controller.js) (Role dashboard), [`lms-frontend/index.html`](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/index.html) (LMS interface), [`lms-frontend/assets/js/app.js`](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/app.js) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser application"]
  node_frontend["LMS interface<br/>[index.html]"]
  node_app["App bootstrap<br/>[app.js]"]
  node_auth["Authentication<br/>[auth.controller.js]"]
  node_dashboard["Role dashboard"]
  node_api["Supabase API"]
  node_notifications["Notifications"]
end

subgraph group_learning["Learning workflows"]
  node_teacherwork["Modules and grading"]
  node_gradebook["Teacher gradebook"]
  node_studentwork["Activity submissions"]
  node_calendar["Calendar and todos"]
  node_attendance["Attendance"]
end

subgraph group_admin["Administration"]
  node_adminwork["Admin management"]
  node_adminfn["Protected user creation<br/>[index.ts]"]
end

subgraph group_analytics["Analytics"]
  node_analyticsui["Analytics interface"]
  node_analyticsengine["Analytics calculations"]
end

subgraph group_backend["Supabase backend"]
  node_supabase["Supabase services"]
  node_database[("PostgreSQL data<br/>[01_schema.sql]")]
  node_security["RLS policies"]
  node_rpc["Analytics RPCs<br/>[03_functions.sql]"]
end

node_administrator(("Administrator"))
node_teacher(("Teacher"))
node_student(("Student"))

node_administrator -->|"uses"| node_frontend
node_teacher -->|"uses"| node_frontend
node_student -->|"uses"| node_frontend
node_frontend -->|"loads"| node_app
node_app -->|"starts"| node_auth
node_app -->|"restores session"| node_dashboard
node_auth -->|"authenticates through"| node_api
node_dashboard -->|"loads data through"| node_api
node_dashboard -->|"routes admin"| node_adminwork
node_dashboard -->|"routes teacher"| node_teacherwork
node_dashboard -->|"routes student"| node_studentwork
node_dashboard -->|"opens gradebook"| node_gradebook
node_adminwork -->|"manages records through"| node_api
node_adminwork -->|"creates accounts through"| node_adminfn
node_teacherwork -->|"manages coursework through"| node_api
node_gradebook -->|"loads grade data through"| node_api
node_studentwork -->|"submits work through"| node_api
node_calendar -->|"loads activities through"| node_api
node_attendance -->|"records attendance through"| node_api
node_notifications -->|"loads notifications through"| node_api
node_analyticsui -->|"requests analysis"| node_analyticsengine
node_analyticsengine -->|"reads academic data through"| node_api
node_analyticsengine -->|"calls protected analysis"| node_rpc
node_api -->|"requests data and auth"| node_supabase
node_adminfn -->|"uses privileged auth and data"| node_supabase
node_supabase -->|"reads and writes"| node_database
node_security -->|"restricts access"| node_database
node_rpc -->|"computes aggregates from"| node_database
node_supabase -->|"enforces"| node_security

click node_frontend "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/index.html"
click node_app "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/app.js"
click node_auth "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/auth.controller.js"
click node_dashboard "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/dashboard.controller.js"
click node_api "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/lms-supabase-api.js"
click node_adminwork "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/admin.controller.js"
click node_adminfn "https://github.com/norms7/ijed-experiment/blob/main/supabase/functions/admin-create-user/index.ts"
click node_teacherwork "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/teacher.controller.js"
click node_gradebook "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/gradebook.controller.js"
click node_studentwork "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/student.controller.js"
click node_calendar "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/calendar.controller.js"
click node_attendance "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/attendance.controller.js"
click node_notifications "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/notification.controller.js"
click node_analyticsui "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/analytics.controller.js"
click node_analyticsengine "https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/analytics.engine.js"
click node_database "https://github.com/norms7/ijed-experiment/blob/main/supabase-migration/01_schema.sql"
click node_security "https://github.com/norms7/ijed-experiment/blob/main/supabase-migration/02_rls_policies.sql"
click node_rpc "https://github.com/norms7/ijed-experiment/blob/main/supabase-migration/03_functions.sql"

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_frontend,node_app,node_auth,node_dashboard,node_api,node_notifications toneBlue
class node_teacherwork,node_gradebook,node_studentwork,node_calendar,node_attendance toneAmber
class node_adminwork,node_adminfn toneMint
class node_analyticsui,node_analyticsengine toneRose
class node_supabase,node_database,node_security,node_rpc,node_administrator,node_teacher,node_student toneIndigo
```

## Components

### Browser application

- [LMS interface](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/index.html): `lms-frontend/index.html`
- [App bootstrap](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/app.js): `lms-frontend/assets/js/app.js`
- [Authentication](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/auth.controller.js): `lms-frontend/controllers/auth.controller.js`
- [Role dashboard](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/dashboard.controller.js): `lms-frontend/controllers/dashboard.controller.js`
- [Supabase API](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/lms-supabase-api.js): `lms-frontend/assets/js/lms-supabase-api.js`
- [Notifications](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/notification.controller.js): `lms-frontend/controllers/notification.controller.js`

### Learning workflows

- [Modules and grading](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/teacher.controller.js): `lms-frontend/controllers/teacher.controller.js`
- [Teacher gradebook](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/gradebook.controller.js): `lms-frontend/controllers/gradebook.controller.js`
- [Activity submissions](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/student.controller.js): `lms-frontend/controllers/student.controller.js`
- [Calendar and todos](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/calendar.controller.js): `lms-frontend/controllers/calendar.controller.js`
- [Attendance](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/attendance.controller.js): `lms-frontend/controllers/attendance.controller.js`

### Administration

- [Admin management](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/admin.controller.js): `lms-frontend/controllers/admin.controller.js`
- [Protected user creation](https://github.com/norms7/ijed-experiment/blob/main/supabase/functions/admin-create-user/index.ts): `supabase/functions/admin-create-user/index.ts`

### Analytics

- [Analytics interface](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/controllers/analytics.controller.js): `lms-frontend/controllers/analytics.controller.js`
- [Analytics calculations](https://github.com/norms7/ijed-experiment/blob/main/lms-frontend/assets/js/analytics.engine.js): `lms-frontend/assets/js/analytics.engine.js`

### Supabase backend

- **Supabase services**
- [PostgreSQL data](https://github.com/norms7/ijed-experiment/blob/main/supabase-migration/01_schema.sql): `supabase-migration/01_schema.sql`
- [RLS policies](https://github.com/norms7/ijed-experiment/blob/main/supabase-migration/02_rls_policies.sql): `supabase-migration/02_rls_policies.sql`
- [Analytics RPCs](https://github.com/norms7/ijed-experiment/blob/main/supabase-migration/03_functions.sql): `supabase-migration/03_functions.sql`

### Other components

- **Administrator**
- **Teacher**
- **Student**

## Connections

- Administrator → LMS interface: uses
- Teacher → LMS interface: uses
- Student → LMS interface: uses
- LMS interface → App bootstrap: loads
- App bootstrap → Authentication: starts
- App bootstrap → Role dashboard: restores session
- Authentication → Supabase API: authenticates through
- Role dashboard → Supabase API: loads data through
- Role dashboard → Admin management: routes admin
- Role dashboard → Modules and grading: routes teacher
- Role dashboard → Activity submissions: routes student
- Role dashboard → Teacher gradebook: opens gradebook
- Admin management → Supabase API: manages records through
- Admin management → Protected user creation: creates accounts through
- Modules and grading → Supabase API: manages coursework through
- Teacher gradebook → Supabase API: loads grade data through
- Activity submissions → Supabase API: submits work through
- Calendar and todos → Supabase API: loads activities through
- Attendance → Supabase API: records attendance through
- Notifications → Supabase API: loads notifications through
- Analytics interface → Analytics calculations: requests analysis
- Analytics calculations → Supabase API: reads academic data through
- Analytics calculations → Analytics RPCs: calls protected analysis
- Supabase API → Supabase services: requests data and auth
- Protected user creation → Supabase services: uses privileged auth and data
- Supabase services → PostgreSQL data: reads and writes
- RLS policies → PostgreSQL data: restricts access
- Analytics RPCs → PostgreSQL data: computes aggregates from
- Supabase services → RLS policies: enforces
