# chase-ian/pnp-spt-platform-prototype architecture

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

- Interactive diagram: https://gitdiagram.com/chase-ian/pnp-spt-platform-prototype
- Repository: https://github.com/chase-ian/pnp-spt-platform-prototype

## Overview

SPT-Platform is a role-based PNP learning management system. Trainees register or sign in, enroll in courses, progress through sequential lessons and lesson quizzes, take a gated final exam, and receive certificates on passing. Admins author courses and learning content and manage staff; supervisors monitor trainee progress. The README documents these capabilities and the deployed TiDB/S3 backing services. The source excerpts confirm exam grading and certificate issuance, and lesson authoring with PPTX extraction. Other subsystem links are based on README statements; unsampled implementations are not inferred in detail.

Main entry points: [`spt-platform/app/Models`](https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Models) (Course and lesson records), [`spt-platform/app/Http/Controllers/Admin/LessonController.php`](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/LessonController.php) (Lesson authoring), [`spt-platform/app/Http/Controllers/Admin/ModuleController.php`](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/ModuleController.php) (Module management), [`spt-platform/app/Http/Controllers/CertificateController.php`](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/CertificateController.php) (Certificate issuance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Identity and access"]
  node_auth["Registration and login"]
  node_role_gate["Role authorization"]
  node_accounts[("User accounts<br/>[User.php]")]
end

subgraph group_learning["Learning content"]
  node_course_admin["Course management"]
  node_module_admin["Module management"]
  node_lesson_authoring["Lesson authoring"]
  node_pptx["PPTX text extraction"]
  node_image_processing["Lesson image processing"]
  node_learning_records[("Course and lesson records")]
  node_file_storage["Private file storage"]
end

subgraph group_progress["Trainee learning"]
  node_course_catalog["Course catalog and enrollment"]
  node_lesson_view["Sequential lesson viewer"]
  node_lesson_quiz["Lesson quizzes"]
end

subgraph group_oversight["Administration and oversight"]
  node_monitoring["Trainee monitoring"]
  node_admin_oversight["Admin dashboards and analytics"]
end

subgraph group_completion["Assessment and credentials"]
  node_exams["Final exams<br/>[ExamController.php]"]
  node_exam_records[("Exam attempts and settings<br/>[ExamAttempt.php]")]
  node_certificates["Certificate issuance"]
  node_certificate_records[("Certificate records<br/>[Certificate.php]")]
end

node_trainee(("Trainee"))
node_admin(("Admin"))
node_supervisor(("Supervisor"))
node_s3[("AWS S3")]
node_tidb[("TiDB Cloud")]

node_trainee -->|"registers or signs in"| node_auth
node_auth -->|"creates account"| node_accounts
node_trainee -->|"browses and enrolls"| node_course_catalog
node_course_catalog -.->|"reads course data"| node_learning_records
node_course_admin -.->|"manages courses"| node_learning_records
node_admin -->|"manages courses"| node_course_admin
node_course_admin -->|"opens course modules"| node_module_admin
node_admin -->|"manages modules"| node_module_admin
node_module_admin -->|"creates modules"| node_learning_records
node_admin -->|"authors lessons"| node_lesson_authoring
node_lesson_authoring -->|"extracts slide text"| node_pptx
node_lesson_authoring -->|"processes images"| node_image_processing
node_lesson_authoring -->|"stores lesson content"| node_learning_records
node_module_admin -->|"stores module files"| node_file_storage
node_file_storage -->|"stores and streams files"| node_s3
node_trainee -->|"studies lessons"| node_lesson_view
node_lesson_view -.->|"requires quiz completion"| node_lesson_quiz
node_trainee -->|"takes final exam"| node_exams
node_exams -->|"records graded attempt"| node_exam_records
node_exams -->|"issues on passing"| node_certificates
node_certificates -->|"creates certificate record"| node_certificate_records
node_certificates -->|"stores certificate PDF"| node_s3
node_trainee -->|"views or downloads"| node_certificates
node_admin -->|"reviews platform activity"| node_admin_oversight
node_supervisor -->|"monitors trainees"| node_monitoring
node_monitoring -->|"reads trainee progress"| node_accounts
node_learning_records -->|"persists application data"| node_tidb
node_role_gate -->|"protects role routes"| node_auth

click node_auth "https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Http/Controllers/Auth"
click node_role_gate "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Middleware/EnsureUserHasRole.php"
click node_accounts "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Models/User.php"
click node_course_admin "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/CourseController.php"
click node_module_admin "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/ModuleController.php"
click node_lesson_authoring "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/LessonController.php"
click node_pptx "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Services/PptxTextExtractor.php"
click node_image_processing "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Services/LessonImageProcessor.php"
click node_learning_records "https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Models"
click node_course_catalog "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/CourseController.php"
click node_lesson_view "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/LessonViewController.php"
click node_lesson_quiz "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/LessonQuizController.php"
click node_exams "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/ExamController.php"
click node_exam_records "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Models/ExamAttempt.php"
click node_certificates "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/CertificateController.php"
click node_certificate_records "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Models/Certificate.php"
click node_file_storage "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/ModuleController.php"
click node_monitoring "https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Supervisor/MonitoringController.php"
click node_admin_oversight "https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Http/Controllers/Admin"

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,node_role_gate,node_accounts toneBlue
class node_course_admin,node_module_admin,node_lesson_authoring,node_pptx,node_image_processing,node_learning_records,node_file_storage,node_s3,node_tidb toneAmber
class node_course_catalog,node_lesson_view,node_lesson_quiz toneMint
class node_monitoring,node_admin_oversight toneRose
class node_exams,node_exam_records,node_certificates,node_certificate_records,node_trainee,node_admin,node_supervisor toneIndigo
```

## Components

### Identity and access

- [Registration and login](https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Http/Controllers/Auth): `spt-platform/app/Http/Controllers/Auth`
- [Role authorization](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Middleware/EnsureUserHasRole.php): `spt-platform/app/Http/Middleware/EnsureUserHasRole.php`
- [User accounts](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Models/User.php): `spt-platform/app/Models/User.php`

### Learning content

- [Course management](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/CourseController.php): `spt-platform/app/Http/Controllers/Admin/CourseController.php`
- [Module management](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/ModuleController.php): `spt-platform/app/Http/Controllers/Admin/ModuleController.php`
- [Lesson authoring](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/LessonController.php): `spt-platform/app/Http/Controllers/Admin/LessonController.php`
- [PPTX text extraction](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Services/PptxTextExtractor.php): `spt-platform/app/Services/PptxTextExtractor.php`
- [Lesson image processing](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Services/LessonImageProcessor.php): `spt-platform/app/Services/LessonImageProcessor.php`
- [Course and lesson records](https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Models): `spt-platform/app/Models`
- [Private file storage](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Admin/ModuleController.php): `spt-platform/app/Http/Controllers/Admin/ModuleController.php`

### Trainee learning

- [Course catalog and enrollment](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/CourseController.php): `spt-platform/app/Http/Controllers/CourseController.php`
- [Sequential lesson viewer](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/LessonViewController.php): `spt-platform/app/Http/Controllers/LessonViewController.php`
- [Lesson quizzes](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/LessonQuizController.php): `spt-platform/app/Http/Controllers/LessonQuizController.php`

### Administration and oversight

- [Trainee monitoring](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/Supervisor/MonitoringController.php): `spt-platform/app/Http/Controllers/Supervisor/MonitoringController.php`
- [Admin dashboards and analytics](https://github.com/chase-ian/pnp-spt-platform-prototype/tree/main/spt-platform/app/Http/Controllers/Admin): `spt-platform/app/Http/Controllers/Admin`

### Assessment and credentials

- [Final exams](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/ExamController.php): `spt-platform/app/Http/Controllers/ExamController.php`
- [Exam attempts and settings](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Models/ExamAttempt.php): `spt-platform/app/Models/ExamAttempt.php`
- [Certificate issuance](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Http/Controllers/CertificateController.php): `spt-platform/app/Http/Controllers/CertificateController.php`
- [Certificate records](https://github.com/chase-ian/pnp-spt-platform-prototype/blob/main/spt-platform/app/Models/Certificate.php): `spt-platform/app/Models/Certificate.php`

### Other components

- **Trainee**
- **Admin**
- **Supervisor**
- **AWS S3**
- **TiDB Cloud**

## Connections

- Trainee → Registration and login: registers or signs in (evidence: `spt-platform/app/Http/Controllers/Auth/RegisteredUserController.php`)
- Registration and login → User accounts: creates account (evidence: `spt-platform/app/Http/Controllers/Auth/RegisteredUserController.php`)
- Trainee → Course catalog and enrollment: browses and enrolls
- Course catalog and enrollment → Course and lesson records: reads course data (evidence: `spt-platform/app/Http/Controllers/CourseController.php`)
- Course management → Course and lesson records: manages courses (evidence: `spt-platform/app/Http/Controllers/Admin/CourseController.php`)
- Admin → Course management: manages courses
- Course management → Module management: opens course modules
- Admin → Module management: manages modules
- Module management → Course and lesson records: creates modules (evidence: `spt-platform/app/Http/Controllers/Admin/ModuleController.php`)
- Admin → Lesson authoring: authors lessons
- Lesson authoring → PPTX text extraction: extracts slide text (evidence: `spt-platform/app/Http/Controllers/Admin/LessonController.php`)
- Lesson authoring → Lesson image processing: processes images (evidence: `spt-platform/app/Http/Controllers/Admin/LessonController.php`)
- Lesson authoring → Course and lesson records: stores lesson content (evidence: `spt-platform/app/Http/Controllers/Admin/LessonController.php`)
- Module management → Private file storage: stores module files (evidence: `spt-platform/app/Http/Controllers/Admin/ModuleController.php`)
- Private file storage → AWS S3: stores and streams files
- Trainee → Sequential lesson viewer: studies lessons
- Sequential lesson viewer → Lesson quizzes: requires quiz completion
- Trainee → Final exams: takes final exam
- Final exams → Exam attempts and settings: records graded attempt (evidence: `spt-platform/app/Http/Controllers/ExamController.php`)
- Final exams → Certificate issuance: issues on passing (evidence: `spt-platform/app/Http/Controllers/ExamController.php`)
- Certificate issuance → Certificate records: creates certificate record (evidence: `spt-platform/app/Http/Controllers/CertificateController.php`)
- Certificate issuance → AWS S3: stores certificate PDF
- Trainee → Certificate issuance: views or downloads
- Admin → Admin dashboards and analytics: reviews platform activity
- Supervisor → Trainee monitoring: monitors trainees
- Trainee monitoring → User accounts: reads trainee progress (evidence: `spt-platform/app/Http/Controllers/Supervisor/MonitoringController.php`)
- Course and lesson records → TiDB Cloud: persists application data
- Role authorization → Registration and login: protects role routes
