# the-potential-dropout/intern architecture

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

- Interactive diagram: https://gitdiagram.com/the-potential-dropout/intern
- Repository: https://github.com/the-potential-dropout/intern

## Overview

Intern is a private, Windows desktop AI workspace: users chat with local models or ask an agent to work inside a chat-specific folder, then use the app to inspect, transform, and export results. Its product surface also includes voice, web research, image generation, explainers, audiobooks, and extensible plugins. The graph combines README-documented capabilities with sampled backend responsibilities; excerpts are partial, so it avoids inferring most internal dispatch and wiring.

Main entry points: [`app.js`](https://github.com/the-potential-dropout/intern/blob/main/app.js) (Chat and search), [`src/Agent.cs`](https://github.com/the-potential-dropout/intern/blob/main/src/Agent.cs) (OpenCode agent engine), [`agent.js`](https://github.com/the-potential-dropout/intern/blob/main/agent.js) (Agent workspace UI), [`src/Router.cs`](https://github.com/the-potential-dropout/intern/blob/main/src/Router.cs) (Model routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace"]
  node_desktop["Desktop workspace<br/>[app.js]"]
  node_chat["Chat and search<br/>[app.js]"]
  node_voice["Voice chat<br/>[voice.js]"]
  node_web["Web research<br/>[web.js]"]
end

subgraph group_agent["Agent and models"]
  node_agentui["Agent workspace UI<br/>[agent.js]"]
  node_agentengine["OpenCode agent engine<br/>[Agent.cs]"]
  node_modelrouting["Model routing<br/>[Router.cs]"]
  node_models["Model catalog<br/>[models.js]"]
  node_localmodels["Local model runtimes"]
end

subgraph group_media["Files and media"]
  node_files["File and PDF handling<br/>[Files.cs]"]
  node_phone["Phone uploads<br/>[Phone.cs]"]
  node_downloads["File exports<br/>[Files.cs]"]
end

subgraph group_creation["Creative tools"]
  node_imagegen["Image generation<br/>[Image.cs]"]
  node_charts["Charts and diagrams<br/>[charts.js]"]
  node_explainer["Explainer authoring<br/>[explainer.js]"]
  node_videoexport["Video rendering<br/>[Explainer.cs]"]
  node_audiobooks["Audiobooks<br/>[audiobook.js]"]
end

subgraph group_platform["Local platform"]
  node_plugins["Plugins and connectors<br/>[Plugins.cs]"]
  node_storage[("Chat persistence<br/>[Intern.cs]")]
  node_resources["Resource monitoring<br/>[Usage.cs]"]
  node_imageinstall["Image engine setup<br/>[Storage.cs]"]
end

node_user(("User"))

node_user -->|"uses"| node_desktop
node_desktop -->|"opens"| node_chat
node_chat -->|"prompts"| node_localmodels
node_chat -->|"saves chats"| node_storage
node_chat -->|"requests research"| node_web
node_user -->|"starts agent work"| node_agentui
node_agentui -->|"uses"| node_agentengine
node_agentengine -->|"uses"| node_localmodels
node_agentengine -->|"uses connectors"| node_plugins
node_models -->|"offers routing"| node_modelrouting
node_modelrouting -->|"selects models"| node_localmodels
node_user -->|"attaches files"| node_files
node_phone -->|"uploads files"| node_files
node_chat -->|"exports answers"| node_downloads
node_chat -->|"requests images"| node_imagegen
node_chat -->|"renders visuals"| node_charts
node_user -->|"creates video"| node_explainer
node_explainer -->|"exports project"| node_videoexport
node_user -->|"creates audiobook"| node_audiobooks
node_desktop -->|"offers voice"| node_voice
node_desktop -->|"shows resources"| node_resources
node_imageinstall -->|"installs engine"| node_imagegen

click node_desktop "https://github.com/the-potential-dropout/intern/blob/main/app.js"
click node_chat "https://github.com/the-potential-dropout/intern/blob/main/app.js"
click node_voice "https://github.com/the-potential-dropout/intern/blob/main/voice.js"
click node_web "https://github.com/the-potential-dropout/intern/blob/main/web.js"
click node_agentui "https://github.com/the-potential-dropout/intern/blob/main/agent.js"
click node_agentengine "https://github.com/the-potential-dropout/intern/blob/main/src/Agent.cs"
click node_modelrouting "https://github.com/the-potential-dropout/intern/blob/main/src/Router.cs"
click node_models "https://github.com/the-potential-dropout/intern/blob/main/models.js"
click node_files "https://github.com/the-potential-dropout/intern/blob/main/src/Files.cs"
click node_phone "https://github.com/the-potential-dropout/intern/blob/main/src/Phone.cs"
click node_downloads "https://github.com/the-potential-dropout/intern/blob/main/src/Files.cs"
click node_imagegen "https://github.com/the-potential-dropout/intern/blob/main/src/Image.cs"
click node_charts "https://github.com/the-potential-dropout/intern/blob/main/charts.js"
click node_explainer "https://github.com/the-potential-dropout/intern/blob/main/explainer.js"
click node_videoexport "https://github.com/the-potential-dropout/intern/blob/main/src/Explainer.cs"
click node_audiobooks "https://github.com/the-potential-dropout/intern/blob/main/audiobook.js"
click node_plugins "https://github.com/the-potential-dropout/intern/blob/main/src/Plugins.cs"
click node_storage "https://github.com/the-potential-dropout/intern/blob/main/src/Intern.cs"
click node_resources "https://github.com/the-potential-dropout/intern/blob/main/src/Usage.cs"
click node_imageinstall "https://github.com/the-potential-dropout/intern/blob/main/src/Storage.cs"

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_desktop,node_chat,node_voice,node_web,node_user toneBlue
class node_agentui,node_agentengine,node_modelrouting,node_models,node_localmodels toneAmber
class node_files,node_phone,node_downloads toneMint
class node_imagegen,node_charts,node_explainer,node_videoexport,node_audiobooks toneRose
class node_plugins,node_storage,node_resources,node_imageinstall toneIndigo
```

## Components

### Workspace

- [Desktop workspace](https://github.com/the-potential-dropout/intern/blob/main/app.js): `app.js`
- [Chat and search](https://github.com/the-potential-dropout/intern/blob/main/app.js): `app.js`
- [Voice chat](https://github.com/the-potential-dropout/intern/blob/main/voice.js): `voice.js`
- [Web research](https://github.com/the-potential-dropout/intern/blob/main/web.js): `web.js`

### Agent and models

- [Agent workspace UI](https://github.com/the-potential-dropout/intern/blob/main/agent.js): `agent.js`
- [OpenCode agent engine](https://github.com/the-potential-dropout/intern/blob/main/src/Agent.cs): `src/Agent.cs`
- [Model routing](https://github.com/the-potential-dropout/intern/blob/main/src/Router.cs): `src/Router.cs`
- [Model catalog](https://github.com/the-potential-dropout/intern/blob/main/models.js): `models.js`
- **Local model runtimes**

### Files and media

- [File and PDF handling](https://github.com/the-potential-dropout/intern/blob/main/src/Files.cs): `src/Files.cs`
- [Phone uploads](https://github.com/the-potential-dropout/intern/blob/main/src/Phone.cs): `src/Phone.cs`
- [File exports](https://github.com/the-potential-dropout/intern/blob/main/src/Files.cs): `src/Files.cs`

### Creative tools

- [Image generation](https://github.com/the-potential-dropout/intern/blob/main/src/Image.cs): `src/Image.cs`
- [Charts and diagrams](https://github.com/the-potential-dropout/intern/blob/main/charts.js): `charts.js`
- [Explainer authoring](https://github.com/the-potential-dropout/intern/blob/main/explainer.js): `explainer.js`
- [Video rendering](https://github.com/the-potential-dropout/intern/blob/main/src/Explainer.cs): `src/Explainer.cs`
- [Audiobooks](https://github.com/the-potential-dropout/intern/blob/main/audiobook.js): `audiobook.js`

### Local platform

- [Plugins and connectors](https://github.com/the-potential-dropout/intern/blob/main/src/Plugins.cs): `src/Plugins.cs`
- [Chat persistence](https://github.com/the-potential-dropout/intern/blob/main/src/Intern.cs): `src/Intern.cs`
- [Resource monitoring](https://github.com/the-potential-dropout/intern/blob/main/src/Usage.cs): `src/Usage.cs`
- [Image engine setup](https://github.com/the-potential-dropout/intern/blob/main/src/Storage.cs): `src/Storage.cs`

### Other components

- **User**

## Connections

- User → Desktop workspace: uses
- Desktop workspace → Chat and search: opens (evidence: `app.js`)
- Chat and search → Local model runtimes: prompts
- Chat and search → Chat persistence: saves chats
- Chat and search → Web research: requests research
- User → Agent workspace UI: starts agent work
- Agent workspace UI → OpenCode agent engine: uses
- OpenCode agent engine → Local model runtimes: uses
- OpenCode agent engine → Plugins and connectors: uses connectors
- Model catalog → Model routing: offers routing
- Model routing → Local model runtimes: selects models
- User → File and PDF handling: attaches files
- Phone uploads → File and PDF handling: uploads files
- Chat and search → File exports: exports answers
- Chat and search → Image generation: requests images
- Chat and search → Charts and diagrams: renders visuals
- User → Explainer authoring: creates video
- Explainer authoring → Video rendering: exports project
- User → Audiobooks: creates audiobook
- Desktop workspace → Voice chat: offers voice
- Desktop workspace → Resource monitoring: shows resources
- Image engine setup → Image generation: installs engine (evidence: `src/Storage.cs`)
