# shadmansshuvo/edu-verse architecture

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

- Interactive diagram: https://gitdiagram.com/shadmansshuvo/edu-verse
- Repository: https://github.com/shadmansshuvo/edu-verse

## Overview

1. **Overall shape**
   - This is a **Next.js App Router** monolith with clear route-group boundaries: `app/(auth)` for sign-in/sign-up, and `app/(main)` for the product experience.
   - Most business logic is split between **server-rendered pages**, **co-located server actions** (`actions.ts`), and **API route handlers** under `app/api`.

2. **Primary product areas**
   - The main application is organized around the platform’s core domains: **courses**, **modules**, **exams**, **dashboard**, **my-courses**, **profile**, **settings**, **contact**, and **admin/instructor** views.
   - Each domain has its own page entrypoints and often domain-specific components, which keeps feature boundaries visible in the file structure.

3. **Role-based access control boundary**
   - The app is explicitly role-driven: **Student**, **Instructor**, and **Administrator** each have separate pages and dashboards.
   - `middleware.ts` is the main gatekeeper for route protection and likely enforces session presence and role access before the request reaches pages or APIs.

4. **Authentication and session model**
   - Authentication is custom rather than outsourced: `lib/auth.ts`, `lib/session.ts`, and `lib/password.ts` indicate **HTTP-only cookie sessions** with local password handling.
   - Auth flows are handled in `app/(auth)/signin` and `app/(auth)/signup`, with server actions performing the actual credential/session mutations.

5. **Database architecture**
   - Data access is organized as a **raw SQL layer**, not an ORM: the `db/` directory is split by entity (`courses.ts`, `modules.ts`, `exam.ts`, `orders.ts`, `users.ts`, etc.).
   - `db/schema.psql` defines the relational schema, while `db/schemas.ts` and `lib/validators/*` provide validation boundaries for request and form data.
   - The persistent model spans users/roles/permissions, course content, enrollments/orders/payments, exams/attempts/responses, reviews/comments, chat history, notifications, and settings.

6. **Course/content delivery flow**
   - The learning experience centers on **course → module → material** relationships.
   - Course pages and module pages render content and learning tools, while mutations such as adding materials, managing modules, and enrolling students are handled by page-local actions or API routes.
   - Shared components like lesson player, material item, add-material form, and review form sit outside the route tree and are reused across content views.

7. **Exams and assessment subsystem**
   - Exams are modeled as a separate domain with student and instructor experiences.
   - Students interact through exam dashboards, exam forms, and result pages; instructors use list and view components to manage exams and inspect attempts.
   - The presence of `attempt`, `question`, and `response` database modules shows the assessment flow is persisted end-to-end, not computed client-side.

8. **Payments and enrollment lifecycle**
   - Paid enrollment is a first-class workflow: the `payment` subtree includes **initiate**, **success**, **fail**, and **cancel** routes, plus an **IPN webhook**.
   - `lib/sslcommerz.ts` is the payment integration layer, so the payment provider is external, but state reconciliation is local through API callbacks and database writes.
   - Enrollment and order records are therefore coupled to payment status and course access control.

9. **Media and video subsystem**
   - Video delivery is backed by **Mux**, with dedicated routes for **upload URL generation**, **sync**, and **Mux webhooks**.
   - `lib/mux.ts` and `lib/storage.ts` suggest a hybrid media pipeline: upload/asset management is externalized, while course materials and metadata are tracked in PostgreSQL and/or Supabase Storage.

10. **AI features**
   - There are two AI-facing capabilities: an **AI chat assistant** and an **AI quiz generator**.
   - These are isolated behind API routes (`app/api/ai/...`) and surfaced in reusable client components like `ai-chat-widget` and `auto-quiz-generator`.
   - Chat history and cleanup are explicit backend concerns, implying persistence rather than ephemeral prompt handling.

11. **Dashboard, analytics, and admin operations**
   - The dashboard area aggregates platform activity into stats, progress lists, recent attempts, and course/exam summaries.
   - `app/(main)/admin` and `app/(main)/instructor` separate governance from teaching operations, with backend support in `db/admin.ts`, `db/dashboard.ts`, `db/instructor.ts`, and related entity modules.
   - This suggests analytics are precomputed or query-driven from PostgreSQL rather than from a separate analytics service.

12. **Shared UI and presentation layer**
   - `components/` contains cross-cutting UI: navigation, footer, search, theme support, loaders, skeletons, modals, and animated primitives.
   - The app uses modern front-end presentation tooling, but these components are still secondary to the server/data architecture; they mainly shape how route-level data is displayed.

