# samogdovin193-dotcom/robottomas architecture

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

- Interactive diagram: https://gitdiagram.com/samogdovin193-dotcom/robottomas
- Repository: https://github.com/samogdovin193-dotcom/robottomas

## Overview

Robot Tomáš is a bilingual, browser-based speech-audiometry and hearing-screening app. A user selects speaker or left/right headphone mode, optionally calibrates, then hears recorded words at changing levels and answers using picture cards; the app presents a scored history and evaluation. The Slovak and Romani folders are parallel implementations with localized media. The graph shows the documented calibration and test flow plus settings, custom words, and browser persistence. Some page wiring and storage details are unsampled, so uncertain links are omitted.

Main entry points: [`sk/game.js`](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/game.js) (Audiometry game), [`sk/finish.js`](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/finish.js) (Calibration save), [`sk/settings.js`](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/settings.js) (Test settings), [`sk/kalibracia.js`](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/kalibracia.js) (Calibration flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Language and setup"]
  node_sk["Slovak app"]
  node_rom["Romani app"]
  node_manual["Mode instructions<br/>[manual.js]"]
  node_settings["Test settings<br/>[settings.js]"]
  node_start["Test start<br/>[start_game.js]"]
end

subgraph group_calibration["Calibration"]
  node_calibration["Calibration flow<br/>[kalibracia.js]"]
  node_finish["Calibration save<br/>[finish.js]"]
end

subgraph group_testing["Speech test"]
  node_game["Audiometry game<br/>[game.js]"]
  node_audio["Localized recordings"]
  node_earaudio["Ear-specific recordings"]
  node_pictures["Picture cards"]
  node_rommedia["Romani media"]
end

subgraph group_persistence["Results and data"]
  node_result["Results evaluation<br/>[result.js]"]
  node_wordsdb[("Custom words store")]
  node_caldb[("Calibration store")]
  node_local[("Browser local storage")]
end

node_user(("Test participant"))

node_user -->|"opens Slovak app"| node_sk
node_user -->|"opens Romani app"| node_rom
node_manual -->|"starts mode"| node_start
node_manual -->|"checks records"| node_caldb
node_settings -->|"manages words"| node_wordsdb
node_settings -->|"saves levels"| node_local
node_settings -->|"clears data"| node_caldb
node_start -->|"launches test"| node_game
node_calibration -->|"launches calibration test"| node_game
node_calibration -->|"stores mode"| node_local
node_calibration -->|"reads history"| node_caldb
node_game -->|"loads custom words"| node_wordsdb
node_game -->|"stores answers"| node_local
node_game -->|"plays recordings"| node_audio
node_game -->|"plays selected ear"| node_earaudio
node_game -->|"renders choices"| node_pictures
node_game -->|"ends test"| node_finish
node_finish -->|"reads answer history"| node_local
node_finish -->|"saves calibration"| node_caldb
node_finish -->|"opens results"| node_result
node_result -->|"reads scores and history"| node_local
node_rom -.->|"provides localized audio"| node_rommedia

click node_sk "https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk"
click node_rom "https://github.com/samogdovin193-dotcom/robottomas/tree/main/rom"
click node_manual "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/manual.js"
click node_settings "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/settings.js"
click node_start "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/start_game.js"
click node_calibration "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/kalibracia.js"
click node_finish "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/finish.js"
click node_game "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/game.js"
click node_audio "https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk/audio"
click node_earaudio "https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk/audio_lave_ucho"
click node_pictures "https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk/images"
click node_result "https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/result.js"
click node_rommedia "https://github.com/samogdovin193-dotcom/robottomas/tree/main/rom/audio"

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_sk,node_rom,node_manual,node_settings,node_start toneBlue
class node_calibration,node_finish toneAmber
class node_game,node_audio,node_earaudio,node_pictures,node_rommedia toneMint
class node_result,node_wordsdb,node_caldb,node_local toneRose
class node_user toneIndigo
```

## Components

### Language and setup

- [Slovak app](https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk): `sk`
- [Romani app](https://github.com/samogdovin193-dotcom/robottomas/tree/main/rom): `rom`
- [Mode instructions](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/manual.js): `sk/manual.js`
- [Test settings](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/settings.js): `sk/settings.js`
- [Test start](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/start_game.js): `sk/start_game.js`

### Calibration

- [Calibration flow](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/kalibracia.js): `sk/kalibracia.js`
- [Calibration save](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/finish.js): `sk/finish.js`

### Speech test

- [Audiometry game](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/game.js): `sk/game.js`
- [Localized recordings](https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk/audio): `sk/audio`
- [Ear-specific recordings](https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk/audio_lave_ucho): `sk/audio_lave_ucho`
- [Picture cards](https://github.com/samogdovin193-dotcom/robottomas/tree/main/sk/images): `sk/images`
- [Romani media](https://github.com/samogdovin193-dotcom/robottomas/tree/main/rom/audio): `rom/audio`

### Results and data

- [Results evaluation](https://github.com/samogdovin193-dotcom/robottomas/blob/main/sk/result.js): `sk/result.js`
- **Custom words store**
- **Calibration store**
- **Browser local storage**

### Other components

- **Test participant**

## Connections

- Test participant → Slovak app: opens Slovak app
- Test participant → Romani app: opens Romani app
- Mode instructions → Test start: starts mode
- Mode instructions → Calibration store: checks records
- Test settings → Custom words store: manages words
- Test settings → Browser local storage: saves levels
- Test settings → Calibration store: clears data
- Test start → Audiometry game: launches test
- Calibration flow → Audiometry game: launches calibration test
- Calibration flow → Browser local storage: stores mode
- Calibration flow → Calibration store: reads history
- Audiometry game → Custom words store: loads custom words
- Audiometry game → Browser local storage: stores answers
- Audiometry game → Localized recordings: plays recordings
- Audiometry game → Ear-specific recordings: plays selected ear
- Audiometry game → Picture cards: renders choices
- Audiometry game → Calibration save: ends test
- Calibration save → Browser local storage: reads answer history
- Calibration save → Calibration store: saves calibration
- Calibration save → Results evaluation: opens results
- Results evaluation → Browser local storage: reads scores and history
- Romani app → Romani media: provides localized audio
