# theitstreamer/stinger-studio architecture

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

- Interactive diagram: https://gitdiagram.com/theitstreamer/stinger-studio
- Repository: https://github.com/theitstreamer/stinger-studio

## Overview

Stinger Studio is a local desktop app for turning user images into OBS stinger transition files. The main workflow runs from the HTML interface through a Python bridge to the render engine, then lets the user save the result and use its transition-point timing in OBS. The README also describes presets, update checks, audio, logos, and batch rendering. The sampled source shows the bridge and parts of the engine; some UI and rendering internals are not shown, so those relationships are documented at the subsystem level.

Main entry points: [`engine.py`](https://github.com/theitstreamer/stinger-studio/blob/main/engine.py) (Render engine), [`app.py`](https://github.com/theitstreamer/stinger-studio/blob/main/app.py) (Python API bridge), [`ui.html`](https://github.com/theitstreamer/stinger-studio/blob/main/ui.html) (HTML interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_ui["HTML interface<br/>[ui.html]"]
  node_bridge["Python API bridge<br/>[app.py]"]
  node_assets["Image and audio assets<br/>[app.py]"]
end

subgraph group_rendering["Transition rendering"]
  node_engine["Render engine<br/>[engine.py]"]
  node_imageprep["Image preparation<br/>[engine.py]"]
  node_layout["Style and layout<br/>[engine.py]"]
  node_frames["Frame rendering<br/>[engine.py]"]
  node_encoding["Video encoding<br/>[engine.py]"]
end

subgraph group_support["App services"]
  node_presets[("Presets and settings<br/>[app.py]")]
  node_updates["Update check<br/>[app.py]"]
end

node_user(("User"))
node_releases["Releases service"]
node_ffmpeg["FFmpeg"]
node_savedfile["Rendered output"]
node_obs["OBS"]

node_user -->|"configures"| node_ui
node_ui -->|"calls API"| node_bridge
node_bridge -->|"stores uploads"| node_assets
node_bridge -->|"runs render"| node_engine
node_bridge -->|"reads and writes"| node_presets
node_ui -->|"checks on startup"| node_updates
node_updates -->|"checks releases"| node_releases
node_engine -->|"loads images"| node_imageprep
node_engine -->|"builds layout"| node_layout
node_engine -->|"renders frames"| node_frames
node_engine -->|"encodes output"| node_encoding
node_encoding -.->|"uses encoder"| node_ffmpeg
node_engine -->|"produces file"| node_savedfile
node_bridge -->|"saves file"| node_savedfile
node_user -->|"uses transition"| node_obs

click node_ui "https://github.com/theitstreamer/stinger-studio/blob/main/ui.html"
click node_bridge "https://github.com/theitstreamer/stinger-studio/blob/main/app.py"
click node_assets "https://github.com/theitstreamer/stinger-studio/blob/main/app.py"
click node_presets "https://github.com/theitstreamer/stinger-studio/blob/main/app.py"
click node_updates "https://github.com/theitstreamer/stinger-studio/blob/main/app.py"
click node_engine "https://github.com/theitstreamer/stinger-studio/blob/main/engine.py"
click node_imageprep "https://github.com/theitstreamer/stinger-studio/blob/main/engine.py"
click node_layout "https://github.com/theitstreamer/stinger-studio/blob/main/engine.py"
click node_frames "https://github.com/theitstreamer/stinger-studio/blob/main/engine.py"
click node_encoding "https://github.com/theitstreamer/stinger-studio/blob/main/engine.py"

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_ui,node_bridge,node_assets,node_user toneBlue
class node_engine,node_imageprep,node_layout,node_frames,node_encoding toneAmber
class node_presets,node_updates toneMint
class node_releases,node_ffmpeg,node_savedfile,node_obs toneIndigo
```

## Components

### Desktop interface

- [HTML interface](https://github.com/theitstreamer/stinger-studio/blob/main/ui.html): `ui.html`
- [Python API bridge](https://github.com/theitstreamer/stinger-studio/blob/main/app.py): `app.py`
- [Image and audio assets](https://github.com/theitstreamer/stinger-studio/blob/main/app.py): `app.py`

### Transition rendering

- [Render engine](https://github.com/theitstreamer/stinger-studio/blob/main/engine.py): `engine.py`
- [Image preparation](https://github.com/theitstreamer/stinger-studio/blob/main/engine.py): `engine.py`
- [Style and layout](https://github.com/theitstreamer/stinger-studio/blob/main/engine.py): `engine.py`
- [Frame rendering](https://github.com/theitstreamer/stinger-studio/blob/main/engine.py): `engine.py`
- [Video encoding](https://github.com/theitstreamer/stinger-studio/blob/main/engine.py): `engine.py`

### App services

- [Presets and settings](https://github.com/theitstreamer/stinger-studio/blob/main/app.py): `app.py`
- [Update check](https://github.com/theitstreamer/stinger-studio/blob/main/app.py): `app.py`

### Other components

- **User**
- **Releases service**
- **FFmpeg**
- **Rendered output**
- **OBS**

## Connections

- User → HTML interface: configures (evidence: `README.md`)
- HTML interface → Python API bridge: calls API (evidence: `app.py`)
- Python API bridge → Image and audio assets: stores uploads (evidence: `app.py`)
- Python API bridge → Render engine: runs render (evidence: `app.py`)
- Python API bridge → Presets and settings: reads and writes (evidence: `app.py`)
- HTML interface → Update check: checks on startup (evidence: `README.md`)
- Update check → Releases service: checks releases (evidence: `README.md`)
- Render engine → Image preparation: loads images (evidence: `engine.py`)
- Render engine → Style and layout: builds layout (evidence: `engine.py`)
- Render engine → Frame rendering: renders frames (evidence: `engine.py`)
- Render engine → Video encoding: encodes output (evidence: `README.md`)
- Video encoding → FFmpeg: uses encoder
- Render engine → Rendered output: produces file (evidence: `README.md`)
- Python API bridge → Rendered output: saves file (evidence: `app.py`)
- User → OBS: uses transition (evidence: `README.md`)