13. **Infrastructure and integration boundaries**
   - The repo’s external dependencies that materially affect architecture are **PostgreSQL**, **Mux**, **SSLCommerz**, and **Supabase Storage**.
   - The app also exposes operational routes such as `setup-admin`, search suggestions, and sitemap generation, which show the project is designed for both runtime functionality and platform bootstrapping.

14. **Data flow summary**
   - Typical request path is: **browser page/component → server action or API route → db layer / external service → PostgreSQL response or webhook-backed update → UI re-render**.
   - The architecture is optimized for server-side authority: access control, business rules, payment state, media sync, and AI persistence all converge on backend routes and the SQL layer.

Main entry points: [`app/(main)/courses/[id]/page.tsx`](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/courses/[id]/page.tsx) (Course detail), [`app/(main)/dashboard/page.tsx`](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/dashboard/page.tsx) (Dashboard), [`app/layout.tsx`](https://github.com/shadmansshuvo/edu-verse/blob/main/app/layout.tsx) (Root layout), [`app/(auth)/layout.tsx`](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/layout.tsx) (Auth layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_auth["Auth routes"]
  node_auth_layout["Auth layout<br/>route layout<br/>[layout.tsx]"]
  node_signin_page["Sign in<br/>auth page<br/>[page.tsx]"]
  node_signup_page["Sign up<br/>auth page<br/>[page.tsx]"]
end

subgraph group_app_main["Main app"]
  node_root_layout["Root layout<br/>next layout<br/>[layout.tsx]"]
  node_main_home["Home<br/>landing page<br/>[page.tsx]"]
  node_dashboard_page["Dashboard<br/>learner view<br/>[page.tsx]"]
  node_courses_page["Courses<br/>catalog page<br/>[page.tsx]"]
  node_course_detail_page["Course detail<br/>course view<br/>[page.tsx]"]
  node_modules_page["Modules<br/>learning page<br/>[page.tsx]"]
  node_module_detail_page["Module detail<br/>module view<br/>[page.tsx]"]
  node_exams_page["Exams<br/>assessment page<br/>[page.tsx]"]
  node_exam_detail_page["Exam detail<br/>assessment view<br/>[page.tsx]"]
  node_exam_result_page["Exam result<br/>result page<br/>[page.tsx]"]
  node_admin_page["Admin<br/>[page.tsx]"]
  node_instructor_page["Instructor<br/>teaching view<br/>[page.tsx]"]
  node_profile_page["Profile<br/>account page<br/>[page.tsx]"]
  node_settings_page["Settings<br/>[page.tsx]"]
  node_payment_routes["Payments<br/>checkout flow<br/>[page.tsx]"]
end

subgraph group_app_api["API routes"]
  node_api_ai["AI APIs<br/>ai routes<br/>[route.ts]"]
  node_api_payment["Payment APIs<br/>payment routes<br/>[route.ts]"]
  node_api_video["Video APIs<br/>media routes<br/>[route.ts]"]
  node_api_ops["Ops APIs<br/>utility routes<br/>[route.ts]"]
end

subgraph group_core["Core services"]
  node_middleware{{"Middleware<br/>access control<br/>[middleware.ts]"}}
  node_auth_lib["Auth core<br/>session auth<br/>[auth.ts]"]
  node_integration_libs["Integrations<br/>external adapters<br/>[mux.ts]"]
  node_validator_libs["Validators<br/>input validation<br/>[settings.ts]"]
end

subgraph group_db["Data layer"]
  node_db_users[("Users<br/>sql access<br/>[users.ts]")]
  node_db_courses[("Courses<br/>sql access<br/>[courses.ts]")]
  node_db_learning[("Learning<br/>sql access<br/>[modules.ts]")]
  node_db_assessment[("Assessment<br/>sql access<br/>[exam.ts]")]
  node_db_commerce[("Commerce<br/>sql access<br/>[orders.ts]")]
  node_db_communication[("Communication<br/>sql access<br/>[chat.ts]")]
end

subgraph group_ui["Shared UI"]
  node_shared_ui["Shared UI<br/>ui components<br/>[navbar.tsx]"]
end

node_root_layout -->|"wraps"| node_auth_layout
node_root_layout -->|"wraps"| node_main_home
node_auth_layout -->|"hosts"| node_signin_page
node_auth_layout -->|"hosts"| node_signup_page
node_main_home -.->|"navigates"| node_dashboard_page
node_main_home -.->|"navigates"| node_courses_page
node_courses_page -->|"drills into"| node_course_detail_page
node_course_detail_page -->|"links learning"| node_modules_page
node_modules_page -->|"drills into"| node_module_detail_page
node_exams_page -->|"drills into"| node_exam_detail_page
node_exam_detail_page -->|"shows result"| node_exam_result_page
node_dashboard_page -.->|"tracks"| node_exams_page
node_course_detail_page -->|"checkout"| node_payment_routes
node_admin_page -.->|"analyzes"| node_dashboard_page
node_instructor_page -.->|"manages"| node_courses_page
node_profile_page -.->|"configures"| node_settings_page
node_signin_page -->|"uses"| node_auth_lib
node_signup_page -->|"uses"| node_auth_lib
node_middleware -->|"checks"| node_auth_lib
node_root_layout -->|"protected by"| node_middleware
node_api_ai -->|"persists"| node_db_communication
node_api_ai -->|"validates"| node_validator_libs
node_api_payment -->|"calls"| node_integration_libs
node_api_payment -->|"updates"| node_db_commerce
node_api_video -->|"calls"| node_integration_libs
node_api_video -->|"updates"| node_db_courses
node_api_ops -->|"reads"| node_db_courses
node_api_ops -->|"reads"| node_db_users
node_settings_page -->|"uses"| node_validator_libs
node_settings_page -->|"writes"| node_db_users
node_course_detail_page -->|"reads"| node_db_courses
node_course_detail_page -->|"writes"| node_db_commerce
node_module_detail_page -->|"reads"| node_db_learning
node_exam_detail_page -->|"reads"| node_db_assessment
node_admin_page -->|"reads"| node_db_users
node_instructor_page -->|"reads"| node_db_assessment
node_dashboard_page -->|"reads"| node_db_learning
node_dashboard_page -->|"reads"| node_db_assessment
node_shared_ui -.->|"supports"| node_course_detail_page
node_shared_ui -.->|"supports"| node_dashboard_page

click node_root_layout "https://github.com/shadmansshuvo/edu-verse/blob/main/app/layout.tsx"
click node_auth_layout "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/layout.tsx"
click node_signin_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/signin/page.tsx"
click node_signup_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/signup/page.tsx"
click node_main_home "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/page.tsx"
click node_dashboard_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/dashboard/page.tsx"
click node_courses_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/courses/page.tsx"
click node_course_detail_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/courses/[id]/page.tsx"
click node_modules_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/modules/page.tsx"
click node_module_detail_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/modules/[id]/page.tsx"
click node_exams_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/exams/page.tsx"
click node_exam_detail_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/exams/[id]/page.tsx"
click node_exam_result_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/exams/[id]/result/[attemptId]/page.tsx"
click node_admin_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/admin/page.tsx"
click node_instructor_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/instructor/page.tsx"
click node_profile_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/profile/page.tsx"
click node_settings_page "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/settings/page.tsx"
click node_payment_routes "https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/payment/success/page.tsx"
click node_api_ai "https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/ai/chat/route.ts"
click node_api_payment "https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/payment/initiate/route.ts"
click node_api_video "https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/video/upload-url/route.ts"
click node_api_ops "https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/search/suggestions/route.ts"
click node_middleware "https://github.com/shadmansshuvo/edu-verse/blob/main/middleware.ts"
click node_auth_lib "https://github.com/shadmansshuvo/edu-verse/blob/main/lib/auth.ts"
click node_integration_libs "https://github.com/shadmansshuvo/edu-verse/blob/main/lib/mux.ts"
click node_validator_libs "https://github.com/shadmansshuvo/edu-verse/blob/main/lib/validators/settings.ts"
click node_db_users "https://github.com/shadmansshuvo/edu-verse/blob/main/db/users.ts"
click node_db_courses "https://github.com/shadmansshuvo/edu-verse/blob/main/db/courses.ts"
click node_db_learning "https://github.com/shadmansshuvo/edu-verse/blob/main/db/modules.ts"
click node_db_assessment "https://github.com/shadmansshuvo/edu-verse/blob/main/db/exam.ts"
click node_db_commerce "https://github.com/shadmansshuvo/edu-verse/blob/main/db/orders.ts"
click node_db_communication "https://github.com/shadmansshuvo/edu-verse/blob/main/db/chat.ts"
click node_shared_ui "https://github.com/shadmansshuvo/edu-verse/blob/main/components/navbar.tsx"

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_auth_layout,node_signin_page,node_signup_page toneBlue
class node_root_layout,node_main_home,node_dashboard_page,node_courses_page,node_course_detail_page,node_modules_page,node_module_detail_page,node_exams_page,node_exam_detail_page,node_exam_result_page,node_admin_page,node_instructor_page,node_profile_page,node_settings_page,node_payment_routes toneAmber
class node_api_ai,node_api_payment,node_api_video,node_api_ops toneMint
class node_middleware,node_auth_lib,node_integration_libs,node_validator_libs toneRose
class node_db_users,node_db_courses,node_db_learning,node_db_assessment,node_db_commerce,node_db_communication toneIndigo
class node_shared_ui toneTeal
```

## Components

### Auth routes

Sign-in and sign-up flows.

- [Auth layout](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/layout.tsx): route layout · Shared shell for sign-in and sign-up. · `app/(auth)/layout.tsx`
- [Sign in](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/signin/page.tsx): auth page · Credential entrypoint for existing users. · `app/(auth)/signin/page.tsx`
- [Sign up](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(auth)/signup/page.tsx): auth page · Account creation entrypoint. · `app/(auth)/signup/page.tsx`

### Main app

Primary product routes and role-based experiences.

- [Root layout](https://github.com/shadmansshuvo/edu-verse/blob/main/app/layout.tsx): next layout · Global application shell. · `app/layout.tsx`
- [Home](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/page.tsx): landing page · Primary entry route for the product. · `app/(main)/page.tsx`
- [Dashboard](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/dashboard/page.tsx): learner view · Progress, attempts, and course activity overview. · `app/(main)/dashboard/page.tsx`
- [Courses](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/courses/page.tsx): catalog page · Course discovery and filtering. · `app/(main)/courses/page.tsx`
- [Course detail](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/courses/[id]/page.tsx): course view · Single course page with curriculum and enrollment. · `app/(main)/courses/[id]/page.tsx`
- [Modules](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/modules/page.tsx): learning page · Module browsing entrypoint. · `app/(main)/modules/page.tsx`
- [Module detail](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/modules/[id]/page.tsx): module view · Single module page for lessons and materials. · `app/(main)/modules/[id]/page.tsx`
- [Exams](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/exams/page.tsx): assessment page · Student and instructor exam dashboards. · `app/(main)/exams/page.tsx`
- [Exam detail](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/exams/[id]/page.tsx): assessment view · Single exam page with role-specific controls. · `app/(main)/exams/[id]/page.tsx`
- [Exam result](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/exams/[id]/result/[attemptId]/page.tsx): result page · Attempt result and scoring view. · `app/(main)/exams/[id]/result/[attemptId]/page.tsx`
- [Admin](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/admin/page.tsx): admin view · Administrative control and analytics entrypoint. · `app/(main)/admin/page.tsx`
- [Instructor](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/instructor/page.tsx): teaching view · Instructor workspace for course and exam management. · `app/(main)/instructor/page.tsx`
- [Profile](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/profile/page.tsx): account page · User profile and avatar management. · `app/(main)/profile/page.tsx`
- [Settings](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/settings/page.tsx): account settings · Preferences, security, and role-specific settings. · `app/(main)/settings/page.tsx`
- [Payments](https://github.com/shadmansshuvo/edu-verse/blob/main/app/(main)/payment/success/page.tsx): checkout flow · Success, failure, cancel, initiate, and IPN routes. · `app/(main)/payment/success/page.tsx`

### API routes

Mutation and integration handlers.

- [AI APIs](https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/ai/chat/route.ts): ai routes · Chat and quiz generation endpoints. · `app/api/ai/chat/route.ts`
- [Payment APIs](https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/payment/initiate/route.ts): payment routes · Provider callbacks and checkout reconciliation. · `app/api/payment/initiate/route.ts`
- [Video APIs](https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/video/upload-url/route.ts): media routes · Mux upload, sync, and webhook handlers. · `app/api/video/upload-url/route.ts`
- [Ops APIs](https://github.com/shadmansshuvo/edu-verse/blob/main/app/api/search/suggestions/route.ts): utility routes · Search, modules, my-courses, and admin bootstrap endpoints. · `app/api/search/suggestions/route.ts`

### Core services

Authentication, middleware, validation, and external adapters.

- [Middleware](https://github.com/shadmansshuvo/edu-verse/blob/main/middleware.ts): access control · Route protection and role enforcement. · `middleware.ts`
- [Auth core](https://github.com/shadmansshuvo/edu-verse/blob/main/lib/auth.ts): session auth · Local session and password handling. · `lib/auth.ts`
- [Integrations](https://github.com/shadmansshuvo/edu-verse/blob/main/lib/mux.ts): external adapters · Mux, SSLCommerz, and storage helpers. · `lib/mux.ts`
- [Validators](https://github.com/shadmansshuvo/edu-verse/blob/main/lib/validators/settings.ts): input validation · Request and settings validation boundary. · `lib/validators/settings.ts`

### Data layer

Raw SQL persistence by domain.

- [Users](https://github.com/shadmansshuvo/edu-verse/blob/main/db/users.ts): sql access · Users, roles, permissions, sessions, and settings. · `db/users.ts`
- [Courses](https://github.com/shadmansshuvo/edu-verse/blob/main/db/courses.ts): sql access · Courses, subjects, enrollments, materials, and reviews. · `db/courses.ts`
- [Learning](https://github.com/shadmansshuvo/edu-verse/blob/main/db/modules.ts): sql access · Modules, progress, comments, and dashboard data. · `db/modules.ts`
- [Assessment](https://github.com/shadmansshuvo/edu-verse/blob/main/db/exam.ts): sql access · Exams, attempts, questions, and responses. · `db/exam.ts`
- [Commerce](https://github.com/shadmansshuvo/edu-verse/blob/main/db/orders.ts): sql access · Orders and payment state. · `db/orders.ts`
- [Communication](https://github.com/shadmansshuvo/edu-verse/blob/main/db/chat.ts): sql access · Chat, notifications, and contact records. · `db/chat.ts`

### Shared UI

Reusable app-wide components.

- [Shared UI](https://github.com/shadmansshuvo/edu-verse/blob/main/components/navbar.tsx): ui components · Reusable navigation, chat, media, forms, and settings UI. · `components/navbar.tsx`

## Connections

- Root layout → Auth layout: wraps · Root shell contains the auth route tree.
- Root layout → Home: wraps · Root shell contains the main application routes.
- Auth layout → Sign in: hosts · Auth layout renders sign-in.
- Auth layout → Sign up: hosts · Auth layout renders sign-up.
- Home → Dashboard: navigates · Landing route leads into the dashboard.
- Home → Courses: navigates · Landing route leads into course discovery.
- Courses → Course detail: drills into · Catalog opens an individual course.
- Course detail → Modules: links learning · Course experience connects to module-based learning.
- Modules → Module detail: drills into · Module list opens a single module.
- Exams → Exam detail: drills into · Exam dashboard opens a specific exam.
- Exam detail → Exam result: shows result · Completed attempts surface in result pages.
- Dashboard → Exams: tracks · Dashboard aggregates exam activity and attempts.
- Course detail → Payments: checkout · Enrollment flows through payment pages.
- Admin → Dashboard: analyzes · Admin views build on dashboard-style aggregates.
- Instructor → Courses: manages · Instructor workspace relates to course administration.
- Profile → Settings: configures · Profile and preferences are adjacent.
- Sign in → Auth core: uses · Sign-in actions depend on session and password helpers.
- Sign up → Auth core: uses · Sign-up actions depend on local auth helpers.
- Middleware → Auth core: checks · Route protection depends on session state and roles.
- Root layout → Middleware: protected by · Application routes are gated before page execution.
- AI APIs → Communication: persists · Chat history and cleanup are stored server-side.
- AI APIs → Validators: validates · AI requests are validated before execution.
- Payment APIs → Integrations: calls · Payment handlers delegate to SSLCommerz integration.
- Payment APIs → Commerce: updates · Callbacks reconcile orders and payment state.
- Video APIs → Integrations: calls · Video handlers interact with Mux and storage.
- Video APIs → Courses: updates · Video sync updates course material metadata.
- Ops APIs → Courses: reads · Search and learning helpers query course data.
- Ops APIs → Users: reads · Bootstrap and account helpers touch user data.
- Settings → Validators: uses · Settings mutations are validated before persistence.
- Settings → Users: writes · Account and preference changes update user records.
- Course detail → Courses: reads · Course detail pages load catalog and enrollment data.
- Course detail → Commerce: writes · Enroll and pay actions affect commerce records.
- Module detail → Learning: reads · Module views pull lesson and material data.
- Exam detail → Assessment: reads · Exam pages load questions, attempts, and responses.
- Admin → Users: reads · Administrative views rely on user and role data.
- Instructor → Assessment: reads · Instructor views inspect exams and attempts.
- Dashboard → Learning: reads · Progress and summary cards aggregate learning data.
- Dashboard → Assessment: reads · Recent attempts and unattempted exams come from assessment data.
- Shared UI → Course detail: supports · Shared UI components are reused across course pages.
- Shared UI → Dashboard: supports · Shared UI components are reused across dashboard views.
