# djsmartyp/ufn-escape architecture

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

- Interactive diagram: https://gitdiagram.com/djsmartyp/ufn-escape
- Repository: https://github.com/djsmartyp/ufn-escape

## Overview

Operation Deadbolt is a browser-based, single-player escape adventure. The player explores the station through Bucket’s camera, gathers clues and items, solves restoration and launch puzzles, then survives a timed Ghost attack and escapes before self-destruction. The main game file owns the central mission state; the repository also contains two field-trial game variants, briefing and audio features, and a separate drone simulation. Relationships are limited to calls visible in excerpts or capabilities explicitly described in the README; unsampled wiring is not assumed.

Main entry points: [`game-v2.js`](https://github.com/djsmartyp/ufn-escape/blob/main/game-v2.js) (Mission Game), [`deadbolt-briefing.js`](https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-briefing.js) (Command Briefing), [`deadbolt-audio.js`](https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-audio.js) (Sound & Radio), [`attack-drone.js`](https://github.com/djsmartyp/ufn-escape/blob/main/attack-drone.js) (Drone Simulation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mission["Station Mission"]
  node_main_game["Mission Game<br/>[game-v2.js]"]
  node_local_save[("Local Progress")]
  node_preload["Mission Preload<br/>[mission-preload.js]"]
end

subgraph group_story["Briefing &amp; Audio"]
  node_preamble["Story Preamble"]
  node_briefing["Command Briefing"]
  node_briefing_cues["Transcript Timing<br/>[briefing-cues.js]"]
  node_audio["Sound &amp; Radio<br/>[deadbolt-audio.js]"]
end

subgraph group_combat["Drone Combat"]
  node_drone["Drone Simulation<br/>[attack-drone.js]"]
end

subgraph group_variants["Variants &amp; Sharing"]
  node_share["Mission Share Card<br/>[deadbolt-share.js]"]
  node_alpha["Alpha Trial<br/>[game-v2.js]"]
  node_bravo["Bravo Trial<br/>[game-v2.js]"]
end

node_player(("Player"))

node_player -->|"plays mission"| node_main_game
node_main_game -->|"saves progress"| node_local_save
node_main_game -->|"plays cues"| node_audio
node_briefing -->|"times transcript"| node_briefing_cues
node_preamble -->|"plays cues"| node_audio
node_player -->|"opens transmission"| node_briefing
node_player -->|"pilots attack"| node_drone
node_main_game -.->|"dispatches combat"| node_drone
node_player -.->|"shares report"| node_share

click node_main_game "https://github.com/djsmartyp/ufn-escape/blob/main/game-v2.js"
click node_preload "https://github.com/djsmartyp/ufn-escape/blob/main/mission-preload.js"
click node_preamble "https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-preamble.js"
click node_briefing "https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-briefing.js"
click node_briefing_cues "https://github.com/djsmartyp/ufn-escape/blob/main/briefing-cues.js"
click node_audio "https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-audio.js"
click node_drone "https://github.com/djsmartyp/ufn-escape/blob/main/attack-drone.js"
click node_share "https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-share.js"
click node_alpha "https://github.com/djsmartyp/ufn-escape/blob/main/field-trial/alpha/game-v2.js"
click node_bravo "https://github.com/djsmartyp/ufn-escape/blob/main/field-trial/bravo/game-v2.js"

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_main_game,node_local_save,node_preload toneBlue
class node_preamble,node_briefing,node_briefing_cues,node_audio toneAmber
class node_drone toneMint
class node_share,node_alpha,node_bravo toneRose
class node_player toneIndigo
```

## Components

### Station Mission

- [Mission Game](https://github.com/djsmartyp/ufn-escape/blob/main/game-v2.js): `game-v2.js`
- **Local Progress**
- [Mission Preload](https://github.com/djsmartyp/ufn-escape/blob/main/mission-preload.js): `mission-preload.js`

### Briefing & Audio

- [Story Preamble](https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-preamble.js): `deadbolt-preamble.js`
- [Command Briefing](https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-briefing.js): `deadbolt-briefing.js`
- [Transcript Timing](https://github.com/djsmartyp/ufn-escape/blob/main/briefing-cues.js): `briefing-cues.js`
- [Sound & Radio](https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-audio.js): `deadbolt-audio.js`

### Drone Combat

- [Drone Simulation](https://github.com/djsmartyp/ufn-escape/blob/main/attack-drone.js): `attack-drone.js`

### Variants & Sharing

- [Mission Share Card](https://github.com/djsmartyp/ufn-escape/blob/main/deadbolt-share.js): `deadbolt-share.js`
- [Alpha Trial](https://github.com/djsmartyp/ufn-escape/blob/main/field-trial/alpha/game-v2.js): `field-trial/alpha/game-v2.js`
- [Bravo Trial](https://github.com/djsmartyp/ufn-escape/blob/main/field-trial/bravo/game-v2.js): `field-trial/bravo/game-v2.js`

### Other components

- **Player**

## Connections

- Player → Mission Game: plays mission (evidence: `README.md`)
- Mission Game → Local Progress: saves progress (evidence: `README.md`)
- Mission Game → Sound & Radio: plays cues (evidence: `game-v2.js`)
- Command Briefing → Transcript Timing: times transcript (evidence: `deadbolt-briefing.js`)
- Story Preamble → Sound & Radio: plays cues (evidence: `deadbolt-preamble.js`)
- Player → Command Briefing: opens transmission (evidence: `README.md`)
- Player → Drone Simulation: pilots attack (evidence: `README.md`)
- Mission Game → Drone Simulation: dispatches combat
- Player → Mission Share Card: shares report
