# rogue-1120/hide-seek-ultra architecture

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

- Interactive diagram: https://gitdiagram.com/rogue-1120/hide-seek-ultra
- Repository: https://github.com/rogue-1120/hide-seek-ultra

## Overview

Night Ops is a live, location-based hide-and-seek game: players join a coded lobby, take roles, then use a map and live location updates through timed rounds until the seeker catches everyone or time expires. The README documents a React frontend, a throttled geolocation hook, and a Motoko Internet Computer contract, along with lobby, boundary, visibility, radar, and catch rules. The supplied tree contains no inspectable source files, so component paths are null and the diagram reflects documented behavior rather than verified module-level wiring.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Game frontend"]
  node_webapp["Game interface"]
  node_navigation["App navigation"]
  node_map["Live game map"]
  node_geo["Location hook"]
end

subgraph group_lobby["Lobby setup"]
  node_lobby["Coded lobby"]
  node_identity["Player colors"]
  node_roles["Role selection"]
  node_rps["RPS tie-break"]
end

subgraph group_round["Round mechanics"]
  node_bounds["500m boundary"]
  node_phases["Round phases"]
  node_visibility["Visibility rules"]
  node_radar["Seeker radar"]
  node_catch["Catch check"]
  node_outcome["Round outcome"]
end

subgraph group_backend["Game backend"]
  node_contract["Game contract"]
  node_game_state[("Game state")]
  node_distance["Distance rules"]
end

node_players(("Players"))
node_ic["Internet Computer"]

node_players -->|"use"| node_webapp
node_webapp -->|"navigate"| node_navigation
node_webapp -->|"join or host"| node_lobby
node_players -->|"choose color"| node_identity
node_players -->|"select role"| node_roles
node_roles -->|"break ties"| node_rps
node_webapp -->|"request location"| node_geo
node_geo -->|"send throttled updates"| node_contract
node_contract -->|"run on"| node_ic
node_contract -->|"manage state"| node_game_state
node_contract -->|"calculate distances"| node_distance
node_contract -->|"enforce radius"| node_bounds
node_contract -->|"manage timers"| node_phases
node_contract -->|"apply visibility"| node_visibility
node_contract -->|"reveal every 3 minutes"| node_radar
node_contract -->|"check 3m range"| node_catch
node_contract -->|"decide winner"| node_outcome
node_webapp -->|"display game"| node_map
node_map -->|"show visible locations"| node_players

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_webapp,node_navigation,node_map,node_geo toneBlue
class node_lobby,node_identity,node_roles,node_rps toneAmber
class node_bounds,node_phases,node_visibility,node_radar,node_catch,node_outcome toneMint
class node_contract,node_game_state,node_distance toneRose
class node_players,node_ic toneIndigo
```

## Components

### Game frontend

- **Game interface**
- **App navigation**
- **Live game map**
- **Location hook**

### Lobby setup

- **Coded lobby**
- **Player colors**
- **Role selection**
- **RPS tie-break**

### Round mechanics

- **500m boundary**
- **Round phases**
- **Visibility rules**
- **Seeker radar**
- **Catch check**
- **Round outcome**

### Game backend

- **Game contract**
- **Game state**
- **Distance rules**

### Other components

- **Players**
- **Internet Computer**

## Connections

- Players → Game interface: use
- Game interface → App navigation: navigate
- Game interface → Coded lobby: join or host
- Players → Player colors: choose color
- Players → Role selection: select role
- Role selection → RPS tie-break: break ties
- Game interface → Location hook: request location
- Location hook → Game contract: send throttled updates
- Game contract → Internet Computer: run on
- Game contract → Game state: manage state
- Game contract → Distance rules: calculate distances
- Game contract → 500m boundary: enforce radius
- Game contract → Round phases: manage timers
- Game contract → Visibility rules: apply visibility
- Game contract → Seeker radar: reveal every 3 minutes
- Game contract → Catch check: check 3m range
- Game contract → Round outcome: decide winner
- Game interface → Live game map: display game
- Live game map → Players: show visible locations
