# isashaikh/smartedu-platform architecture

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

- Interactive diagram: https://gitdiagram.com/isashaikh/smartedu-platform
- Repository: https://github.com/isashaikh/smartedu-platform

## Overview

Learnexa is a role-based learning platform: instructors create and manage courses, while students discover, preview, enroll in, and consume them. The frontend routes users into role-specific workflows and calls the Spring API; backend controllers delegate course operations to a service that builds course content and enrollment analytics. Separate branches support authentication, profiles, uploaded learning resources, and Gemini-generated descriptions. The graph includes documented features whose implementation was not sampled, but omits uncertain links; edges are grounded in excerpts or README statements.

Main entry points: [`learningpath-dashboard/src/api/course.ts`](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/course.ts) (Course API client), [`learningpath-dashboard/src/routes/AppRoutes.tsx`](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/routes/AppRoutes.tsx) (Role-based routes), [`learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java`](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java) (Course operations), [`learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java`](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_routes["Role-based routes<br/>[AppRoutes.tsx]"]
  node_authui["Sign-in and registration<br/>[AuthForm.tsx]"]
  node_dashboard["Role dashboards"]
  node_courseui["Course workflows"]
  node_profileui["Profile screens"]
  node_courseapi["Course API client<br/>[course.ts]"]
  node_authapi["Authentication client<br/>[user.ts]"]
  node_gemini["Gemini generation<br/>[gemini.ts]"]
  node_catalog["Course catalog"]
  node_preview["Free course previews"]
  node_checkout["Enrollment checkout<br/>[CheckoutPage.tsx]"]
  node_viewer["Course viewer"]
  node_analytics["Course analytics"]
end

subgraph group_identity["Identity and profiles"]
  node_authcontroller["Authentication endpoints"]
  node_authservice["Authentication service"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_userstore[("User repository")]
  node_profile["Profile management"]
  node_cloudinary["Profile image storage"]
end

subgraph group_learning["Course lifecycle"]
  node_coursecontroller["Course endpoints"]
  node_courseservice["Course operations<br/>[CourseService.java]"]
  node_coursedata[("Course and enrollment data")]
  node_enrollmentcontroller["Enrollment endpoints"]
end

subgraph group_content["Learning content"]
  node_resourcecontroller["Resource endpoints"]
  node_resourceservice["Access-controlled resources"]
  node_filestorage["Course file storage"]
  node_localfiles[("Uploaded files")]
end

node_user(("Learner or instructor"))
node_cloudservice[("Cloudinary")]

node_user -->|"opens"| node_routes
node_routes -->|"routes to"| node_authui
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_profileui
node_routes -->|"routes to"| node_courseui
node_authui -.->|"submits credentials"| node_authapi
node_authapi -.->|"calls API"| node_authcontroller
node_authcontroller -->|"delegates"| node_authservice
node_authservice -->|"reads and saves"| node_userstore
node_authservice -->|"issues token"| node_jwt
node_profileui -.->|"calls API"| node_profile
node_profile -->|"reads user"| node_userstore
node_profile -->|"uploads image"| node_cloudinary
node_cloudinary -.->|"stores image"| node_cloudservice
node_dashboard -.->|"shows"| node_catalog
node_catalog -.->|"searches courses"| node_courseapi
node_courseui -.->|"requests course data"| node_courseapi
node_courseapi -.->|"calls API"| node_coursecontroller
node_coursecontroller -->|"delegates"| node_courseservice
node_enrollmentcontroller -->|"delegates"| node_courseservice
node_courseservice -->|"reads and writes"| node_coursedata
node_courseservice -->|"saves PDFs"| node_filestorage
node_filestorage -->|"writes files"| node_localfiles
node_preview -.->|"requests preview"| node_courseapi
node_checkout -.->|"enrolls"| node_courseapi
node_viewer -.->|"loads resources"| node_resourcecontroller
node_resourcecontroller -->|"delegates"| node_resourceservice
node_resourceservice -->|"reads permitted files"| node_localfiles
node_analytics -.->|"requests analytics"| node_courseapi
node_gemini -.->|"generates descriptions"| node_user
node_user -->|"creates courses"| node_courseui
node_user -->|"discovers courses"| node_catalog
node_user -->|"previews course"| node_preview
node_user -->|"enrolls"| node_checkout
node_user -->|"studies course"| node_viewer
node_user -->|"reviews trends"| node_analytics

click node_routes "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/routes/AppRoutes.tsx"
click node_authui "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/components/AuthForm.tsx"
click node_dashboard "https://github.com/isashaikh/smartedu-platform/tree/main/learningpath-dashboard/src/pages/dashboard"
click node_courseui "https://github.com/isashaikh/smartedu-platform/tree/main/learningpath-dashboard/src/pages/course"
click node_profileui "https://github.com/isashaikh/smartedu-platform/tree/main/learningpath-dashboard/src/profile"
click node_courseapi "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/course.ts"
click node_authapi "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/user.ts"
click node_gemini "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/gemini.ts"
click node_authcontroller "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/auth/AuthController.java"
click node_authservice "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java"
click node_jwt "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/config/JwtService.java"
click node_userstore "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/user/UserRepository.java"
click node_profile "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/profile/ProfileController.java"
click node_cloudinary "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/CloudinaryService.java"
click node_coursecontroller "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/controller/CourseController.java"
click node_courseservice "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java"
click node_coursedata "https://github.com/isashaikh/smartedu-platform/tree/main/learningpath/src/main/java/com/smartedu/learningpath/course"
click node_enrollmentcontroller "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/controller/EnrollmentController.java"
click node_resourcecontroller "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/controller/ResourceController.java"
click node_resourceservice "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/ResourceService.java"
click node_filestorage "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/FileStorageService.java"
click node_catalog "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/dashboard/features/student/StudentDashboard.tsx"
click node_preview "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/components/CoursePreviewModal.tsx"
click node_checkout "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/course/CheckoutPage.tsx"
click node_viewer "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/course/CourseViewerPage.tsx"
click node_analytics "https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/course/CourseAnalyticsPage.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_routes,node_authui,node_dashboard,node_courseui,node_profileui,node_courseapi,node_authapi,node_gemini,node_catalog,node_preview,node_checkout,node_viewer,node_analytics toneBlue
class node_authcontroller,node_authservice,node_jwt,node_userstore,node_profile,node_cloudinary,node_cloudservice toneAmber
class node_coursecontroller,node_courseservice,node_coursedata,node_enrollmentcontroller toneMint
class node_resourcecontroller,node_resourceservice,node_filestorage,node_localfiles toneRose
class node_user toneIndigo
```

## Components

### Web experience

- [Role-based routes](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/routes/AppRoutes.tsx): `learningpath-dashboard/src/routes/AppRoutes.tsx`
- [Sign-in and registration](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/components/AuthForm.tsx): `learningpath-dashboard/src/components/AuthForm.tsx`
- [Role dashboards](https://github.com/isashaikh/smartedu-platform/tree/main/learningpath-dashboard/src/pages/dashboard): `learningpath-dashboard/src/pages/dashboard`
- [Course workflows](https://github.com/isashaikh/smartedu-platform/tree/main/learningpath-dashboard/src/pages/course): `learningpath-dashboard/src/pages/course`
- [Profile screens](https://github.com/isashaikh/smartedu-platform/tree/main/learningpath-dashboard/src/profile): `learningpath-dashboard/src/profile`
- [Course API client](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/course.ts): `learningpath-dashboard/src/api/course.ts`
- [Authentication client](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/user.ts): `learningpath-dashboard/src/api/user.ts`
- [Gemini generation](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/api/gemini.ts): `learningpath-dashboard/src/api/gemini.ts`
- [Course catalog](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/dashboard/features/student/StudentDashboard.tsx): `learningpath-dashboard/src/pages/dashboard/features/student/StudentDashboard.tsx`
- [Free course previews](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/components/CoursePreviewModal.tsx): `learningpath-dashboard/src/components/CoursePreviewModal.tsx`
- [Enrollment checkout](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/course/CheckoutPage.tsx): `learningpath-dashboard/src/pages/course/CheckoutPage.tsx`
- [Course viewer](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/course/CourseViewerPage.tsx): `learningpath-dashboard/src/pages/course/CourseViewerPage.tsx`
- [Course analytics](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath-dashboard/src/pages/course/CourseAnalyticsPage.tsx): `learningpath-dashboard/src/pages/course/CourseAnalyticsPage.tsx`

### Identity and profiles

- [Authentication endpoints](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/auth/AuthController.java): `learningpath/src/main/java/com/smartedu/learningpath/auth/AuthController.java`
- [Authentication service](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java): `learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java`
- [JWT service](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/config/JwtService.java): `learningpath/src/main/java/com/smartedu/learningpath/config/JwtService.java`
- [User repository](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/user/UserRepository.java): `learningpath/src/main/java/com/smartedu/learningpath/user/UserRepository.java`
- [Profile management](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/profile/ProfileController.java): `learningpath/src/main/java/com/smartedu/learningpath/profile/ProfileController.java`
- [Profile image storage](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/CloudinaryService.java): `learningpath/src/main/java/com/smartedu/learningpath/service/CloudinaryService.java`

### Course lifecycle

- [Course endpoints](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/controller/CourseController.java): `learningpath/src/main/java/com/smartedu/learningpath/controller/CourseController.java`
- [Course operations](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java): `learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java`
- [Course and enrollment data](https://github.com/isashaikh/smartedu-platform/tree/main/learningpath/src/main/java/com/smartedu/learningpath/course): `learningpath/src/main/java/com/smartedu/learningpath/course`
- [Enrollment endpoints](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/controller/EnrollmentController.java): `learningpath/src/main/java/com/smartedu/learningpath/controller/EnrollmentController.java`

### Learning content

- [Resource endpoints](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/controller/ResourceController.java): `learningpath/src/main/java/com/smartedu/learningpath/controller/ResourceController.java`
- [Access-controlled resources](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/ResourceService.java): `learningpath/src/main/java/com/smartedu/learningpath/service/ResourceService.java`
- [Course file storage](https://github.com/isashaikh/smartedu-platform/blob/main/learningpath/src/main/java/com/smartedu/learningpath/service/FileStorageService.java): `learningpath/src/main/java/com/smartedu/learningpath/service/FileStorageService.java`
- **Uploaded files**

### Other components

- **Learner or instructor**
- **Cloudinary**

## Connections

- Learner or instructor → Role-based routes: opens (evidence: `learningpath-dashboard/src/routes/AppRoutes.tsx`)
- Role-based routes → Sign-in and registration: routes to (evidence: `learningpath-dashboard/src/routes/AppRoutes.tsx`)
- Role-based routes → Role dashboards: routes to (evidence: `learningpath-dashboard/src/routes/AppRoutes.tsx`)
- Role-based routes → Profile screens: routes to (evidence: `learningpath-dashboard/src/routes/AppRoutes.tsx`)
- Role-based routes → Course workflows: routes to (evidence: `learningpath-dashboard/src/routes/AppRoutes.tsx`)
- Sign-in and registration → Authentication client: submits credentials
- Authentication client → Authentication endpoints: calls API
- Authentication endpoints → Authentication service: delegates (evidence: `learningpath/src/main/java/com/smartedu/learningpath/auth/AuthController.java`)
- Authentication service → User repository: reads and saves (evidence: `learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java`)
- Authentication service → JWT service: issues token (evidence: `learningpath/src/main/java/com/smartedu/learningpath/auth/AuthenticationService.java`)
- Profile screens → Profile management: calls API
- Profile management → User repository: reads user (evidence: `learningpath/src/main/java/com/smartedu/learningpath/profile/ProfileController.java`)
- Profile management → Profile image storage: uploads image (evidence: `learningpath/src/main/java/com/smartedu/learningpath/profile/ProfileController.java`)
- Profile image storage → Cloudinary: stores image
- Role dashboards → Course catalog: shows
- Course catalog → Course API client: searches courses
- Course workflows → Course API client: requests course data
- Course API client → Course endpoints: calls API
- Course endpoints → Course operations: delegates (evidence: `learningpath/src/main/java/com/smartedu/learningpath/controller/CourseController.java`)
- Enrollment endpoints → Course operations: delegates (evidence: `learningpath/src/main/java/com/smartedu/learningpath/controller/EnrollmentController.java`)
- Course operations → Course and enrollment data: reads and writes (evidence: `learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java`)
- Course operations → Course file storage: saves PDFs (evidence: `learningpath/src/main/java/com/smartedu/learningpath/service/CourseService.java`)
- Course file storage → Uploaded files: writes files (evidence: `learningpath/src/main/java/com/smartedu/learningpath/service/FileStorageService.java`)
- Free course previews → Course API client: requests preview
- Enrollment checkout → Course API client: enrolls
- Course viewer → Resource endpoints: loads resources
- Resource endpoints → Access-controlled resources: delegates (evidence: `learningpath/src/main/java/com/smartedu/learningpath/controller/ResourceController.java`)
- Access-controlled resources → Uploaded files: reads permitted files (evidence: `learningpath/src/main/java/com/smartedu/learningpath/service/ResourceService.java`)
- Course analytics → Course API client: requests analytics
- Gemini generation → Learner or instructor: generates descriptions (evidence: `README.md`)
- Learner or instructor → Course workflows: creates courses (evidence: `README.md`)
- Learner or instructor → Course catalog: discovers courses (evidence: `README.md`)
- Learner or instructor → Free course previews: previews course (evidence: `README.md`)
- Learner or instructor → Enrollment checkout: enrolls (evidence: `README.md`)
- Learner or instructor → Course viewer: studies course (evidence: `README.md`)
- Learner or instructor → Course analytics: reviews trends (evidence: `README.md`)
