# ghostpants0111/vos architecture

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

- Interactive diagram: https://gitdiagram.com/ghostpants0111/vos
- Repository: https://github.com/ghostpants0111/vos

## Overview

Vos is an installable, offline-capable Spanish reference for learners, tuned for Uruguay and configurable for 20 Spanish-speaking countries. The main workflow is to enter a verb or conjugated form and view its conjugation; when the verb is absent, the app can ask an AI provider. Separate AI workflows support word lookup, translation, typed or dictated correction, and photo-based translation or correction. Settings, saved items, and history persist in the browser. The service worker caches the app for offline use. Some feature links are documented in the README; unsampled app sections limit source-level detail.

Main entry points: [`app.js`](https://github.com/ghostpants0111/vos/blob/main/app.js) (App interface), [`sw.js`](https://github.com/ghostpants0111/vos/blob/main/sw.js) (Offline cache), [`data/verbs.json`](https://github.com/ghostpants0111/vos/blob/main/data/verbs.json) (Verb data), [`lib/qrcode.js`](https://github.com/ghostpants0111/vos/blob/main/lib/qrcode.js) (QR generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reference["Verb reference"]
  node_interface["App interface<br/>[app.js]"]
  node_conjugation["Conjugation lookup<br/>[app.js]"]
  node_verb_data["Verb data<br/>[verbs.json]"]
  node_ai_conjugation["AI conjugation<br/>[app.js]"]
end

subgraph group_ai["AI language tools"]
  node_word_tools["Word lookup<br/>[app.js]"]
  node_translation["Translation<br/>[app.js]"]
  node_correction["Text correction<br/>[app.js]"]
  node_photo_input["Photo input<br/>[app.js]"]
  node_speech_input["Dictation input<br/>[app.js]"]
  node_ai_request["AI requests<br/>[app.js]"]
end

subgraph group_state["Settings and saved data"]
  node_settings["App settings<br/>[app.js]"]
  node_saved_history["Saved and history<br/>[app.js]"]
  node_browser_storage[("Browser storage")]
end

subgraph group_app_runtime["App runtime"]
  node_qr_generator["QR generation<br/>[qrcode.js]"]
  node_offline_cache["Offline cache<br/>[sw.js]"]
end

node_learner(("Learner"))
node_ai_provider{{"Anthropic or Gemini"}}
node_browser{{"Browser"}}

node_learner -->|"uses"| node_interface
node_interface -->|"looks up"| node_conjugation
node_conjugation -->|"reads"| node_verb_data
node_conjugation -->|"requests missing verbs"| node_ai_conjugation
node_interface -->|"opens"| node_word_tools
node_interface -->|"opens"| node_translation
node_interface -->|"opens"| node_correction
node_photo_input -->|"provides image"| node_translation
node_photo_input -->|"provides image"| node_correction
node_speech_input -->|"provides dictation"| node_translation
node_speech_input -->|"provides dictation"| node_correction
node_ai_conjugation -->|"calls"| node_ai_request
node_word_tools -.->|"calls"| node_ai_request
node_translation -.->|"calls"| node_ai_request
node_correction -.->|"calls"| node_ai_request
node_ai_request -->|"sends requests"| node_ai_provider
node_settings -->|"reads and writes"| node_browser_storage
node_saved_history -->|"reads and writes"| node_browser_storage
node_interface -->|"generates codes"| node_qr_generator
node_browser -->|"runs"| node_offline_cache
node_offline_cache -->|"caches app files"| node_interface
node_offline_cache -->|"caches data"| node_verb_data

click node_interface "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_conjugation "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_verb_data "https://github.com/ghostpants0111/vos/blob/main/data/verbs.json"
click node_ai_conjugation "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_word_tools "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_translation "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_correction "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_photo_input "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_speech_input "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_ai_request "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_settings "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_saved_history "https://github.com/ghostpants0111/vos/blob/main/app.js"
click node_qr_generator "https://github.com/ghostpants0111/vos/blob/main/lib/qrcode.js"
click node_offline_cache "https://github.com/ghostpants0111/vos/blob/main/sw.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_interface,node_conjugation,node_verb_data,node_ai_conjugation,node_browser toneBlue
class node_word_tools,node_translation,node_correction,node_photo_input,node_speech_input,node_ai_request toneAmber
class node_settings,node_saved_history,node_browser_storage toneMint
class node_qr_generator,node_offline_cache toneRose
class node_learner,node_ai_provider toneIndigo
```

## Components

### Verb reference

- [App interface](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Conjugation lookup](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Verb data](https://github.com/ghostpants0111/vos/blob/main/data/verbs.json): `data/verbs.json`
- [AI conjugation](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`

### AI language tools

- [Word lookup](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Translation](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Text correction](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Photo input](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Dictation input](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [AI requests](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`

### Settings and saved data

- [App settings](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- [Saved and history](https://github.com/ghostpants0111/vos/blob/main/app.js): `app.js`
- **Browser storage**

### App runtime

- [QR generation](https://github.com/ghostpants0111/vos/blob/main/lib/qrcode.js): `lib/qrcode.js`
- [Offline cache](https://github.com/ghostpants0111/vos/blob/main/sw.js): `sw.js`

### Other components

- **Learner**
- **Anthropic or Gemini**
- **Browser**

## Connections

- Learner → App interface: uses (evidence: `README.md`)
- App interface → Conjugation lookup: looks up (evidence: `README.md`)
- Conjugation lookup → Verb data: reads (evidence: `README.md`)
- Conjugation lookup → AI conjugation: requests missing verbs (evidence: `app.js`)
- App interface → Word lookup: opens (evidence: `README.md`)
- App interface → Translation: opens (evidence: `README.md`)
- App interface → Text correction: opens (evidence: `README.md`)
- Photo input → Translation: provides image (evidence: `app.js`)
- Photo input → Text correction: provides image (evidence: `app.js`)
- Dictation input → Translation: provides dictation (evidence: `README.md`)
- Dictation input → Text correction: provides dictation (evidence: `README.md`)
- AI conjugation → AI requests: calls (evidence: `app.js`)
- Word lookup → AI requests: calls (evidence: `app.js`)
- Translation → AI requests: calls (evidence: `app.js`)
- Text correction → AI requests: calls (evidence: `app.js`)
- AI requests → Anthropic or Gemini: sends requests (evidence: `README.md`)
- App settings → Browser storage: reads and writes (evidence: `app.js`)
- Saved and history → Browser storage: reads and writes (evidence: `app.js`)
- App interface → QR generation: generates codes (evidence: `app.js`)
- Browser → Offline cache: runs (evidence: `sw.js`)
- Offline cache → App interface: caches app files (evidence: `sw.js`)
- Offline cache → Verb data: caches data (evidence: `sw.js`)
