# kokokoder/buzzer architecture

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

- Interactive diagram: https://gitdiagram.com/kokokoder/buzzer
- Repository: https://github.com/kokokoder/buzzer

## Overview

This Laravel app supports quiz hosts who register, create a room, and share its key with players; players join and use a single buzzer, while the host manages scores and sees the fastest team. The graph separates account access, room setup and joining, live play, and the host’s results view. Controller-to-model calls are evidenced by excerpts; several live-play and host-panel details are documented in the README but their implementation was not sampled, so those links cite the README rather than implying inspected code.

Main entry points: [`app/Http/Controllers/BuzzerController.php`](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/BuzzerController.php) (Room and buzzer actions), [`app/Http/Controllers/Auth/LoginController.php`](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/Auth/LoginController.php) (Account access), [`routes/web.php`](https://github.com/kokokoder/buzzer/blob/develop/routes/web.php) (Web request routes), [`app/Http/Controllers/Auth/RegisterController.php`](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/Auth/RegisterController.php) (User registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts"]
  node_auth["Account access"]
  node_registration["User registration"]
  node_user["User account<br/>[User.php]"]
end

subgraph group_rooms["Room setup"]
  node_buzzer["Room and buzzer actions"]
  node_game["Game room<br/>[Game.php]"]
  node_membership["Room membership<br/>[joinGameRoom.php]"]
  node_create_view["Create room view"]
  node_join_view["Join room view<br/>[joingame.blade.php]"]
end

subgraph group_play["Live play"]
  node_team_view["Team buzzer view"]
  node_live_race["First-buzz state"]
end

subgraph group_host["Host results"]
  node_host_view["Host game panel<br/>[hostview.blade.php]"]
  node_score["Score management<br/>[hostview.blade.php]"]
  node_fastest["Fastest team display<br/>[hostview.blade.php]"]
end

node_players(("Players and host"))
node_routes["Web request routes<br/>[web.php]"]
node_facebook{{"Facebook login"}}

node_players -->|"sign in"| node_auth
node_players -->|"register"| node_registration
node_registration -->|"creates account"| node_user
node_auth -.->|"optional login"| node_facebook
node_routes -->|"routes requests"| node_buzzer
node_routes -.->|"routes requests"| node_auth
node_players -->|"create room"| node_create_view
node_create_view -.->|"submits room"| node_buzzer
node_buzzer -->|"saves room"| node_game
node_players -->|"enter room key"| node_join_view
node_join_view -.->|"submits join"| node_buzzer
node_buzzer -->|"saves membership"| node_membership
node_buzzer -->|"reads rooms"| node_game
node_players -->|"press buzzer"| node_team_view
node_team_view -.->|"sends buzz"| node_live_race
node_live_race -.->|"displays winner"| node_fastest
node_players -->|"manage game"| node_host_view
node_host_view -->|"manages scores"| node_score

click node_auth "https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/Auth/LoginController.php"
click node_registration "https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/Auth/RegisterController.php"
click node_user "https://github.com/kokokoder/buzzer/blob/develop/app/User.php"
click node_buzzer "https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/BuzzerController.php"
click node_game "https://github.com/kokokoder/buzzer/blob/develop/app/Game.php"
click node_membership "https://github.com/kokokoder/buzzer/blob/develop/app/joinGameRoom.php"
click node_create_view "https://github.com/kokokoder/buzzer/blob/develop/resources/views/creategame.blade.php"
click node_join_view "https://github.com/kokokoder/buzzer/blob/develop/resources/views/joingame.blade.php"
click node_team_view "https://github.com/kokokoder/buzzer/blob/develop/resources/views/teamscreen.blade.php"
click node_live_race "https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/BuzzerController.php"
click node_host_view "https://github.com/kokokoder/buzzer/blob/develop/resources/views/hostview.blade.php"
click node_score "https://github.com/kokokoder/buzzer/blob/develop/resources/views/hostview.blade.php"
click node_fastest "https://github.com/kokokoder/buzzer/blob/develop/resources/views/hostview.blade.php"
click node_routes "https://github.com/kokokoder/buzzer/blob/develop/routes/web.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_auth,node_registration,node_user toneBlue
class node_buzzer,node_game,node_membership,node_create_view,node_join_view toneAmber
class node_team_view,node_live_race,node_routes toneMint
class node_host_view,node_score,node_fastest toneRose
class node_players,node_facebook toneIndigo
```

## Components

### Accounts

- [Account access](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`
- [User registration](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/Auth/RegisterController.php): `app/Http/Controllers/Auth/RegisterController.php`
- [User account](https://github.com/kokokoder/buzzer/blob/develop/app/User.php): `app/User.php`

### Room setup

- [Room and buzzer actions](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/BuzzerController.php): `app/Http/Controllers/BuzzerController.php`
- [Game room](https://github.com/kokokoder/buzzer/blob/develop/app/Game.php): `app/Game.php`
- [Room membership](https://github.com/kokokoder/buzzer/blob/develop/app/joinGameRoom.php): `app/joinGameRoom.php`
- [Create room view](https://github.com/kokokoder/buzzer/blob/develop/resources/views/creategame.blade.php): `resources/views/creategame.blade.php`
- [Join room view](https://github.com/kokokoder/buzzer/blob/develop/resources/views/joingame.blade.php): `resources/views/joingame.blade.php`

### Live play

- [Team buzzer view](https://github.com/kokokoder/buzzer/blob/develop/resources/views/teamscreen.blade.php): `resources/views/teamscreen.blade.php`
- [First-buzz state](https://github.com/kokokoder/buzzer/blob/develop/app/Http/Controllers/BuzzerController.php): `app/Http/Controllers/BuzzerController.php`

### Host results

- [Host game panel](https://github.com/kokokoder/buzzer/blob/develop/resources/views/hostview.blade.php): `resources/views/hostview.blade.php`
- [Score management](https://github.com/kokokoder/buzzer/blob/develop/resources/views/hostview.blade.php): `resources/views/hostview.blade.php`
- [Fastest team display](https://github.com/kokokoder/buzzer/blob/develop/resources/views/hostview.blade.php): `resources/views/hostview.blade.php`

### Other components

- **Players and host**
- [Web request routes](https://github.com/kokokoder/buzzer/blob/develop/routes/web.php): `routes/web.php`
- **Facebook login**

## Connections

- Players and host → Account access: sign in
- Players and host → User registration: register
- User registration → User account: creates account (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
- Account access → Facebook login: optional login
- Web request routes → Room and buzzer actions: routes requests (evidence: `routes/web.php`)
- Web request routes → Account access: routes requests
- Players and host → Create room view: create room
- Create room view → Room and buzzer actions: submits room
- Room and buzzer actions → Game room: saves room (evidence: `app/Http/Controllers/BuzzerController.php`)
- Players and host → Join room view: enter room key
- Join room view → Room and buzzer actions: submits join
- Room and buzzer actions → Room membership: saves membership (evidence: `app/Http/Controllers/BuzzerController.php`)
- Room and buzzer actions → Game room: reads rooms (evidence: `app/Http/Controllers/BuzzerController.php`)
- Players and host → Team buzzer view: press buzzer
- Team buzzer view → First-buzz state: sends buzz
- First-buzz state → Fastest team display: displays winner
- Players and host → Host game panel: manage game
- Host game panel → Score management: manages scores
