# cyaxaress/lms architecture

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

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

## Overview

This is a modular Laravel learning-management system. Its principal workflow is a student discovering a course, enrolling for free or paying for it, then accessing course lessons; teachers and administrators manage courses and users through separate modules. The graph also preserves documented capabilities such as categories, discounts, comments, tickets, media, roles and permissions, and the dashboard. Several modules are represented from the file tree and README only; their internal calls are not asserted without source evidence.

Main entry points: [`modules/Cyaxaress/Course/Http/Controllers/CourseController.php`](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Http/Controllers/CourseController.php) (Course management), [`modules/Cyaxaress/Course/Models/Course.php`](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Models/Course.php) (Courses and lessons), [`modules/Cyaxaress/User/Http/Controllers/UserController.php`](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Http/Controllers/UserController.php) (User management), [`modules/Cyaxaress/User/Models/User.php`](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Models/User.php) (User accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Courses and learning"]
  node_course_controller["Course management"]
  node_course_repo["Course data<br/>[CourseRepo.php]"]
  node_course_model["Courses and lessons<br/>[Course.php]"]
  node_season_model["Seasons and lessons<br/>[Season.php]"]
  node_lesson_controller["Lesson management"]
  node_category_controller["Category management"]
  node_category_model["Categories<br/>[Category.php]"]
end

subgraph group_commerce["Payments and media"]
  node_payment_service["Payment workflow<br/>[PaymentService.php]"]
  node_payment_model["Payments<br/>[Payment.php]"]
  node_gateway["Payment gateway<br/>[Gateway.php]"]
  node_zarinpal["Zarinpal integration<br/>[Zarinpal.php]"]
  node_discount["Discounts<br/>[Discount.php]"]
  node_media_service["Media file service"]
  node_media_model["Media files<br/>[Media.php]"]
end

subgraph group_identity["Users and permissions"]
  node_user_controller["User management<br/>[UserController.php]"]
  node_user_model["User accounts<br/>[User.php]"]
  node_user_auth["Login and registration"]
  node_user_routes["User routes<br/>[user_routes.php]"]
  node_role_controller["Role management"]
  node_role_model["Roles and permissions<br/>[Role.php]"]
end

subgraph group_engagement["Community and support"]
  node_comment_controller["Comment moderation"]
  node_comment_model["Course comments<br/>[Comment.php]"]
  node_ticket_controller["Ticket support"]
  node_ticket_model["Tickets and replies<br/>[Ticket.php]"]
end

subgraph group_experience["Site and administration"]
  node_front["Public course site"]
  node_dashboard["Admin dashboard"]
  node_slider["Homepage slider"]
end

node_student(("Student"))

node_student -.->|"browses courses"| node_front
node_course_controller -->|"stores and queries"| node_course_repo
node_course_controller -->|"loads categories"| node_category_model
node_course_controller -->|"uploads images"| node_media_service
node_course_controller -->|"generates payment"| node_payment_service
node_course_controller -->|"redirects payment"| node_gateway
node_course_model -->|"belongs to"| node_category_model
node_course_model -->|"calculates discounts"| node_discount
node_course_controller -.-> node_lesson_controller
node_user_routes -->|"routes requests"| node_user_controller
node_user_routes -->|"routes authentication"| node_user_auth
node_user_controller -->|"updates accounts"| node_user_model
node_user_controller -->|"uploads photos"| node_media_service
node_role_controller -->|"manages roles"| node_role_model
node_user_model -->|"relates users"| node_course_model
node_user_model -->|"relates payments"| node_payment_model
node_media_model -->|"deletes files"| node_media_service
node_dashboard -->|"reads payments"| node_payment_model
node_student -.->|"submits comments"| node_comment_controller
node_student -.->|"requests support"| node_ticket_controller
node_student -.->|"purchases courses"| node_payment_service
node_front -.->|"presents courses"| node_course_model
node_gateway -.->|"supports gateway"| node_zarinpal

click node_course_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Http/Controllers/CourseController.php"
click node_course_repo "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Repositories/CourseRepo.php"
click node_course_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Models/Course.php"
click node_season_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Models/Season.php"
click node_lesson_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Http/Controllers/LessonController.php"
click node_category_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Category/Http/Controllers/CategoryController.php"
click node_category_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Category/Models/Category.php"
click node_payment_service "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Services/PaymentService.php"
click node_payment_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Models/Payment.php"
click node_gateway "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Gateways/Gateway.php"
click node_zarinpal "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Gateways/Zarinpal/Zarinpal.php"
click node_discount "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Discount/src/Models/Discount.php"
click node_media_service "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Media/Services/MediaFileService.php"
click node_media_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Media/Models/Media.php"
click node_user_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Http/Controllers/UserController.php"
click node_user_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Models/User.php"
click node_user_auth "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Http/Controllers/Auth/LoginController.php"
click node_user_routes "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Routes/user_routes.php"
click node_role_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/RolePermissions/Http/Controllers/RolePermissionsController.php"
click node_role_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/RolePermissions/Models/Role.php"
click node_comment_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Comment/src/Http/Controllers/CommentController.php"
click node_comment_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Comment/src/Models/Comment.php"
click node_ticket_controller "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Tickets/src/Http/Controllers/TicketController.php"
click node_ticket_model "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Tickets/src/Models/Ticket.php"
click node_front "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Front/src/Http/Controllers/FrontController.php"
click node_dashboard "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Dashboard/Http/Controllers/DashboardController.php"
click node_slider "https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Slider/src/Http/Controllers/SlideController.php"

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_course_controller,node_course_repo,node_course_model,node_season_model,node_lesson_controller,node_category_controller,node_category_model toneBlue
class node_payment_service,node_payment_model,node_gateway,node_zarinpal,node_discount,node_media_service,node_media_model toneAmber
class node_user_controller,node_user_model,node_user_auth,node_user_routes,node_role_controller,node_role_model toneMint
class node_comment_controller,node_comment_model,node_ticket_controller,node_ticket_model toneRose
class node_front,node_dashboard,node_slider,node_student toneIndigo
```

## Components

### Courses and learning

- [Course management](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Http/Controllers/CourseController.php): `modules/Cyaxaress/Course/Http/Controllers/CourseController.php`
- [Course data](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Repositories/CourseRepo.php): `modules/Cyaxaress/Course/Repositories/CourseRepo.php`
- [Courses and lessons](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Models/Course.php): `modules/Cyaxaress/Course/Models/Course.php`
- [Seasons and lessons](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Models/Season.php): `modules/Cyaxaress/Course/Models/Season.php`
- [Lesson management](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Course/Http/Controllers/LessonController.php): `modules/Cyaxaress/Course/Http/Controllers/LessonController.php`
- [Category management](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Category/Http/Controllers/CategoryController.php): `modules/Cyaxaress/Category/Http/Controllers/CategoryController.php`
- [Categories](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Category/Models/Category.php): `modules/Cyaxaress/Category/Models/Category.php`

### Payments and media

- [Payment workflow](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Services/PaymentService.php): `modules/Cyaxaress/Payment/src/Services/PaymentService.php`
- [Payments](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Models/Payment.php): `modules/Cyaxaress/Payment/src/Models/Payment.php`
- [Payment gateway](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Gateways/Gateway.php): `modules/Cyaxaress/Payment/src/Gateways/Gateway.php`
- [Zarinpal integration](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Payment/src/Gateways/Zarinpal/Zarinpal.php): `modules/Cyaxaress/Payment/src/Gateways/Zarinpal/Zarinpal.php`
- [Discounts](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Discount/src/Models/Discount.php): `modules/Cyaxaress/Discount/src/Models/Discount.php`
- [Media file service](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Media/Services/MediaFileService.php): `modules/Cyaxaress/Media/Services/MediaFileService.php`
- [Media files](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Media/Models/Media.php): `modules/Cyaxaress/Media/Models/Media.php`

### Users and permissions

- [User management](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Http/Controllers/UserController.php): `modules/Cyaxaress/User/Http/Controllers/UserController.php`
- [User accounts](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Models/User.php): `modules/Cyaxaress/User/Models/User.php`
- [Login and registration](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Http/Controllers/Auth/LoginController.php): `modules/Cyaxaress/User/Http/Controllers/Auth/LoginController.php`
- [User routes](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/User/Routes/user_routes.php): `modules/Cyaxaress/User/Routes/user_routes.php`
- [Role management](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/RolePermissions/Http/Controllers/RolePermissionsController.php): `modules/Cyaxaress/RolePermissions/Http/Controllers/RolePermissionsController.php`
- [Roles and permissions](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/RolePermissions/Models/Role.php): `modules/Cyaxaress/RolePermissions/Models/Role.php`

### Community and support

- [Comment moderation](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Comment/src/Http/Controllers/CommentController.php): `modules/Cyaxaress/Comment/src/Http/Controllers/CommentController.php`
- [Course comments](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Comment/src/Models/Comment.php): `modules/Cyaxaress/Comment/src/Models/Comment.php`
- [Ticket support](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Tickets/src/Http/Controllers/TicketController.php): `modules/Cyaxaress/Tickets/src/Http/Controllers/TicketController.php`
- [Tickets and replies](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Tickets/src/Models/Ticket.php): `modules/Cyaxaress/Tickets/src/Models/Ticket.php`

### Site and administration

- [Public course site](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Front/src/Http/Controllers/FrontController.php): `modules/Cyaxaress/Front/src/Http/Controllers/FrontController.php`
- [Admin dashboard](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Dashboard/Http/Controllers/DashboardController.php): `modules/Cyaxaress/Dashboard/Http/Controllers/DashboardController.php`
- [Homepage slider](https://github.com/cyaxaress/lms/blob/master/modules/Cyaxaress/Slider/src/Http/Controllers/SlideController.php): `modules/Cyaxaress/Slider/src/Http/Controllers/SlideController.php`

### Other components

- **Student**

## Connections

- Student → Public course site: browses courses
- Course management → Course data: stores and queries (evidence: `modules/Cyaxaress/Course/Http/Controllers/CourseController.php`)
- Course management → Categories: loads categories (evidence: `modules/Cyaxaress/Course/Http/Controllers/CourseController.php`)
- Course management → Media file service: uploads images (evidence: `modules/Cyaxaress/Course/Http/Controllers/CourseController.php`)
- Course management → Payment workflow: generates payment (evidence: `modules/Cyaxaress/Course/Http/Controllers/CourseController.php`)
- Course management → Payment gateway: redirects payment (evidence: `modules/Cyaxaress/Course/Http/Controllers/CourseController.php`)
- Courses and lessons → Categories: belongs to (evidence: `modules/Cyaxaress/Course/Models/Course.php`)
- Courses and lessons → Discounts: calculates discounts (evidence: `modules/Cyaxaress/Course/Models/Course.php`)
- Course management → Lesson management
- User routes → User management: routes requests (evidence: `modules/Cyaxaress/User/Routes/user_routes.php`)
- User routes → Login and registration: routes authentication (evidence: `modules/Cyaxaress/User/Routes/user_routes.php`)
- User management → User accounts: updates accounts (evidence: `modules/Cyaxaress/User/Http/Controllers/UserController.php`)
- User management → Media file service: uploads photos (evidence: `modules/Cyaxaress/User/Http/Controllers/UserController.php`)
- Role management → Roles and permissions: manages roles (evidence: `modules/Cyaxaress/RolePermissions/Http/Controllers/RolePermissionsController.php`)
- User accounts → Courses and lessons: relates users (evidence: `modules/Cyaxaress/User/Models/User.php`)
- User accounts → Payments: relates payments (evidence: `modules/Cyaxaress/User/Models/User.php`)
- Media files → Media file service: deletes files (evidence: `modules/Cyaxaress/Media/Models/Media.php`)
- Admin dashboard → Payments: reads payments (evidence: `modules/Cyaxaress/Dashboard/Http/Controllers/DashboardController.php`)
- Student → Comment moderation: submits comments
- Student → Ticket support: requests support
- Student → Payment workflow: purchases courses
- Public course site → Courses and lessons: presents courses
- Payment gateway → Zarinpal integration: supports gateway
