# septriansyah/game-skripsi architecture

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

- Interactive diagram: https://gitdiagram.com/septriansyah/game-skripsi
- Repository: https://github.com/septriansyah/game-skripsi

## Overview

KasusQL is a classroom learning game for practicing SQL DML through a five-phase LKPD investigation, paired with a live teacher dashboard. Students join a class, progress through guided activities and block-based query missions, and submit work that teachers monitor, grade, and export. The graph separates the student learning flow, query engine, class management, and persistence. Relationships involving unsampled screens are included only where the README or SOURCE INDEX supports them; those references establish module relationships, not every runtime call.

Main entry points: [`src/App.jsx`](https://github.com/septriansyah/game-skripsi/blob/main/src/App.jsx) (App routing), [`src/lib/db.js`](https://github.com/septriansyah/game-skripsi/blob/main/src/lib/db.js) (Data layer), [`src/student/Game.jsx`](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Game.jsx) (Game flow), [`src/student/Mission.jsx`](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Mission.jsx) (Query missions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Student learning"]
  node_student_entry["Student entry<br/>[Student.jsx]"]
  node_game_flow["Game flow<br/>[Game.jsx]"]
  node_phase_activities["Phase activities<br/>[Forms.jsx]"]
  node_lkpd["LKPD workbook<br/>[Lkpd.jsx]"]
  node_incident_memo["Incident memo<br/>[Memo.jsx]"]
end

subgraph group_query["Query learning"]
  node_mission["Query missions<br/>[Mission.jsx]"]
  node_recap["Mission recap<br/>[Recap.jsx]"]
  node_game_data["Mission data<br/>[data.js]"]
  node_query_engine["Block query engine<br/>[engine.js]"]
end

subgraph group_classroom["Class management"]
  node_teacher_portal["Teacher portal<br/>[Teacher.jsx]"]
  node_class_dashboard["Class dashboard<br/>[ClassView.jsx]"]
  node_group_detail["Group details<br/>[GroupDetail.jsx]"]
  node_grade_stats["Grades and stats<br/>[stats.js]"]
  node_admin_portal["Admin portal<br/>[Admin.jsx]"]
end

subgraph group_platform["Persistence and guidance"]
  node_app_router["App routing<br/>[App.jsx]"]
  node_data_layer["Data layer<br/>[db.js]"]
  node_game_context["Group state<br/>[GameContext.jsx]"]
  node_firebase_config["Firebase setup<br/>[firebase.js]"]
  node_guide_content["Guides and DML material<br/>[guide.js]"]
  node_guide_views["Guide views<br/>[Guide.jsx]"]
  node_info_pages["Information pages<br/>[Info.jsx]"]
end

node_student(("Student group"))
node_teacher(("Teacher"))
node_admin_actor(("Admin"))
node_firebase[("Firebase Auth and Firestore")]
node_browser_storage[("Browser localStorage")]

node_student -->|"opens app"| node_app_router
node_teacher -->|"opens app"| node_app_router
node_admin_actor -->|"opens admin"| node_app_router
node_app_router -->|"routes students"| node_student_entry
node_app_router -->|"routes teachers"| node_teacher_portal
node_app_router -->|"routes admin"| node_admin_portal
node_student_entry -->|"provides group state"| node_game_context
node_student_entry -->|"opens game"| node_game_flow
node_game_flow -->|"renders phases"| node_phase_activities
node_game_flow -->|"renders missions"| node_mission
node_game_flow -->|"renders workbook"| node_lkpd
node_phase_activities -->|"shows memo"| node_incident_memo
node_mission -.->|"validates queries"| node_query_engine
node_query_engine -->|"reads definitions"| node_game_data
node_mission -->|"uses mission data"| node_game_data
node_mission -->|"renders recap"| node_recap
node_game_context -->|"watches and saves"| node_data_layer
node_game_context -->|"clones state"| node_query_engine
node_teacher_portal -->|"opens classes"| node_class_dashboard
node_class_dashboard -->|"opens group detail"| node_group_detail
node_class_dashboard -->|"calculates grades"| node_grade_stats
node_group_detail -->|"reads and updates"| node_data_layer
node_group_detail -->|"calculates score"| node_grade_stats
node_class_dashboard -.->|"monitors class"| node_data_layer
node_admin_portal -.->|"manages records"| node_data_layer
node_data_layer -->|"checks configuration"| node_firebase_config
node_data_layer -->|"auth and Firestore"| node_firebase
node_data_layer -->|"stores demo data"| node_browser_storage
node_app_router -->|"routes guides"| node_info_pages
node_info_pages -->|"shows guide content"| node_guide_views
node_guide_views -->|"reads material"| node_guide_content

click node_student_entry "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Student.jsx"
click node_game_flow "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Game.jsx"
click node_phase_activities "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Forms.jsx"
click node_lkpd "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Lkpd.jsx"
click node_incident_memo "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Memo.jsx"
click node_mission "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Mission.jsx"
click node_recap "https://github.com/septriansyah/game-skripsi/blob/main/src/student/Recap.jsx"
click node_game_data "https://github.com/septriansyah/game-skripsi/blob/main/src/game/data.js"
click node_query_engine "https://github.com/septriansyah/game-skripsi/blob/main/src/game/engine.js"
click node_teacher_portal "https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/Teacher.jsx"
click node_class_dashboard "https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/ClassView.jsx"
click node_group_detail "https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/GroupDetail.jsx"
click node_grade_stats "https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/stats.js"
click node_admin_portal "https://github.com/septriansyah/game-skripsi/blob/main/src/admin/Admin.jsx"
click node_app_router "https://github.com/septriansyah/game-skripsi/blob/main/src/App.jsx"
click node_data_layer "https://github.com/septriansyah/game-skripsi/blob/main/src/lib/db.js"
click node_game_context "https://github.com/septriansyah/game-skripsi/blob/main/src/student/GameContext.jsx"
click node_firebase_config "https://github.com/septriansyah/game-skripsi/blob/main/src/lib/firebase.js"
click node_guide_content "https://github.com/septriansyah/game-skripsi/blob/main/src/game/guide.js"
click node_guide_views "https://github.com/septriansyah/game-skripsi/blob/main/src/components/Guide.jsx"
click node_info_pages "https://github.com/septriansyah/game-skripsi/blob/main/src/pages/Info.jsx"

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_student_entry,node_game_flow,node_phase_activities,node_lkpd,node_incident_memo toneBlue
class node_mission,node_recap,node_game_data,node_query_engine,node_firebase,node_browser_storage toneAmber
class node_teacher_portal,node_class_dashboard,node_group_detail,node_grade_stats,node_admin_portal toneMint
class node_app_router,node_data_layer,node_game_context,node_firebase_config,node_guide_content,node_guide_views,node_info_pages toneRose
class node_student,node_teacher,node_admin_actor toneIndigo
```

## Components

### Student learning

- [Student entry](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Student.jsx): `src/student/Student.jsx`
- [Game flow](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Game.jsx): `src/student/Game.jsx`
- [Phase activities](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Forms.jsx): `src/student/Forms.jsx`
- [LKPD workbook](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Lkpd.jsx): `src/student/Lkpd.jsx`
- [Incident memo](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Memo.jsx): `src/student/Memo.jsx`

### Query learning

- [Query missions](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Mission.jsx): `src/student/Mission.jsx`
- [Mission recap](https://github.com/septriansyah/game-skripsi/blob/main/src/student/Recap.jsx): `src/student/Recap.jsx`
- [Mission data](https://github.com/septriansyah/game-skripsi/blob/main/src/game/data.js): `src/game/data.js`
- [Block query engine](https://github.com/septriansyah/game-skripsi/blob/main/src/game/engine.js): `src/game/engine.js`

### Class management

- [Teacher portal](https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/Teacher.jsx): `src/teacher/Teacher.jsx`
- [Class dashboard](https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/ClassView.jsx): `src/teacher/ClassView.jsx`
- [Group details](https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/GroupDetail.jsx): `src/teacher/GroupDetail.jsx`
- [Grades and stats](https://github.com/septriansyah/game-skripsi/blob/main/src/teacher/stats.js): `src/teacher/stats.js`
- [Admin portal](https://github.com/septriansyah/game-skripsi/blob/main/src/admin/Admin.jsx): `src/admin/Admin.jsx`

### Persistence and guidance

- [App routing](https://github.com/septriansyah/game-skripsi/blob/main/src/App.jsx): `src/App.jsx`
- [Data layer](https://github.com/septriansyah/game-skripsi/blob/main/src/lib/db.js): `src/lib/db.js`
- [Group state](https://github.com/septriansyah/game-skripsi/blob/main/src/student/GameContext.jsx): `src/student/GameContext.jsx`
- [Firebase setup](https://github.com/septriansyah/game-skripsi/blob/main/src/lib/firebase.js): `src/lib/firebase.js`
- [Guides and DML material](https://github.com/septriansyah/game-skripsi/blob/main/src/game/guide.js): `src/game/guide.js`
- [Guide views](https://github.com/septriansyah/game-skripsi/blob/main/src/components/Guide.jsx): `src/components/Guide.jsx`
- [Information pages](https://github.com/septriansyah/game-skripsi/blob/main/src/pages/Info.jsx): `src/pages/Info.jsx`

### Other components

- **Student group**
- **Teacher**
- **Admin**
- **Firebase Auth and Firestore**
- **Browser localStorage**

## Connections

- Student group → App routing: opens app (evidence: `README.md`)
- Teacher → App routing: opens app (evidence: `README.md`)
- Admin → App routing: opens admin (evidence: `README.md`)
- App routing → Student entry: routes students (evidence: `src/App.jsx`)
- App routing → Teacher portal: routes teachers (evidence: `src/App.jsx`)
- App routing → Admin portal: routes admin (evidence: `src/App.jsx`)
- Student entry → Group state: provides group state (evidence: `src/student/Student.jsx`)
- Student entry → Game flow: opens game (evidence: `src/student/Student.jsx`)
- Game flow → Phase activities: renders phases (evidence: `src/student/Game.jsx`)
- Game flow → Query missions: renders missions (evidence: `src/student/Game.jsx`)
- Game flow → LKPD workbook: renders workbook (evidence: `src/student/Game.jsx`)
- Phase activities → Incident memo: shows memo (evidence: `src/student/Forms.jsx`)
- Query missions → Block query engine: validates queries (evidence: `src/student/Mission.jsx`)
- Block query engine → Mission data: reads definitions (evidence: `src/game/engine.js`)
- Query missions → Mission data: uses mission data (evidence: `src/student/Mission.jsx`)
- Query missions → Mission recap: renders recap (evidence: `src/student/Mission.jsx`)
- Group state → Data layer: watches and saves (evidence: `src/student/GameContext.jsx`)
- Group state → Block query engine: clones state (evidence: `src/student/GameContext.jsx`)
- Teacher portal → Class dashboard: opens classes (evidence: `src/teacher/Teacher.jsx`)
- Class dashboard → Group details: opens group detail (evidence: `src/teacher/ClassView.jsx`)
- Class dashboard → Grades and stats: calculates grades (evidence: `src/teacher/ClassView.jsx`)
- Group details → Data layer: reads and updates (evidence: `src/teacher/GroupDetail.jsx`)
- Group details → Grades and stats: calculates score (evidence: `src/teacher/GroupDetail.jsx`)
- Class dashboard → Data layer: monitors class (evidence: `src/teacher/ClassView.jsx`)
- Admin portal → Data layer: manages records (evidence: `src/admin/Admin.jsx`)
- Data layer → Firebase setup: checks configuration (evidence: `src/lib/db.js`)
- Data layer → Firebase Auth and Firestore: auth and Firestore (evidence: `README.md`)
- Data layer → Browser localStorage: stores demo data (evidence: `README.md`)
- App routing → Information pages: routes guides (evidence: `src/App.jsx`)
- Information pages → Guide views: shows guide content (evidence: `src/pages/Info.jsx`)
- Guide views → Guides and DML material: reads material (evidence: `src/components/Guide.jsx`)
