# shobhitx64/whats-it-called architecture

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

- Interactive diagram: https://gitdiagram.com/shobhitx64/whats-it-called
- Repository: https://github.com/shobhitx64/whats-it-called

## Overview

1. This is a Unity application repo, not a typical code-first service. The runtime is driven by Unity scenes under `Assets/Scenes`, with `SampleScene.unity` and `working first.unity` as the main entry points.

2. The product intent is clear from the README: “point at objects to identify them in real time in your preferred language.” Architecturally, that implies a live camera/input pipeline feeding object/text recognition, then a translation/display layer.

3. The main application logic appears to live in `Assets/scripts`, with two scripts:
   - `camtotext.cs`: likely responsible for capturing camera frames or triggering recognition/OCR.
   - `translate.cs`: likely responsible for converting recognized labels/text into the user’s chosen language and updating the UI.
   These two scripts are the core functional boundary of the app.

4. `Assets/plugins/SimpleJSON.cs` indicates the project parses JSON responses directly in Unity. That strongly suggests one or more external services are being called for recognition and/or translation, with JSON used as the data interchange format.

5. The UI/output layer is built around TextMesh Pro rather than Unity’s default text system. The `Assets/TextMesh Pro` package and `Assets/fonts` folder provide fonts, TMP assets, styles, shaders, and sprite assets used to render translated labels and on-screen prompts cleanly.

6. Visual assets are organized as Unity resources rather than a custom asset pipeline:
   - `Assets/materials` contains at least one custom material.
   - `Assets/fonts` contains SDF font assets (`NotoSans-Light SDF`, `NotoSans-Regular SDF`), which are well-suited for crisp runtime text.
   This suggests the visible architecture is centered on readable overlay text, not complex 3D rendering.

7. The repo contains no obvious backend service, database, or server-side code. That means the app is likely a self-contained client built in Unity, depending on Unity runtime plus external web APIs/services for AI/translation functionality if any network calls exist in the scripts.

8. The scene layer is the orchestration boundary: scenes load the scripts, camera/input sources, and text UI elements, while the scripts manage the live flow from sensing to labeling. In an architecture diagram, the scene should be shown as the composition root connecting camera input, recognition logic, translation logic, and UI output.

9. The project settings show standard Unity subsystems enabled/configured (`InputManager`, `Physics2D`, `GraphicsSettings`, `XRSettings`, etc.), but none of these appear to be the core product differentiator. They matter mainly as Unity runtime infrastructure supporting input, rendering, and build configuration.

10. The most important data flow is likely:
   camera/object view → recognition/OCR or detection logic in `camtotext.cs` → raw label/text → translation logic in `translate.cs` → JSON-based service response parsing via `SimpleJSON` → TextMesh Pro UI presentation.

11. There is a clear separation between logic and presentation:
   - Logic: scripts in `Assets/scripts` and JSON parsing in `Assets/plugins`
   - Presentation: scenes, TMP assets, fonts, and materials
   - Platform/runtime: Unity ProjectSettings and Packages
   This separation should be reflected in any architecture diagram.

12. Overall, the repo is a compact Unity client focused on real-time identification and translation, with the two custom scripts forming the application core and TextMesh Pro providing the rendered output layer.

