# mazensabry2712/elmullim-b architecture

> Architecture diagram of the GitHub repository mazensabry2712/elmullim-b, 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/mazensabry2712/elmullim-b
- Repository: https://github.com/mazensabry2712/elmullim-b

## Overview

This is a Laravel tutoring and learning platform, with APIs and an admin panel for families, students, teachers, and operators. The principal workflow is a learner or family arranging a lesson: teacher listings and availability inform a booking, payment may be initiated, and booking/session state supports delivery and attendance. Separate branches cover courses and enrollment, quizzes, messaging, and platform administration. The supplied README describes Laravel rather than this product; relationships below rely on indexed imports and sampled code, while routes and several feature implementations were not sampled.

Main entry points: [`app/Http/Controllers/Api/Student/MainController.php`](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/MainController.php) (Student API), [`app/Services/BookingService.php`](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/BookingService.php) (Booking orchestration), [`app/Services/SessionService.php`](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/SessionService.php) (Session lifecycle), [`app/Models/Booking.php`](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Booking.php) (Bookings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts and discovery"]
  node_family["Family accounts<br/>[AuthController.php]"]
  node_student["Student API<br/>[MainController.php]"]
  node_teacher["Teacher API<br/>[MainController.php]"]
  node_teacher_model["Teacher profiles<br/>[Teacher.php]"]
  node_family_model["Family records<br/>[Family.php]"]
  node_student_model["Student records<br/>[Student.php]"]
end

subgraph group_learning["Learning services"]
  node_lessons["Lesson authoring"]
  node_lesson_model["Lesson listings<br/>[Lesson.php]"]
  node_availability["Availability"]
  node_courses["Course content"]
  node_course_model["Courses<br/>[Course.php]"]
  node_quiz["Quizzes"]
  node_sessions["Session lifecycle<br/>[SessionService.php]"]
  node_session_model["Lesson sessions<br/>[Session.php]"]
  node_attendance["Attendance"]
end

subgraph group_commerce["Bookings and payments"]
  node_booking_api["Booking requests"]
  node_booking_service["Booking orchestration<br/>[BookingService.php]"]
  node_booking_model["Bookings<br/>[Booking.php]"]
  node_payment["Course payments<br/>[MainController.php]"]
  node_payment_gateway["Paymob integration<br/>[PaymobService.php]"]
  node_orders["Orders<br/>[Order.php]"]
end

subgraph group_operations["Communication and operations"]
  node_admin["Admin panel"]
  node_chat["Chat API<br/>[ChatController.php]"]
  node_chat_model["Conversations"]
end

node_outside(("Learners and teachers"))

node_outside -.->|"registers"| node_family
node_outside -.->|"uses API"| node_student
node_outside -.->|"uses API"| node_teacher
node_outside -.->|"requests lesson"| node_booking_api
node_outside -.->|"manages platform"| node_admin
node_family -->|"authenticates"| node_family_model
node_teacher -->|"reads profile"| node_teacher_model
node_lessons -->|"checks availability"| node_availability
node_lessons -->|"updates lessons"| node_lesson_model
node_courses -->|"loads courses"| node_course_model
node_student -->|"lists courses"| node_course_model
node_student -->|"creates payment order"| node_orders
node_student -->|"initiates payment"| node_payment_gateway
node_booking_api -.->|"delegates booking"| node_booking_service
node_booking_service -->|"creates bookings"| node_booking_model
node_booking_service -->|"checks availability"| node_availability
node_booking_service -->|"schedules sessions"| node_sessions
node_sessions -->|"creates sessions"| node_session_model
node_sessions -->|"updates booking state"| node_booking_model
node_attendance -.->|"records attendance"| node_booking_model
node_chat -->|"loads conversations"| node_chat_model
node_admin -->|"manages teachers"| node_teacher_model
node_student -->|"reads student data"| node_student_model
node_family_model -->|"relates students"| node_student_model

click node_family "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Family/AuthController.php"
click node_student "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/MainController.php"
click node_teacher "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Teacher/MainController.php"
click node_teacher_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Teacher.php"
click node_family_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Family.php"
click node_student_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Student.php"
click node_admin "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Panel/TeachersController.php"
click node_lessons "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Teacher/Lessons/LessonController.php"
click node_lesson_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Lesson.php"
click node_availability "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/AvailabilityService.php"
click node_courses "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Teacher/Courses/LectureController.php"
click node_course_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Course.php"
click node_quiz "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/QuizzesController.php"
click node_booking_api "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/BookingController.php"
click node_booking_service "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/BookingService.php"
click node_booking_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Booking.php"
click node_payment "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/MainController.php"
click node_payment_gateway "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Services/PaymobService.php"
click node_orders "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Order.php"
click node_sessions "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/SessionService.php"
click node_session_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Session.php"
click node_attendance "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/AttendanceService.php"
click node_chat "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/ChatController.php"
click node_chat_model "https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/ChatConversation.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_family,node_student,node_teacher,node_teacher_model,node_family_model,node_student_model toneBlue
class node_lessons,node_lesson_model,node_availability,node_courses,node_course_model,node_quiz,node_sessions,node_session_model,node_attendance toneAmber
class node_booking_api,node_booking_service,node_booking_model,node_payment,node_payment_gateway,node_orders toneMint
class node_admin,node_chat,node_chat_model toneRose
class node_outside toneIndigo
```

## Components

### Accounts and discovery

- [Family accounts](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Family/AuthController.php): `app/Http/Controllers/Api/Family/AuthController.php`
- [Student API](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/MainController.php): `app/Http/Controllers/Api/Student/MainController.php`
- [Teacher API](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Teacher/MainController.php): `app/Http/Controllers/Api/Teacher/MainController.php`
- [Teacher profiles](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Teacher.php): `app/Models/Teacher.php`
- [Family records](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Family.php): `app/Models/Family.php`
- [Student records](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Student.php): `app/Models/Student.php`

### Learning services

- [Lesson authoring](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Teacher/Lessons/LessonController.php): `app/Http/Controllers/Api/Teacher/Lessons/LessonController.php`
- [Lesson listings](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Lesson.php): `app/Models/Lesson.php`
- [Availability](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/AvailabilityService.php): `app/Services/AvailabilityService.php`
- [Course content](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Teacher/Courses/LectureController.php): `app/Http/Controllers/Api/Teacher/Courses/LectureController.php`
- [Courses](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Course.php): `app/Models/Course.php`
- [Quizzes](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/QuizzesController.php): `app/Http/Controllers/Api/Student/QuizzesController.php`
- [Session lifecycle](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/SessionService.php): `app/Services/SessionService.php`
- [Lesson sessions](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Session.php): `app/Models/Session.php`
- [Attendance](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/AttendanceService.php): `app/Services/AttendanceService.php`

### Bookings and payments

- [Booking requests](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/BookingController.php): `app/Http/Controllers/Api/BookingController.php`
- [Booking orchestration](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Services/BookingService.php): `app/Services/BookingService.php`
- [Bookings](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Booking.php): `app/Models/Booking.php`
- [Course payments](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/Student/MainController.php): `app/Http/Controllers/Api/Student/MainController.php`
- [Paymob integration](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Services/PaymobService.php): `app/Http/Services/PaymobService.php`
- [Orders](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/Order.php): `app/Models/Order.php`

### Communication and operations

- [Admin panel](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Panel/TeachersController.php): `app/Http/Controllers/Panel/TeachersController.php`
- [Chat API](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Http/Controllers/Api/ChatController.php): `app/Http/Controllers/Api/ChatController.php`
- [Conversations](https://github.com/mazensabry2712/elmullim-b/blob/main/app/Models/ChatConversation.php): `app/Models/ChatConversation.php`

### Other components

- **Learners and teachers**

## Connections

- Learners and teachers → Family accounts: registers
- Learners and teachers → Student API: uses API
- Learners and teachers → Teacher API: uses API
- Learners and teachers → Booking requests: requests lesson
- Learners and teachers → Admin panel: manages platform
- Family accounts → Family records: authenticates (evidence: `app/Http/Controllers/Api/Family/AuthController.php`)
- Teacher API → Teacher profiles: reads profile (evidence: `app/Http/Controllers/Api/Teacher/MainController.php`)
- Lesson authoring → Availability: checks availability (evidence: `app/Http/Controllers/Api/Teacher/Lessons/LessonController.php`)
- Lesson authoring → Lesson listings: updates lessons (evidence: `app/Http/Controllers/Api/Teacher/Lessons/LessonController.php`)
- Course content → Courses: loads courses (evidence: `app/Http/Controllers/Api/Teacher/Courses/LectureController.php`)
- Student API → Courses: lists courses (evidence: `app/Http/Controllers/Api/Student/MainController.php`)
- Student API → Orders: creates payment order (evidence: `app/Http/Controllers/Api/Student/MainController.php`)
- Student API → Paymob integration: initiates payment (evidence: `app/Http/Controllers/Api/Student/MainController.php`)
- Booking requests → Booking orchestration: delegates booking
- Booking orchestration → Bookings: creates bookings (evidence: `app/Services/BookingService.php`)
- Booking orchestration → Availability: checks availability (evidence: `app/Services/BookingService.php`)
- Booking orchestration → Session lifecycle: schedules sessions (evidence: `app/Services/BookingService.php`)
- Session lifecycle → Lesson sessions: creates sessions (evidence: `app/Services/SessionService.php`)
- Session lifecycle → Bookings: updates booking state (evidence: `app/Services/SessionService.php`)
- Attendance → Bookings: records attendance
- Chat API → Conversations: loads conversations (evidence: `app/Http/Controllers/Api/ChatController.php`)
- Admin panel → Teacher profiles: manages teachers (evidence: `app/Http/Controllers/Panel/TeachersController.php`)
- Student API → Student records: reads student data (evidence: `app/Http/Controllers/Api/Student/MainController.php`)
- Family records → Student records: relates students (evidence: `app/Models/Family.php`)
