# jbabatinca/freezetag.con-osu architecture

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

- Interactive diagram: https://gitdiagram.com/jbabatinca/freezetag.con-osu
- Repository: https://github.com/jbabatinca/freezetag.con-osu

## Overview

Freeze Tag is a browser-based freezer-layout simulator and training tool for student workers and lab managers. Visitors enter through the app’s role-based screens: managers configure and save freezer layouts and timed question sets; students inspect layouts or run tutorial/custom training, then review recorded attempts. Layout search, bulk editing, exports, authentication, and themes are additional capabilities. The main controller and several service relationships are evidenced by excerpts or the source index; broader feature links use explicit README statements where available.

Main entry points: [`src/render/App.ts`](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/App.ts) (App controller), [`src/render/FreezerEditor.ts`](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/FreezerEditor.ts) (Freezer editor), [`src/render/QuestionSetRunView.ts`](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/QuestionSetRunView.ts) (Training and tutorial), [`src/services/StorageService.ts`](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/StorageService.ts) (Browser layout storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_app["App controller<br/>[App.ts]"]
  node_home["Role home screens"]
  node_navigation["Navigation<br/>[Navigation.ts]"]
  node_about["About and settings<br/>[AboutModal.ts]"]
end

subgraph group_freezer["Freezer Management"]
  node_editor["Freezer editor<br/>[FreezerEditor.ts]"]
  node_configuration["Configuration screen"]
  node_bulkpanel["Bulk fill panel<br/>[BulkFillPanel.ts]"]
  node_freezerservice["Freezer editing<br/>[FreezerService.ts]"]
  node_bulkservice["Bulk fill planning<br/>[BulkFillService.ts]"]
  node_searchview["Layout search UI"]
  node_searchservice["Layout search"]
end

subgraph group_training["Training and History"]
  node_creator["Question set creator"]
  node_runner["Training and tutorial"]
  node_questions["Question set operations"]
  node_targets["Question target lookup"]
  node_historyview["Progress history"]
  node_history["Attempt history"]
end

subgraph group_domain["Domain Models"]
  node_layoutmodel["Saved layouts<br/>[SavedLayout.ts]"]
  node_freezermodel["Freezer format<br/>[freezerLayout.ts]"]
  node_questionmodel["Question sets<br/>[QuestionSet.ts]"]
  node_attemptmodel["Attempt records<br/>[AttemptRecord.ts]"]
end

subgraph group_persistence["Persistence and State"]
  node_storage[("Browser layout storage<br/>[StorageService.ts]")]
  node_auth["Admin authentication<br/>[authState.ts]"]
  node_layoutstate["Layout state<br/>[layoutState.ts]"]
  node_editorstate["Editor state<br/>[editorState.ts]"]
  node_theme["Theme state<br/>[themeState.ts]"]
  node_exportstate["Export preferences<br/>[exportState.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_app
node_app -->|"renders screens"| node_home
node_app -->|"uses navigation"| node_navigation
node_app -->|"renders modal"| node_about
node_app -->|"routes to"| node_configuration
node_configuration -->|"renders editor"| node_editor
node_configuration -->|"reads layouts"| node_storage
node_app -->|"saves layouts"| node_storage
node_editor -->|"searches layouts"| node_searchservice
node_searchview -->|"shows results"| node_searchservice
node_app -->|"finds matches"| node_searchservice
node_bulkpanel -->|"plans updates"| node_bulkservice
node_bulkservice -->|"applies edits"| node_freezerservice
node_editor -->|"opens panel"| node_bulkpanel
node_app -->|"routes to"| node_creator
node_creator -->|"manages sets"| node_questions
node_creator -->|"validates targets"| node_targets
node_app -->|"routes to"| node_runner
node_runner -->|"loads sets"| node_questions
node_runner -->|"resolves targets"| node_targets
node_runner -->|"records attempts"| node_history
node_historyview -->|"loads history"| node_history
node_history -->|"stores records"| node_attemptmodel
node_questions -->|"handles sets"| node_questionmodel
node_targets -->|"reads target types"| node_questionmodel
node_storage -->|"fills positions"| node_freezerservice
node_storage -->|"reads and writes"| node_layoutmodel
node_layoutmodel -->|"contains data"| node_freezermodel
node_attemptmodel -->|"uses results"| node_questionmodel
node_navigation -->|"checks role"| node_auth
node_app -->|"updates selection"| node_layoutstate
node_editor -->|"uses editor state"| node_editorstate
node_app -->|"initializes theme"| node_theme
node_editor -->|"uses export choice"| node_exportstate
node_visitor -->|"chooses role"| node_home
node_runner -->|"reviews results"| node_historyview
node_editor -.->|"imports or exports layouts"| node_storage

click node_app "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/App.ts"
click node_home "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/UserModeHomeView.ts"
click node_navigation "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/Navigation.ts"
click node_about "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/AboutModal.ts"
click node_editor "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/FreezerEditor.ts"
click node_configuration "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/ConfigurationModeView.ts"
click node_bulkpanel "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/BulkFillPanel.ts"
click node_freezerservice "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/FreezerService.ts"
click node_bulkservice "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/BulkFillService.ts"
click node_searchview "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/LayoutSearchView.ts"
click node_searchservice "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/LayoutSearchService.ts"
click node_creator "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/QuestionSetCreatorView.ts"
click node_runner "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/QuestionSetRunView.ts"
click node_questions "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/QuestionSetService.ts"
click node_targets "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/QuestionTargetService.ts"
click node_historyview "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/ProgressHistoryView.ts"
click node_history "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/AttemptHistoryService.ts"
click node_layoutmodel "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/SavedLayout.ts"
click node_freezermodel "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/freezerLayout.ts"
click node_questionmodel "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/QuestionSet.ts"
click node_attemptmodel "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/AttemptRecord.ts"
click node_storage "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/StorageService.ts"
click node_auth "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/authState.ts"
click node_layoutstate "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/layoutState.ts"
click node_editorstate "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/editorState.ts"
click node_theme "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/themeState.ts"
click node_exportstate "https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/exportState.ts"

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_app,node_home,node_navigation,node_about toneBlue
class node_editor,node_configuration,node_bulkpanel,node_freezerservice,node_bulkservice,node_searchview,node_searchservice toneAmber
class node_creator,node_runner,node_questions,node_targets,node_historyview,node_history toneMint
class node_layoutmodel,node_freezermodel,node_questionmodel,node_attemptmodel toneRose
class node_storage,node_auth,node_layoutstate,node_editorstate,node_theme,node_exportstate,node_visitor toneIndigo
```

## Components

### Application UI

- [App controller](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/App.ts): `src/render/App.ts`
- [Role home screens](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/UserModeHomeView.ts): `src/render/UserModeHomeView.ts`
- [Navigation](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/Navigation.ts): `src/render/Navigation.ts`
- [About and settings](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/AboutModal.ts): `src/render/AboutModal.ts`

### Freezer Management

- [Freezer editor](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/FreezerEditor.ts): `src/render/FreezerEditor.ts`
- [Configuration screen](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/ConfigurationModeView.ts): `src/render/ConfigurationModeView.ts`
- [Bulk fill panel](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/BulkFillPanel.ts): `src/render/BulkFillPanel.ts`
- [Freezer editing](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/FreezerService.ts): `src/services/FreezerService.ts`
- [Bulk fill planning](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/BulkFillService.ts): `src/services/BulkFillService.ts`
- [Layout search UI](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/LayoutSearchView.ts): `src/render/LayoutSearchView.ts`
- [Layout search](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/LayoutSearchService.ts): `src/services/LayoutSearchService.ts`

### Training and History

- [Question set creator](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/QuestionSetCreatorView.ts): `src/render/QuestionSetCreatorView.ts`
- [Training and tutorial](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/QuestionSetRunView.ts): `src/render/QuestionSetRunView.ts`
- [Question set operations](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/QuestionSetService.ts): `src/services/QuestionSetService.ts`
- [Question target lookup](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/QuestionTargetService.ts): `src/services/QuestionTargetService.ts`
- [Progress history](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/render/ProgressHistoryView.ts): `src/render/ProgressHistoryView.ts`
- [Attempt history](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/AttemptHistoryService.ts): `src/services/AttemptHistoryService.ts`

### Domain Models

- [Saved layouts](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/SavedLayout.ts): `src/models/SavedLayout.ts`
- [Freezer format](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/freezerLayout.ts): `src/models/freezerLayout.ts`
- [Question sets](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/QuestionSet.ts): `src/models/QuestionSet.ts`
- [Attempt records](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/models/AttemptRecord.ts): `src/models/AttemptRecord.ts`

### Persistence and State

- [Browser layout storage](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/services/StorageService.ts): `src/services/StorageService.ts`
- [Admin authentication](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/authState.ts): `src/state/authState.ts`
- [Layout state](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/layoutState.ts): `src/state/layoutState.ts`
- [Editor state](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/editorState.ts): `src/state/editorState.ts`
- [Theme state](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/themeState.ts): `src/state/themeState.ts`
- [Export preferences](https://github.com/jbabatinca/freezetag.con-osu/blob/main/src/state/exportState.ts): `src/state/exportState.ts`

### Other components

- **Visitor**

## Connections

- Visitor → App controller: opens app (evidence: `README.md`)
- App controller → Role home screens: renders screens (evidence: `src/render/App.ts`)
- App controller → Navigation: uses navigation (evidence: `src/render/App.ts`)
- App controller → About and settings: renders modal (evidence: `src/render/App.ts`)
- App controller → Configuration screen: routes to (evidence: `src/render/App.ts`)
- Configuration screen → Freezer editor: renders editor (evidence: `src/render/ConfigurationModeView.ts`)
- Configuration screen → Browser layout storage: reads layouts (evidence: `src/render/ConfigurationModeView.ts`)
- App controller → Browser layout storage: saves layouts (evidence: `src/render/App.ts`)
- Freezer editor → Layout search: searches layouts (evidence: `src/render/FreezerEditor.ts`)
- Layout search UI → Layout search: shows results (evidence: `src/render/LayoutSearchView.ts`)
- App controller → Layout search: finds matches (evidence: `src/render/App.ts`)
- Bulk fill panel → Bulk fill planning: plans updates (evidence: `src/render/BulkFillPanel.ts`)
- Bulk fill planning → Freezer editing: applies edits (evidence: `src/services/BulkFillService.ts`)
- Freezer editor → Bulk fill panel: opens panel (evidence: `src/render/FreezerEditor.ts`)
- App controller → Question set creator: routes to (evidence: `src/render/App.ts`)
- Question set creator → Question set operations: manages sets (evidence: `src/render/QuestionSetCreatorView.ts`)
- Question set creator → Question target lookup: validates targets (evidence: `src/render/QuestionSetCreatorView.ts`)
- App controller → Training and tutorial: routes to (evidence: `src/render/App.ts`)
- Training and tutorial → Question set operations: loads sets (evidence: `src/render/QuestionSetRunView.ts`)
- Training and tutorial → Question target lookup: resolves targets (evidence: `src/render/QuestionSetRunView.ts`)
- Training and tutorial → Attempt history: records attempts (evidence: `src/render/QuestionSetRunView.ts`)
- Progress history → Attempt history: loads history (evidence: `src/render/ProgressHistoryView.ts`)
- Attempt history → Attempt records: stores records (evidence: `src/services/AttemptHistoryService.ts`)
- Question set operations → Question sets: handles sets (evidence: `src/services/QuestionSetService.ts`)
- Question target lookup → Question sets: reads target types (evidence: `src/services/QuestionTargetService.ts`)
- Browser layout storage → Freezer editing: fills positions (evidence: `src/services/StorageService.ts`)
- Browser layout storage → Saved layouts: reads and writes (evidence: `src/services/StorageService.ts`)
- Saved layouts → Freezer format: contains data (evidence: `src/models/SavedLayout.ts`)
- Attempt records → Question sets: uses results (evidence: `src/models/AttemptRecord.ts`)
- Navigation → Admin authentication: checks role (evidence: `src/render/Navigation.ts`)
- App controller → Layout state: updates selection (evidence: `src/render/App.ts`)
- Freezer editor → Editor state: uses editor state (evidence: `src/render/FreezerEditor.ts`)
- App controller → Theme state: initializes theme (evidence: `src/index.ts`)
- Freezer editor → Export preferences: uses export choice (evidence: `src/state/exportState.ts`)
- Visitor → Role home screens: chooses role (evidence: `README.md`)
- Training and tutorial → Progress history: reviews results (evidence: `README.md`)
- Freezer editor → Browser layout storage: imports or exports layouts (evidence: `README.md`)
