# loopfivem/loop-scoot architecture

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

- Interactive diagram: https://gitdiagram.com/loopfivem/loop-scoot
- Repository: https://github.com/loopfivem/loop-scoot

## Overview

LOOP Scoot is a FiveM resource for free or paid scooter rentals and a scooter-collector job. Players open a station kiosk, rent/ride/return scooters, while collectors clock in, collect abandoned or deployed scooters, and hand them in for pay. The resource combines client gameplay, server-side coordination, framework adapters, shared configuration, and NUI screens; streamed vehicle and depot assets support those experiences. README documents the major capabilities, but gameplay Lua sources were not sampled, so links among those systems are left unverified rather than inferred.

Main entry points: [`client/main.lua`](https://github.com/loopfivem/loop-scoot/blob/main/client/main.lua) (Client Runtime), [`server/main.lua`](https://github.com/loopfivem/loop-scoot/blob/main/server/main.lua) (Rental Service), [`client/collection.lua`](https://github.com/loopfivem/loop-scoot/blob/main/client/collection.lua) (Collector Client), [`server/bridge.lua`](https://github.com/loopfivem/loop-scoot/blob/main/server/bridge.lua) (Framework Bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Rental Gameplay"]
  node_client_runtime["Client Runtime<br/>[main.lua]"]
  node_station_interaction["Station Interaction<br/>[interact.lua]"]
  node_rental_server["Rental Service<br/>[main.lua]"]
  node_energy["Scooter Energy<br/>[scooter_energy.lua]"]
  node_energy_server["Energy Server<br/>[scooter_energy.lua]"]
  node_rental_config["Rental Config<br/>[config.lua]"]
end

subgraph group_collection["Collector Job"]
  node_collector_client["Collector Client<br/>[collection.lua]"]
  node_collector_server["Collector Service<br/>[collection.lua]"]
  node_collector_config["Collector Config"]
  node_motion["Motion Sequences"]
end

subgraph group_integration["Framework Integration"]
  node_framework_bridge["Framework Bridge<br/>[bridge.lua]"]
  node_client_bridge["Client Bridge<br/>[bridge.lua]"]
  node_diagnostics["Setup Diagnostics<br/>[diagnostics.lua]"]
  node_locales["Locales<br/>[locales.lua]"]
end

subgraph group_ui["Player Interfaces"]
  node_station_kiosk["Station Kiosk UI<br/>[index.html]"]
  node_collector_ui["Collector Job UI<br/>[collection.js]"]
  node_overlay_ui["Interaction Overlay<br/>[loop-overlay.js]"]
  node_station_display["Station Display<br/>[screen.js]"]
  node_scooter_display["Scooter Display<br/>[screen.js]"]
  node_mechanism_audio["Mechanism Audio<br/>[mechanism.js]"]
end

subgraph group_assets["Game Assets"]
  node_vehicle_assets["Scooter and Truck"]
  node_depot_assets["Depot Site"]
end

node_player(("Player"))
node_player_framework{{"Framework or Standalone"}}
node_five_m{{"FiveM Runtime"}}

node_player -->|"plays in"| node_client_runtime
node_client_runtime -.->|"supports"| node_station_interaction
node_station_interaction -.->|"requests rental"| node_rental_server
node_rental_server -.->|"uses framework"| node_framework_bridge
node_rental_server -->|"uses settings"| node_rental_config
node_rental_server -.->|"opens dialog"| node_station_kiosk
node_player -->|"works shift"| node_collector_client
node_collector_client -.->|"requests job actions"| node_collector_server
node_collector_server -.->|"uses framework"| node_framework_bridge
node_collector_server -->|"uses settings"| node_collector_config
node_collector_client -.->|"uses sequences"| node_motion
node_collector_client -.->|"shows job screen"| node_collector_ui
node_client_runtime -->|"uses adapters"| node_client_bridge
node_player_framework -->|"adapts"| node_framework_bridge
node_diagnostics -.->|"checks setup"| node_framework_bridge
node_client_runtime -.->|"uses translations"| node_locales
node_client_runtime -.->|"updates overlay"| node_overlay_ui
node_rental_server -.->|"updates display"| node_station_display
node_client_runtime -.->|"sends telemetry"| node_scooter_display
node_client_runtime -.->|"sends phase"| node_mechanism_audio
node_energy -->|"uses range settings"| node_rental_config
node_client_runtime -.->|"supports riding"| node_energy
node_energy_server -.->|"uses range settings"| node_rental_config
node_five_m -->|"runs resource"| node_client_runtime
node_five_m -->|"runs resource"| node_rental_server
node_five_m -->|"streams assets"| node_vehicle_assets
node_five_m -->|"streams site"| node_depot_assets

click node_client_runtime "https://github.com/loopfivem/loop-scoot/blob/main/client/main.lua"
click node_station_interaction "https://github.com/loopfivem/loop-scoot/blob/main/client/interact.lua"
click node_rental_server "https://github.com/loopfivem/loop-scoot/blob/main/server/main.lua"
click node_energy "https://github.com/loopfivem/loop-scoot/blob/main/client/scooter_energy.lua"
click node_energy_server "https://github.com/loopfivem/loop-scoot/blob/main/server/scooter_energy.lua"
click node_rental_config "https://github.com/loopfivem/loop-scoot/blob/main/shared/config.lua"
click node_collector_client "https://github.com/loopfivem/loop-scoot/blob/main/client/collection.lua"
click node_collector_server "https://github.com/loopfivem/loop-scoot/blob/main/server/collection.lua"
click node_collector_config "https://github.com/loopfivem/loop-scoot/blob/main/shared/collection_config.lua"
click node_motion "https://github.com/loopfivem/loop-scoot/blob/main/shared/collection_motion.lua"
click node_framework_bridge "https://github.com/loopfivem/loop-scoot/blob/main/server/bridge.lua"
click node_client_bridge "https://github.com/loopfivem/loop-scoot/blob/main/client/bridge.lua"
click node_diagnostics "https://github.com/loopfivem/loop-scoot/blob/main/server/diagnostics.lua"
click node_locales "https://github.com/loopfivem/loop-scoot/blob/main/shared/locales.lua"
click node_station_kiosk "https://github.com/loopfivem/loop-scoot/blob/main/web/index.html"
click node_collector_ui "https://github.com/loopfivem/loop-scoot/blob/main/web/collection.js"
click node_overlay_ui "https://github.com/loopfivem/loop-scoot/blob/main/web/loop-overlay.js"
click node_station_display "https://github.com/loopfivem/loop-scoot/blob/main/web/station-display/screen.js"
click node_scooter_display "https://github.com/loopfivem/loop-scoot/blob/main/web/scooter-display/screen.js"
click node_mechanism_audio "https://github.com/loopfivem/loop-scoot/blob/main/web/mechanism.js"
click node_vehicle_assets "https://github.com/loopfivem/loop-scoot/tree/main/stream"
click node_depot_assets "https://github.com/loopfivem/loop-scoot/tree/main/stream"

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_client_runtime,node_station_interaction,node_rental_server,node_energy,node_energy_server,node_rental_config toneBlue
class node_collector_client,node_collector_server,node_collector_config,node_motion toneAmber
class node_framework_bridge,node_client_bridge,node_diagnostics,node_locales toneMint
class node_station_kiosk,node_collector_ui,node_overlay_ui,node_station_display,node_scooter_display,node_mechanism_audio toneRose
class node_vehicle_assets,node_depot_assets,node_player,node_player_framework,node_five_m toneIndigo
```

## Components

### Rental Gameplay

- [Client Runtime](https://github.com/loopfivem/loop-scoot/blob/main/client/main.lua): `client/main.lua`
- [Station Interaction](https://github.com/loopfivem/loop-scoot/blob/main/client/interact.lua): `client/interact.lua`
- [Rental Service](https://github.com/loopfivem/loop-scoot/blob/main/server/main.lua): `server/main.lua`
- [Scooter Energy](https://github.com/loopfivem/loop-scoot/blob/main/client/scooter_energy.lua): `client/scooter_energy.lua`
- [Energy Server](https://github.com/loopfivem/loop-scoot/blob/main/server/scooter_energy.lua): `server/scooter_energy.lua`
- [Rental Config](https://github.com/loopfivem/loop-scoot/blob/main/shared/config.lua): `shared/config.lua`

### Collector Job

- [Collector Client](https://github.com/loopfivem/loop-scoot/blob/main/client/collection.lua): `client/collection.lua`
- [Collector Service](https://github.com/loopfivem/loop-scoot/blob/main/server/collection.lua): `server/collection.lua`
- [Collector Config](https://github.com/loopfivem/loop-scoot/blob/main/shared/collection_config.lua): `shared/collection_config.lua`
- [Motion Sequences](https://github.com/loopfivem/loop-scoot/blob/main/shared/collection_motion.lua): `shared/collection_motion.lua`

### Framework Integration

- [Framework Bridge](https://github.com/loopfivem/loop-scoot/blob/main/server/bridge.lua): `server/bridge.lua`
- [Client Bridge](https://github.com/loopfivem/loop-scoot/blob/main/client/bridge.lua): `client/bridge.lua`
- [Setup Diagnostics](https://github.com/loopfivem/loop-scoot/blob/main/server/diagnostics.lua): `server/diagnostics.lua`
- [Locales](https://github.com/loopfivem/loop-scoot/blob/main/shared/locales.lua): `shared/locales.lua`

### Player Interfaces

- [Station Kiosk UI](https://github.com/loopfivem/loop-scoot/blob/main/web/index.html): `web/index.html`
- [Collector Job UI](https://github.com/loopfivem/loop-scoot/blob/main/web/collection.js): `web/collection.js`
- [Interaction Overlay](https://github.com/loopfivem/loop-scoot/blob/main/web/loop-overlay.js): `web/loop-overlay.js`
- [Station Display](https://github.com/loopfivem/loop-scoot/blob/main/web/station-display/screen.js): `web/station-display/screen.js`
- [Scooter Display](https://github.com/loopfivem/loop-scoot/blob/main/web/scooter-display/screen.js): `web/scooter-display/screen.js`
- [Mechanism Audio](https://github.com/loopfivem/loop-scoot/blob/main/web/mechanism.js): `web/mechanism.js`

### Game Assets

- [Scooter and Truck](https://github.com/loopfivem/loop-scoot/tree/main/stream): `stream`
- [Depot Site](https://github.com/loopfivem/loop-scoot/tree/main/stream): `stream`

### Other components

- **Player**
- **Framework or Standalone**
- **FiveM Runtime**

## Connections

- Player → Client Runtime: plays in (evidence: `README.md`)
- Client Runtime → Station Interaction: supports
- Station Interaction → Rental Service: requests rental
- Rental Service → Framework Bridge: uses framework
- Rental Service → Rental Config: uses settings (evidence: `README.md`)
- Rental Service → Station Kiosk UI: opens dialog
- Player → Collector Client: works shift (evidence: `README.md`)
- Collector Client → Collector Service: requests job actions
- Collector Service → Framework Bridge: uses framework
- Collector Service → Collector Config: uses settings (evidence: `README.md`)
- Collector Client → Motion Sequences: uses sequences
- Collector Client → Collector Job UI: shows job screen
- Client Runtime → Client Bridge: uses adapters (evidence: `README.md`)
- Framework or Standalone → Framework Bridge: adapts (evidence: `README.md`)
- Setup Diagnostics → Framework Bridge: checks setup
- Client Runtime → Locales: uses translations
- Client Runtime → Interaction Overlay: updates overlay
- Rental Service → Station Display: updates display
- Client Runtime → Scooter Display: sends telemetry
- Client Runtime → Mechanism Audio: sends phase
- Scooter Energy → Rental Config: uses range settings (evidence: `README.md`)
- Client Runtime → Scooter Energy: supports riding
- Energy Server → Rental Config: uses range settings
- FiveM Runtime → Client Runtime: runs resource (evidence: `README.md`)
- FiveM Runtime → Rental Service: runs resource (evidence: `README.md`)
- FiveM Runtime → Scooter and Truck: streams assets (evidence: `README.md`)
- FiveM Runtime → Depot Site: streams site (evidence: `README.md`)
