# notebook10/sportsbook architecture

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

- Interactive diagram: https://gitdiagram.com/notebook10/sportsbook
- Repository: https://github.com/notebook10/sportsbook

## Overview

This is a Laravel-based sportsbook and betting administration application. The main workflow is a customer viewing schedules and placing straight, parlay, or teaser bets; staff then grade completed bets and move finished records to betting history. The graph also preserves player lookup, current and past bet views, and operator registration. Source excerpts establish several controller-to-model calls and the bet settlement flow; unsampled modules are included where the source index identifies them, but uncertain relationships are omitted.

Main entry points: [`app/Http/Controllers/AdminController.php`](https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/AdminController.php) (Admin controller), [`app/Http/Controllers/HomeController.php`](https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/HomeController.php) (Sportsbook controller), [`app/Betcur.php`](https://github.com/notebook10/sportsbook/blob/master/app/Betcur.php) (Current bets), [`routes/web.php`](https://github.com/notebook10/sportsbook/blob/master/routes/web.php) (Web routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Web runtime"]
  node_front["HTTP entry<br/>[index.php]"]
  node_bootstrap["Application bootstrap<br/>[app.php]"]
  node_routes["Web routes<br/>[web.php]"]
end

subgraph group_sportsbook["Sportsbook"]
  node_home["Sportsbook controller<br/>[HomeController.php]"]
  node_schedule["Schedule data<br/>[Sched.php]"]
  node_current["Current bets<br/>[Betcur.php]"]
  node_details["Bet details<br/>[BetcurDetail.php]"]
  node_history["Past bets<br/>[Betpast.php]"]
end

subgraph group_settlement["Bet settlement"]
  node_admin["Admin controller"]
  node_grading["Result grading"]
end

subgraph group_identity["Accounts and players"]
  node_player["Player accounts<br/>[Player.php]"]
  node_customer_model["Customer records<br/>[Customer.php]"]
  node_operator["Operator accounts<br/>[User.php]"]
  node_registration["Operator registration"]
end

node_customer(("Customer"))
node_database[("Application database")]

node_customer -.->|"sends requests"| node_front
node_front -->|"loads application"| node_bootstrap
node_bootstrap -.->|"registers routing"| node_routes
node_routes -->|"routes requests"| node_home
node_routes -->|"routes requests"| node_admin
node_home -->|"loads schedules"| node_schedule
node_home -->|"saves and lists"| node_current
node_home -->|"loads history"| node_history
node_home -->|"looks up players"| node_player
node_home -->|"uses accounts"| node_operator
node_admin -->|"grades results"| node_grading
node_admin -->|"reads and updates"| node_current
node_admin -->|"updates details"| node_details
node_admin -->|"transfers finished bets"| node_history
node_admin -->|"updates player data"| node_player
node_admin -->|"uses customer data"| node_customer_model
node_current -->|"creates bet details"| node_details
node_registration -->|"creates account"| node_operator
node_current -.->|"queries and writes"| node_database
node_schedule -.->|"queries data"| node_database
node_history -.->|"queries data"| node_database

click node_front "https://github.com/notebook10/sportsbook/blob/master/public/index.php"
click node_bootstrap "https://github.com/notebook10/sportsbook/blob/master/bootstrap/app.php"
click node_routes "https://github.com/notebook10/sportsbook/blob/master/routes/web.php"
click node_home "https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/HomeController.php"
click node_admin "https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/AdminController.php"
click node_schedule "https://github.com/notebook10/sportsbook/blob/master/app/Sched.php"
click node_current "https://github.com/notebook10/sportsbook/blob/master/app/Betcur.php"
click node_details "https://github.com/notebook10/sportsbook/blob/master/app/BetcurDetail.php"
click node_history "https://github.com/notebook10/sportsbook/blob/master/app/Betpast.php"
click node_grading "https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/AdminController.php"
click node_player "https://github.com/notebook10/sportsbook/blob/master/app/Player.php"
click node_customer_model "https://github.com/notebook10/sportsbook/blob/master/app/Customer.php"
click node_operator "https://github.com/notebook10/sportsbook/blob/master/app/User.php"
click node_registration "https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/Auth/RegisterController.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_front,node_bootstrap,node_routes toneBlue
class node_home,node_schedule,node_current,node_details,node_history,node_database toneAmber
class node_admin,node_grading toneMint
class node_player,node_customer_model,node_operator,node_registration toneRose
class node_customer toneIndigo
```

## Components

### Web runtime

- [HTTP entry](https://github.com/notebook10/sportsbook/blob/master/public/index.php): `public/index.php`
- [Application bootstrap](https://github.com/notebook10/sportsbook/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [Web routes](https://github.com/notebook10/sportsbook/blob/master/routes/web.php): `routes/web.php`

### Sportsbook

- [Sportsbook controller](https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`
- [Schedule data](https://github.com/notebook10/sportsbook/blob/master/app/Sched.php): `app/Sched.php`
- [Current bets](https://github.com/notebook10/sportsbook/blob/master/app/Betcur.php): `app/Betcur.php`
- [Bet details](https://github.com/notebook10/sportsbook/blob/master/app/BetcurDetail.php): `app/BetcurDetail.php`
- [Past bets](https://github.com/notebook10/sportsbook/blob/master/app/Betpast.php): `app/Betpast.php`

### Bet settlement

- [Admin controller](https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`
- [Result grading](https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`

### Accounts and players

- [Player accounts](https://github.com/notebook10/sportsbook/blob/master/app/Player.php): `app/Player.php`
- [Customer records](https://github.com/notebook10/sportsbook/blob/master/app/Customer.php): `app/Customer.php`
- [Operator accounts](https://github.com/notebook10/sportsbook/blob/master/app/User.php): `app/User.php`
- [Operator registration](https://github.com/notebook10/sportsbook/blob/master/app/Http/Controllers/Auth/RegisterController.php): `app/Http/Controllers/Auth/RegisterController.php`

### Other components

- **Customer**
- **Application database**

## Connections

- Customer → HTTP entry: sends requests
- HTTP entry → Application bootstrap: loads application (evidence: `public/index.php`)
- Application bootstrap → Web routes: registers routing
- Web routes → Sportsbook controller: routes requests (evidence: `routes/web.php`)
- Web routes → Admin controller: routes requests (evidence: `routes/web.php`)
- Sportsbook controller → Schedule data: loads schedules (evidence: `app/Http/Controllers/HomeController.php`)
- Sportsbook controller → Current bets: saves and lists (evidence: `app/Http/Controllers/HomeController.php`)
- Sportsbook controller → Past bets: loads history (evidence: `app/Http/Controllers/HomeController.php`)
- Sportsbook controller → Player accounts: looks up players (evidence: `app/Http/Controllers/HomeController.php`)
- Sportsbook controller → Operator accounts: uses accounts (evidence: `app/Http/Controllers/HomeController.php`)
- Admin controller → Result grading: grades results (evidence: `app/Http/Controllers/AdminController.php`)
- Admin controller → Current bets: reads and updates (evidence: `app/Http/Controllers/AdminController.php`)
- Admin controller → Bet details: updates details (evidence: `app/Http/Controllers/AdminController.php`)
- Admin controller → Past bets: transfers finished bets (evidence: `app/Http/Controllers/AdminController.php`)
- Admin controller → Player accounts: updates player data (evidence: `app/Http/Controllers/AdminController.php`)
- Admin controller → Customer records: uses customer data (evidence: `app/Http/Controllers/AdminController.php`)
- Current bets → Bet details: creates bet details (evidence: `app/Betcur.php`)
- Operator registration → Operator accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisterController.php`)
- Current bets → Application database: queries and writes
- Schedule data → Application database: queries data
- Past bets → Application database: queries data
