# afrizalbmm/ujion-tka-apps architecture

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

- Interactive diagram: https://gitdiagram.com/afrizalbmm/ujion-tka-apps
- Repository: https://github.com/afrizalbmm/ujion-tka-apps

## Overview

Ujion TKA is a Laravel platform for teacher-operated assessment: superadmins prepare question banks, packages and exams; teachers manage learning content and run simulations; students enter tokenized exams, submit answers and receive a final score. A separate material-practice flow supports immediate-feedback review questions and one-time package attempts, with results for teachers. Teacher activation and public exam sales add payment workflows, while live chat and WhatsApp support communication. The README documents several capabilities whose controller wiring was not sampled, so those branches are shown at subsystem level rather than as inferred call chains.

Main entry points: [`app/Http/Controllers/Siswa/ExamController.php`](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Siswa/ExamController.php) (Exam session), [`app/Http/Controllers/Superadmin`](https://github.com/afrizalbmm/ujion-tka-apps/tree/main/app/Http/Controllers/Superadmin) (Assessment admin), [`app/Http/Controllers/DokuPaymentController.php`](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/DokuPaymentController.php) (Payment handling), [`app/Http/Controllers/Guru/ChatController.php`](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ChatController.php) (Live chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Assessment authoring"]
  node_admin_authoring["Assessment admin"]
  node_global_questions["Global question bank"]
  node_package_builder["Package management"]
  node_exam_admin["Exam management<br/>[ExamController.php]"]
  node_question_store[("Question data<br/>[GlobalQuestion.php]")]
  node_package_data[("Package data<br/>[PaketSoal.php]")]
  node_exam_data[("Exam data<br/>[Exam.php]")]
end

subgraph group_exam["Exam delivery"]
  node_student_exam["Exam session<br/>[ExamController.php]"]
  node_exam_ui["Exam screens<br/>[Pengerjaan.vue]"]
  node_session_data[("Sessions and answers<br/>[UjianSesi.php]")]
  node_teacher_results["Exam results"]
end

subgraph group_practice["Material practice"]
  node_practice_admin["Practice setup"]
  node_practice_student["Practice sessions"]
  node_practice_results["Practice analysis"]
  node_practice_data[("Practice state")]
end

subgraph group_operations["Teacher operations"]
  node_teacher_admin["Teacher accounts"]
  node_teacher_materials["Materials and questions"]
  node_personal_bank["Personal question bank"]
  node_chat["Live chat<br/>[ChatController.php]"]
  node_chat_data[("Chat records<br/>[Chat.php]")]
  node_blast["WhatsApp blast"]
  node_personal_question_data[("Personal question data")]
end

subgraph group_public["Public and payments"]
  node_activation["Teacher registration"]
  node_payment["Payment handling"]
  node_transaction_data[("Transactions<br/>[Transaction.php]")]
end

node_superadmin(("Superadmin"))
node_teacher(("Teacher/operator"))
node_student(("Student"))
node_doku{{"DOKU payments"}}
node_whatsapp{{"WhatsApp gateway"}}

node_superadmin -->|"manages"| node_admin_authoring
node_admin_authoring -->|"maintains"| node_global_questions
node_global_questions -->|"writes"| node_question_store
node_admin_authoring -->|"creates"| node_package_builder
node_package_builder -->|"writes"| node_package_data
node_admin_authoring -->|"creates exams"| node_exam_admin
node_exam_admin -->|"writes"| node_exam_data
node_teacher -->|"runs simulation"| node_student_exam
node_student -->|"enters token"| node_student_exam
node_student_exam -->|"renders"| node_exam_ui
node_student_exam -->|"stores answers"| node_session_data
node_exam_data -->|"provides exam"| node_student_exam
node_teacher -->|"reviews"| node_teacher_results
node_teacher_results -->|"reads results"| node_session_data
node_superadmin -->|"prepares practice"| node_practice_admin
node_practice_admin -->|"creates tokens and snapshots"| node_practice_data
node_student -->|"enters practice token"| node_practice_student
node_practice_student -->|"saves attempts"| node_practice_data
node_teacher -->|"reviews analysis"| node_practice_results
node_practice_results -->|"reads attempts"| node_practice_data
node_superadmin -->|"activates accounts"| node_teacher_admin
node_teacher -->|"uses materials"| node_teacher_materials
node_teacher -->|"builds questions"| node_personal_bank
node_personal_bank -->|"writes questions"| node_personal_question_data
node_teacher -->|"messages"| node_chat
node_superadmin -->|"messages"| node_chat
node_chat -->|"stores messages"| node_chat_data
node_teacher -->|"registers"| node_activation
node_activation -->|"creates pending payment"| node_transaction_data
node_payment -->|"updates status"| node_transaction_data
node_payment -.->|"checks payment"| node_doku
node_doku -.->|"sends notification"| node_payment
node_superadmin -->|"queues announcements"| node_blast
node_blast -.->|"sends messages"| node_whatsapp

click node_admin_authoring "https://github.com/afrizalbmm/ujion-tka-apps/tree/main/app/Http/Controllers/Superadmin"
click node_global_questions "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/GlobalQuestionController.php"
click node_package_builder "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/PaketSoalController.php"
click node_exam_admin "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/ExamController.php"
click node_question_store "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/GlobalQuestion.php"
click node_package_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/PaketSoal.php"
click node_exam_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/Exam.php"
click node_student_exam "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Siswa/ExamController.php"
click node_exam_ui "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/resources/js/Pages/Ujian/Pengerjaan.vue"
click node_session_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/UjianSesi.php"
click node_teacher_results "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ExamResultController.php"
click node_practice_admin "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/MaterialPracticeController.php"
click node_practice_student "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Siswa/MaterialPracticeController.php"
click node_practice_results "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ExamResultController.php"
click node_practice_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/MaterialPracticeSession.php"
click node_teacher_admin "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/TeacherController.php"
click node_teacher_materials "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/MaterialController.php"
click node_personal_bank "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/PersonalQuestionController.php"
click node_chat "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ChatController.php"
click node_chat_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/Chat.php"
click node_activation "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/RegisterGuruController.php"
click node_payment "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/DokuPaymentController.php"
click node_transaction_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/Transaction.php"
click node_blast "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Jobs/SendWhatsAppBlast.php"
click node_personal_question_data "https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/PersonalQuestion.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_admin_authoring,node_global_questions,node_package_builder,node_exam_admin,node_question_store,node_package_data,node_exam_data toneBlue
class node_student_exam,node_exam_ui,node_session_data,node_teacher_results toneAmber
class node_practice_admin,node_practice_student,node_practice_results,node_practice_data toneMint
class node_teacher_admin,node_teacher_materials,node_personal_bank,node_chat,node_chat_data,node_blast,node_personal_question_data toneRose
class node_activation,node_payment,node_transaction_data,node_superadmin,node_teacher,node_student,node_doku,node_whatsapp toneIndigo
```

## Components

### Assessment authoring

- [Assessment admin](https://github.com/afrizalbmm/ujion-tka-apps/tree/main/app/Http/Controllers/Superadmin): `app/Http/Controllers/Superadmin`
- [Global question bank](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/GlobalQuestionController.php): `app/Http/Controllers/Superadmin/GlobalQuestionController.php`
- [Package management](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/PaketSoalController.php): `app/Http/Controllers/Superadmin/PaketSoalController.php`
- [Exam management](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/ExamController.php): `app/Http/Controllers/Superadmin/ExamController.php`
- [Question data](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/GlobalQuestion.php): `app/Models/GlobalQuestion.php`
- [Package data](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/PaketSoal.php): `app/Models/PaketSoal.php`
- [Exam data](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/Exam.php): `app/Models/Exam.php`

### Exam delivery

- [Exam session](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Siswa/ExamController.php): `app/Http/Controllers/Siswa/ExamController.php`
- [Exam screens](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/resources/js/Pages/Ujian/Pengerjaan.vue): `resources/js/Pages/Ujian/Pengerjaan.vue`
- [Sessions and answers](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/UjianSesi.php): `app/Models/UjianSesi.php`
- [Exam results](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ExamResultController.php): `app/Http/Controllers/Guru/ExamResultController.php`

### Material practice

- [Practice setup](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/MaterialPracticeController.php): `app/Http/Controllers/Superadmin/MaterialPracticeController.php`
- [Practice sessions](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Siswa/MaterialPracticeController.php): `app/Http/Controllers/Siswa/MaterialPracticeController.php`
- [Practice analysis](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ExamResultController.php): `app/Http/Controllers/Guru/ExamResultController.php`
- [Practice state](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/MaterialPracticeSession.php): `app/Models/MaterialPracticeSession.php`

### Teacher operations

- [Teacher accounts](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Superadmin/TeacherController.php): `app/Http/Controllers/Superadmin/TeacherController.php`
- [Materials and questions](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/MaterialController.php): `app/Http/Controllers/Guru/MaterialController.php`
- [Personal question bank](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/PersonalQuestionController.php): `app/Http/Controllers/Guru/PersonalQuestionController.php`
- [Live chat](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/Guru/ChatController.php): `app/Http/Controllers/Guru/ChatController.php`
- [Chat records](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/Chat.php): `app/Models/Chat.php`
- [WhatsApp blast](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Jobs/SendWhatsAppBlast.php): `app/Jobs/SendWhatsAppBlast.php`
- [Personal question data](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/PersonalQuestion.php): `app/Models/PersonalQuestion.php`

### Public and payments

- [Teacher registration](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/RegisterGuruController.php): `app/Http/Controllers/RegisterGuruController.php`
- [Payment handling](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Http/Controllers/DokuPaymentController.php): `app/Http/Controllers/DokuPaymentController.php`
- [Transactions](https://github.com/afrizalbmm/ujion-tka-apps/blob/main/app/Models/Transaction.php): `app/Models/Transaction.php`

### Other components

- **Superadmin**
- **Teacher/operator**
- **Student**
- **DOKU payments**
- **WhatsApp gateway**

## Connections

- Superadmin → Assessment admin: manages
- Assessment admin → Global question bank: maintains
- Global question bank → Question data: writes
- Assessment admin → Package management: creates
- Package management → Package data: writes
- Assessment admin → Exam management: creates exams
- Exam management → Exam data: writes
- Teacher/operator → Exam session: runs simulation
- Student → Exam session: enters token
- Exam session → Exam screens: renders
- Exam session → Sessions and answers: stores answers
- Exam data → Exam session: provides exam
- Teacher/operator → Exam results: reviews
- Exam results → Sessions and answers: reads results
- Superadmin → Practice setup: prepares practice
- Practice setup → Practice state: creates tokens and snapshots
- Student → Practice sessions: enters practice token
- Practice sessions → Practice state: saves attempts
- Teacher/operator → Practice analysis: reviews analysis
- Practice analysis → Practice state: reads attempts
- Superadmin → Teacher accounts: activates accounts
- Teacher/operator → Materials and questions: uses materials
- Teacher/operator → Personal question bank: builds questions
- Personal question bank → Personal question data: writes questions
- Teacher/operator → Live chat: messages
- Superadmin → Live chat: messages
- Live chat → Chat records: stores messages
- Teacher/operator → Teacher registration: registers
- Teacher registration → Transactions: creates pending payment
- Payment handling → Transactions: updates status
- Payment handling → DOKU payments: checks payment
- DOKU payments → Payment handling: sends notification
- Superadmin → WhatsApp blast: queues announcements
- WhatsApp blast → WhatsApp gateway: sends messages
