# techjarves/portable-local-studio architecture

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

- Interactive diagram: https://gitdiagram.com/techjarves/portable-local-studio
- Repository: https://github.com/techjarves/portable-local-studio

## Overview

Portable AI Studio is an offline desktop/local-web interface for image generation, LLM chat, speech transcription, and speech synthesis. The main workflow is user interaction in the React UI, requests through its API adapter, and local runtime services/backends; model management, settings, and telemetry support those workflows. The README documents additional acceleration and model-management capabilities. Backend request handling is only partly visible in the excerpts, so unverified service links are dashed.

Main entry points: [`app/frontend/src/App.jsx`](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/App.jsx) (Workspace shell), [`app/frontend/src/services/api.js`](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/services/api.js) (Runtime API adapter), [`scripts/search/core.js`](https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/core.js) (Web search orchestration), [`app/frontend/src/components/Settings.jsx`](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Settings.jsx) (Settings and tuning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Studio UI"]
  node_app["Workspace shell<br/>[App.jsx]"]
  node_navigation["Navigation<br/>[Sidebar.jsx]"]
  node_status["Status monitor<br/>[TopStatusBar.jsx]"]
  node_themes["Themes<br/>[themes.js]"]
end

subgraph group_models["Models and Settings"]
  node_generator["Image generation<br/>[Generator.jsx]"]
  node_manager["Model manager<br/>[ModelManager.jsx]"]
  node_settings["Settings and tuning<br/>[Settings.jsx]"]
  node_chat["LLM chat<br/>[TextChat.jsx]"]
end

subgraph group_speech["Speech Workflows"]
  node_transcriber["Speech transcription"]
  node_tts["Text to speech<br/>[TextToSpeech.jsx]"]
end

subgraph group_runtime["Local Runtime"]
  node_api["Runtime API adapter<br/>[api.js]"]
  node_server["Local server and lifecycle<br/>[serve.cjs]"]
  node_search["Web search orchestration<br/>[core.js]"]
  node_providers["Search providers<br/>[providers.js]"]
  node_fetcher["Page content fetcher<br/>[content.js]"]
  node_cache["Search cache<br/>[cache.js]"]
  node_local_engines["Local AI engines"]
end

node_user(("Studio user"))
node_web(("Public web"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_status
node_app -->|"renders"| node_generator
node_app -->|"renders"| node_manager
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_transcriber
node_app -->|"renders"| node_tts
node_app -->|"loads status"| node_api
node_status -->|"uses"| node_themes
node_settings -->|"uses"| node_themes
node_generator -->|"requests generation"| node_api
node_manager -->|"manages models"| node_api
node_settings -->|"tunes runtime"| node_api
node_chat -->|"sends chat"| node_api
node_transcriber -->|"transcribes audio"| node_api
node_tts -->|"requests speech"| node_api
node_api -.->|"calls local API"| node_server
node_server -.->|"manages backends"| node_local_engines
node_chat -.->|"adds web context"| node_search
node_search -->|"queries"| node_providers
node_search -->|"fetches pages"| node_fetcher
node_search -->|"reads and writes"| node_cache
node_providers -.->|"searches"| node_web
node_fetcher -->|"fetches pages"| node_web

click node_app "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/App.jsx"
click node_navigation "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Sidebar.jsx"
click node_status "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/TopStatusBar.jsx"
click node_themes "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/themes.js"
click node_generator "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Generator.jsx"
click node_manager "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/ModelManager.jsx"
click node_settings "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Settings.jsx"
click node_chat "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/TextChat.jsx"
click node_transcriber "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/SpeechTranscriber.jsx"
click node_tts "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/TextToSpeech.jsx"
click node_api "https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/services/api.js"
click node_server "https://github.com/techjarves/portable-local-studio/blob/main/scripts/server/serve.cjs"
click node_search "https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/core.js"
click node_providers "https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/providers.js"
click node_fetcher "https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/content.js"
click node_cache "https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/cache.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_app,node_navigation,node_status,node_themes,node_user toneBlue
class node_generator,node_manager,node_settings,node_chat toneAmber
class node_transcriber,node_tts toneMint
class node_api,node_server,node_search,node_providers,node_fetcher,node_cache,node_local_engines toneRose
class node_web toneIndigo
```

## Components

### Studio UI

- [Workspace shell](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/App.jsx): `app/frontend/src/App.jsx`
- [Navigation](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Sidebar.jsx): `app/frontend/src/components/Sidebar.jsx`
- [Status monitor](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/TopStatusBar.jsx): `app/frontend/src/components/TopStatusBar.jsx`
- [Themes](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/themes.js): `app/frontend/src/themes.js`

### Models and Settings

- [Image generation](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Generator.jsx): `app/frontend/src/components/Generator.jsx`
- [Model manager](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/ModelManager.jsx): `app/frontend/src/components/ModelManager.jsx`
- [Settings and tuning](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/Settings.jsx): `app/frontend/src/components/Settings.jsx`
- [LLM chat](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/TextChat.jsx): `app/frontend/src/components/TextChat.jsx`

### Speech Workflows

- [Speech transcription](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/SpeechTranscriber.jsx): `app/frontend/src/components/SpeechTranscriber.jsx`
- [Text to speech](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/components/TextToSpeech.jsx): `app/frontend/src/components/TextToSpeech.jsx`

### Local Runtime

- [Runtime API adapter](https://github.com/techjarves/portable-local-studio/blob/main/app/frontend/src/services/api.js): `app/frontend/src/services/api.js`
- [Local server and lifecycle](https://github.com/techjarves/portable-local-studio/blob/main/scripts/server/serve.cjs): `scripts/server/serve.cjs`
- [Web search orchestration](https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/core.js): `scripts/search/core.js`
- [Search providers](https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/providers.js): `scripts/search/providers.js`
- [Page content fetcher](https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/content.js): `scripts/search/content.js`
- [Search cache](https://github.com/techjarves/portable-local-studio/blob/main/scripts/search/cache.js): `scripts/search/cache.js`
- **Local AI engines**

### Other components

- **Studio user**
- **Public web**

## Connections

- Studio user → Workspace shell: uses (evidence: `README.md`)
- Workspace shell → Navigation: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Status monitor: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Image generation: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Model manager: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Settings and tuning: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → LLM chat: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Speech transcription: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Text to speech: renders (evidence: `app/frontend/src/App.jsx`)
- Workspace shell → Runtime API adapter: loads status (evidence: `app/frontend/src/App.jsx`)
- Status monitor → Themes: uses (evidence: `app/frontend/src/components/TopStatusBar.jsx`)
- Settings and tuning → Themes: uses (evidence: `app/frontend/src/components/Settings.jsx`)
- Image generation → Runtime API adapter: requests generation (evidence: `app/frontend/src/components/Generator.jsx`)
- Model manager → Runtime API adapter: manages models (evidence: `app/frontend/src/components/ModelManager.jsx`)
- Settings and tuning → Runtime API adapter: tunes runtime (evidence: `app/frontend/src/components/Settings.jsx`)
- LLM chat → Runtime API adapter: sends chat (evidence: `app/frontend/src/components/TextChat.jsx`)
- Speech transcription → Runtime API adapter: transcribes audio (evidence: `app/frontend/src/components/SpeechTranscriber.jsx`)
- Text to speech → Runtime API adapter: requests speech (evidence: `app/frontend/src/components/TextToSpeech.jsx`)
- Runtime API adapter → Local server and lifecycle: calls local API (evidence: `app/frontend/src/services/api.js`)
- Local server and lifecycle → Local AI engines: manages backends (evidence: `README.md`)
- LLM chat → Web search orchestration: adds web context
- Web search orchestration → Search providers: queries (evidence: `scripts/search/core.js`)
- Web search orchestration → Page content fetcher: fetches pages (evidence: `scripts/search/core.js`)
- Web search orchestration → Search cache: reads and writes (evidence: `scripts/search/core.js`)
- Search providers → Public web: searches
- Page content fetcher → Public web: fetches pages (evidence: `scripts/search/content.js`)
