# ybgentures/gtrs architecture

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

- Interactive diagram: https://gitdiagram.com/ybgentures/gtrs
- Repository: https://github.com/ybgentures/gtrs

## Overview

This Laravel application serves an Indonesian student-oriented site with public information pages, student login and data access, and an online chess feature. The visible chess workflow routes requests through GameController for matchmaking, moves, game status and results, with room, move and leaderboard models holding game state. Public page and authentication routing are also represented. Evidence is limited to the supplied excerpts, source index and generic Laravel README; several page capabilities are identifiable from the tree, but their route wiring was not fully sampled.

Main entry points: [`routes/web.php`](https://github.com/ybgentures/gtrs/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/GameController.php`](https://github.com/ybgentures/gtrs/blob/main/app/Http/Controllers/GameController.php) (Game controller), [`app/Http/Controllers/AuthController.php`](https://github.com/ybgentures/gtrs/blob/main/app/Http/Controllers/AuthController.php) (Login handler), [`routes/PelajarController.php`](https://github.com/ybgentures/gtrs/blob/main/routes/PelajarController.php) (Student routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Web routing"]
  node_web_entry["Laravel entry<br/>[index.php]"]
  node_app_boot["App bootstrap<br/>[app.php]"]
  node_web_routes["Web routes<br/>[web.php]"]
end

subgraph group_identity["Identity and students"]
  node_auth_routes["Auth routes<br/>[web.php]"]
  node_auth["Login handler<br/>[AuthController.php]"]
  node_student_routes["Student routes"]
  node_student_records[("Student records")]
  node_login_page["Login page<br/>[login.blade.php]"]
  node_student_pages["Student page<br/>[pelajar.blade.php]"]
end

subgraph group_content["Site content"]
  node_content_routes["Content routes<br/>[NewsController.php]"]
  node_remember_routes["Memory routes"]
  node_content_pages["Information pages"]
end

subgraph group_chess["Chess game"]
  node_chess_routes["Chess routes<br/>[web_catur.php]"]
  node_game_controller["Game controller<br/>[GameController.php]"]
  node_game_page["Chess page<br/>[catur.blade.php]"]
  node_game_js["Chess client<br/>[catur-game.js]"]
  node_game_room[("Room state<br/>[GameRoom.php]")]
  node_game_moves[("Move history<br/>[GameMove.php]")]
  node_leaderboard[("Leaderboard")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_web_entry
node_web_entry -->|"loads application"| node_app_boot
node_app_boot -->|"registers routes"| node_web_routes
node_web_routes -->|"loads routes"| node_auth_routes
node_web_routes -->|"loads routes"| node_student_routes
node_web_routes -->|"loads routes"| node_content_routes
node_web_routes -->|"loads routes"| node_remember_routes
node_web_routes -->|"loads routes"| node_chess_routes
node_auth_routes -->|"dispatches to"| node_auth
node_auth -->|"checks credentials"| node_student_records
node_auth -->|"renders"| node_login_page
node_student_routes -->|"reads records"| node_student_records
node_student_routes -->|"renders"| node_student_pages
node_content_routes -->|"renders news"| node_content_pages
node_remember_routes -->|"renders entries"| node_content_pages
node_chess_routes -->|"dispatches to"| node_game_controller
node_game_controller -->|"renders"| node_game_page
node_game_controller -->|"manages rooms"| node_game_room
node_game_controller -->|"records moves"| node_game_moves
node_game_controller -->|"updates scores"| node_leaderboard
node_game_js -.->|"sends game requests"| node_game_controller

click node_web_entry "https://github.com/ybgentures/gtrs/blob/main/public/index.php"
click node_app_boot "https://github.com/ybgentures/gtrs/blob/main/bootstrap/app.php"
click node_web_routes "https://github.com/ybgentures/gtrs/blob/main/routes/web.php"
click node_auth_routes "https://github.com/ybgentures/gtrs/blob/main/routes/web.php"
click node_auth "https://github.com/ybgentures/gtrs/blob/main/app/Http/Controllers/AuthController.php"
click node_student_routes "https://github.com/ybgentures/gtrs/blob/main/routes/PelajarController.php"
click node_login_page "https://github.com/ybgentures/gtrs/blob/main/resources/views/auth/login.blade.php"
click node_student_pages "https://github.com/ybgentures/gtrs/blob/main/resources/views/pages/pelajar.blade.php"
click node_content_routes "https://github.com/ybgentures/gtrs/blob/main/routes/NewsController.php"
click node_remember_routes "https://github.com/ybgentures/gtrs/blob/main/routes/RememberController.php"
click node_content_pages "https://github.com/ybgentures/gtrs/tree/main/resources/views/pages"
click node_chess_routes "https://github.com/ybgentures/gtrs/blob/main/routes/web_catur.php"
click node_game_controller "https://github.com/ybgentures/gtrs/blob/main/app/Http/Controllers/GameController.php"
click node_game_page "https://github.com/ybgentures/gtrs/blob/main/resources/views/pages/catur.blade.php"
click node_game_js "https://github.com/ybgentures/gtrs/blob/main/resources/js/game/catur-game.js"
click node_game_room "https://github.com/ybgentures/gtrs/blob/main/app/Models/GameRoom.php"
click node_game_moves "https://github.com/ybgentures/gtrs/blob/main/app/Models/GameMove.php"
click node_leaderboard "https://github.com/ybgentures/gtrs/blob/main/app/Models/GameLeaderboard.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_web_entry,node_app_boot,node_web_routes toneBlue
class node_auth_routes,node_auth,node_student_routes,node_student_records,node_login_page,node_student_pages toneAmber
class node_content_routes,node_remember_routes,node_content_pages toneMint
class node_chess_routes,node_game_controller,node_game_page,node_game_js,node_game_room,node_game_moves,node_leaderboard toneRose
class node_visitor toneIndigo
```

## Components

### Web routing

- [Laravel entry](https://github.com/ybgentures/gtrs/blob/main/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/ybgentures/gtrs/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Web routes](https://github.com/ybgentures/gtrs/blob/main/routes/web.php): `routes/web.php`

### Identity and students

- [Auth routes](https://github.com/ybgentures/gtrs/blob/main/routes/web.php): `routes/web.php`
- [Login handler](https://github.com/ybgentures/gtrs/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Student routes](https://github.com/ybgentures/gtrs/blob/main/routes/PelajarController.php): `routes/PelajarController.php`
- **Student records**
- [Login page](https://github.com/ybgentures/gtrs/blob/main/resources/views/auth/login.blade.php): `resources/views/auth/login.blade.php`
- [Student page](https://github.com/ybgentures/gtrs/blob/main/resources/views/pages/pelajar.blade.php): `resources/views/pages/pelajar.blade.php`

### Site content

- [Content routes](https://github.com/ybgentures/gtrs/blob/main/routes/NewsController.php): `routes/NewsController.php`
- [Memory routes](https://github.com/ybgentures/gtrs/blob/main/routes/RememberController.php): `routes/RememberController.php`
- [Information pages](https://github.com/ybgentures/gtrs/tree/main/resources/views/pages): `resources/views/pages`

### Chess game

- [Chess routes](https://github.com/ybgentures/gtrs/blob/main/routes/web_catur.php): `routes/web_catur.php`
- [Game controller](https://github.com/ybgentures/gtrs/blob/main/app/Http/Controllers/GameController.php): `app/Http/Controllers/GameController.php`
- [Chess page](https://github.com/ybgentures/gtrs/blob/main/resources/views/pages/catur.blade.php): `resources/views/pages/catur.blade.php`
- [Chess client](https://github.com/ybgentures/gtrs/blob/main/resources/js/game/catur-game.js): `resources/js/game/catur-game.js`
- [Room state](https://github.com/ybgentures/gtrs/blob/main/app/Models/GameRoom.php): `app/Models/GameRoom.php`
- [Move history](https://github.com/ybgentures/gtrs/blob/main/app/Models/GameMove.php): `app/Models/GameMove.php`
- [Leaderboard](https://github.com/ybgentures/gtrs/blob/main/app/Models/GameLeaderboard.php): `app/Models/GameLeaderboard.php`

### Other components

- **Visitor**

## Connections

- Visitor → Laravel entry: requests pages (evidence: `public/index.php`)
- Laravel entry → App bootstrap: loads application (evidence: `public/index.php`)
- App bootstrap → Web routes: registers routes (evidence: `bootstrap/app.php`)
- Web routes → Auth routes: loads routes (evidence: `routes/web.php`)
- Web routes → Student routes: loads routes (evidence: `routes/web.php`)
- Web routes → Content routes: loads routes (evidence: `routes/web.php`)
- Web routes → Memory routes: loads routes (evidence: `routes/web.php`)
- Web routes → Chess routes: loads routes (evidence: `routes/web.php`)
- Auth routes → Login handler: dispatches to (evidence: `routes/web.php`)
- Login handler → Student records: checks credentials (evidence: `app/Http/Controllers/AuthController.php`)
- Login handler → Login page: renders (evidence: `app/Http/Controllers/AuthController.php`)
- Student routes → Student records: reads records (evidence: `routes/PelajarController.php`)
- Student routes → Student page: renders (evidence: `routes/PelajarController.php`)
- Content routes → Information pages: renders news (evidence: `routes/NewsController.php`)
- Memory routes → Information pages: renders entries (evidence: `routes/RememberController.php`)
- Chess routes → Game controller: dispatches to (evidence: `routes/web_catur.php`)
- Game controller → Chess page: renders (evidence: `app/Http/Controllers/GameController.php`)
- Game controller → Room state: manages rooms (evidence: `app/Http/Controllers/GameController.php`)
- Game controller → Move history: records moves (evidence: `app/Http/Controllers/GameController.php`)
- Game controller → Leaderboard: updates scores (evidence: `app/Http/Controllers/GameController.php`)
- Chess client → Game controller: sends game requests