Main entry points: [`Assets/scripts/translate.cs`](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/scripts/translate.cs) (Translate), [`Assets/scripts/camtotext.cs`](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/scripts/camtotext.cs) (Cam To Text), [`Assets/Scenes/SampleScene.unity`](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/Scenes/SampleScene.unity) (SampleScene), [`Assets/Scenes/working first.unity`](https://github.com/shobhitx64/whats-it-called/blob/HEAD/Assets/Scenes/working%20first.unity) (Working First)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_scenes["Scenes"]
  node_node_sample_scene["SampleScene<br/>unity scene<br/>[SampleScene.unity]"]
  node_node_working_scene["Working First<br/>unity scene"]
end

subgraph group_group_logic["Logic"]
  node_node_camtotext["Cam To Text<br/>capture/recognition<br/>[camtotext.cs]"]
  node_node_translate["Translate<br/>translation/output<br/>[translate.cs]"]
  node_node_simplejson["SimpleJSON<br/>json parsing<br/>[SimpleJSON.cs]"]
end

subgraph group_group_presentation["Presentation"]
  node_node_tmp["TextMesh Pro<br/>text rendering"]
  node_node_noto_fonts["Noto Sans SDF<br/>font assets"]
  node_node_tmp_resources["TMP Assets<br/>tmp resources"]
  node_node_materials["Materials<br/>render assets"]
end

subgraph group_group_runtime["Runtime"]
  node_node_packages["Packages<br/>[manifest.json]"]
  node_node_project_settings["Project Settings<br/>unity config"]
  node_node_unity_runtime["Unity Runtime<br/>engine runtime"]
end

node_node_sample_scene -->|"loads"| node_node_camtotext
node_node_sample_scene -->|"loads"| node_node_translate
node_node_working_scene -->|"loads"| node_node_camtotext
node_node_working_scene -->|"loads"| node_node_translate
node_node_camtotext -->|"parses"| node_node_simplejson
node_node_translate -->|"parses"| node_node_simplejson
node_node_camtotext -->|"passes text"| node_node_translate
node_node_translate -->|"renders"| node_node_tmp
node_node_translate -->|"uses"| node_node_noto_fonts
node_node_translate -->|"uses"| node_node_tmp_resources
node_node_translate -->|"styles"| node_node_materials
node_node_packages -->|"extends"| node_node_unity_runtime
node_node_project_settings -->|"configures"| node_node_unity_runtime
node_node_sample_scene -->|"runs on"| node_node_unity_runtime
node_node_working_scene -->|"runs on"| node_node_unity_runtime

click node_node_sample_scene "https://github.com/shobhitx64/whats-it-called/blob/main/Assets/Scenes/SampleScene.unity"
click node_node_working_scene "https://github.com/shobhitx64/whats-it-called/blob/main/Assets/Scenes/working first.unity"
click node_node_camtotext "https://github.com/shobhitx64/whats-it-called/blob/main/Assets/scripts/camtotext.cs"
click node_node_translate "https://github.com/shobhitx64/whats-it-called/blob/main/Assets/scripts/translate.cs"
click node_node_simplejson "https://github.com/shobhitx64/whats-it-called/blob/main/Assets/plugins/SimpleJSON.cs"
click node_node_tmp "https://github.com/shobhitx64/whats-it-called/tree/main/Assets/TextMesh Pro"
click node_node_noto_fonts "https://github.com/shobhitx64/whats-it-called/tree/main/Assets/fonts"
click node_node_tmp_resources "https://github.com/shobhitx64/whats-it-called/tree/main/Assets/TextMesh Pro/Resources"
click node_node_materials "https://github.com/shobhitx64/whats-it-called/tree/main/Assets/materials"
click node_node_packages "https://github.com/shobhitx64/whats-it-called/blob/main/Packages/manifest.json"
click node_node_project_settings "https://github.com/shobhitx64/whats-it-called/tree/main/ProjectSettings"

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_node_sample_scene,node_node_working_scene toneBlue
class node_node_camtotext,node_node_translate,node_node_simplejson toneAmber
class node_node_tmp,node_node_noto_fonts,node_node_tmp_resources,node_node_materials toneMint
class node_node_packages,node_node_project_settings,node_node_unity_runtime toneRose
```

## Components

### Scenes

Unity entry points and scene composition

- [SampleScene](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/Scenes/SampleScene.unity): unity scene · Main scene entry point · `Assets/Scenes/SampleScene.unity`
- [Working First](https://github.com/shobhitx64/whats-it-called/blob/HEAD/Assets/Scenes/working%20first.unity): unity scene · Alternate scene entry point · `Assets/Scenes/working first.unity`

### Logic

Real-time capture, recognition, and translation scripts

- [Cam To Text](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/scripts/camtotext.cs): capture/recognition · Captures live input and triggers object/text recognition · `Assets/scripts/camtotext.cs`
- [Translate](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/scripts/translate.cs): translation/output · Converts recognized labels and prepares displayed text · `Assets/scripts/translate.cs`
- [SimpleJSON](https://github.com/shobhitx64/whats-it-called/blob/main/Assets/plugins/SimpleJSON.cs): json parsing · Parses API responses and structured data · `Assets/plugins/SimpleJSON.cs`

### Presentation

Text rendering assets and visual resources

- [TextMesh Pro](https://github.com/shobhitx64/whats-it-called/tree/HEAD/Assets/TextMesh%20Pro): text rendering · Runtime text system for on-screen labels and prompts · `Assets/TextMesh Pro`
- [Noto Sans SDF](https://github.com/shobhitx64/whats-it-called/tree/main/Assets/fonts): font assets · Readable SDF fonts for translated UI text · `Assets/fonts`
- [TMP Assets](https://github.com/shobhitx64/whats-it-called/tree/HEAD/Assets/TextMesh%20Pro/Resources): tmp resources · Fallbacks, styles, sprites, and TMP settings · `Assets/TextMesh Pro/Resources`
- [Materials](https://github.com/shobhitx64/whats-it-called/tree/main/Assets/materials): render assets · Custom material(s) used by the UI and text rendering · `Assets/materials`

### Runtime

Unity package and project settings

- [Packages](https://github.com/shobhitx64/whats-it-called/blob/main/Packages/manifest.json): unity packages · Installed Unity package dependencies · `Packages/manifest.json`
- [Project Settings](https://github.com/shobhitx64/whats-it-called/tree/main/ProjectSettings): unity config · Unity runtime and build configuration · `ProjectSettings`
- **Unity Runtime**: engine runtime · Engine subsystems for input, graphics, physics, and build execution

## Connections

- SampleScene → Cam To Text: loads · Scene composes the capture/recognition script
- SampleScene → Translate: loads · Scene composes the translation/output script
- Working First → Cam To Text: loads · Alternate scene composes the capture/recognition script
- Working First → Translate: loads · Alternate scene composes the translation/output script
- Cam To Text → SimpleJSON: parses · Recognition or API responses are decoded from JSON
- Translate → SimpleJSON: parses · Translation or lookup responses are decoded from JSON
- Cam To Text → Translate: passes text · Recognized labels flow into translation
- Translate → TextMesh Pro: renders · Translated text is presented in the UI
- Translate → Noto Sans SDF: uses · Translated text relies on SDF font assets
- Translate → TMP Assets: uses · TMP styles, sprite assets, and settings support rendering
- Translate → Materials: styles · UI text appearance is supported by custom materials
- Packages → Unity Runtime: extends · Package dependencies plug into the Unity engine
- Project Settings → Unity Runtime: configures · Project settings define runtime behavior and platform support
- SampleScene → Unity Runtime: runs on · Scene executes within the Unity engine
- Working First → Unity Runtime: runs on · Scene executes within the Unity engine
