# claudiobatistati/pyide architecture

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

- Interactive diagram: https://gitdiagram.com/claudiobatistati/pyide
- Repository: https://github.com/claudiobatistati/pyide

## Overview

This is a browser-based Python learning IDE. A learner edits a project, runs Python in a browser-hosted Pyodide interpreter, and views terminal output; the app also supports project-file management, local persistence, autocomplete, and downloading code. The sampled code shows the main runtime and file-explorer behavior. Some UI details are omitted from the excerpts, so edges are limited to relationships visible in the excerpts or source index.

Main entry points: [`src/App.tsx`](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx) (IDE Application), [`src/components/FileExplorer.tsx`](https://github.com/claudiobatistati/pyide/blob/main/src/components/FileExplorer.tsx) (File Explorer), [`src/types.ts`](https://github.com/claudiobatistati/pyide/blob/main/src/types.ts) (File Types), [`src/main.tsx`](https://github.com/claudiobatistati/pyide/blob/main/src/main.tsx) (React Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_app["IDE Application<br/>[App.tsx]"]
  node_explorer["File Explorer<br/>[FileExplorer.tsx]"]
  node_entry["React Entry<br/>[main.tsx]"]
end

subgraph group_execution["Python Execution"]
  node_virtualfs["Pyodide Filesystem<br/>[App.tsx]"]
  node_interpreter["Pyodide Runtime<br/>[App.tsx]"]
  node_pyodidecdn["Pyodide CDN"]
  node_terminal["Terminal I/O<br/>[App.tsx]"]
end

subgraph group_project["Project Files"]
  node_filetypes["File Types<br/>[types.ts]"]
  node_projectstate["Project State<br/>[App.tsx]"]
  node_localstorage[("Browser Storage")]
end

subgraph group_editing["Editing Tools"]
  node_codeeditor["Code Editor<br/>[App.tsx]"]
  node_syntax["Python Highlighting<br/>[App.tsx]"]
  node_completion["Keyword Completion<br/>[App.tsx]"]
  node_caret["Caret Coordinates<br/>[App.tsx]"]
  node_download["Code Download<br/>[App.tsx]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_entry -->|"mounts"| node_app
node_app -->|"uses"| node_explorer
node_app -->|"imports"| node_filetypes
node_explorer -->|"imports"| node_filetypes
node_app -->|"loads and saves"| node_localstorage
node_app -->|"writes files"| node_virtualfs
node_app -->|"runs code"| node_interpreter
node_app -->|"loads runtime"| node_pyodidecdn
node_interpreter -->|"reads files"| node_virtualfs
node_interpreter -->|"emits output"| node_terminal
node_app -->|"shows output"| node_terminal
node_app -->|"renders editor"| node_codeeditor
node_app -->|"highlights Python"| node_syntax
node_app -->|"suggests keywords"| node_completion
node_app -->|"gets coordinates"| node_caret
node_app -->|"downloads code"| node_download

click node_app "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_explorer "https://github.com/claudiobatistati/pyide/blob/main/src/components/FileExplorer.tsx"
click node_entry "https://github.com/claudiobatistati/pyide/blob/main/src/main.tsx"
click node_filetypes "https://github.com/claudiobatistati/pyide/blob/main/src/types.ts"
click node_projectstate "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_virtualfs "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_interpreter "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_terminal "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_codeeditor "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_syntax "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_completion "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_caret "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"
click node_download "https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx"

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_explorer,node_entry toneBlue
class node_virtualfs,node_interpreter,node_pyodidecdn,node_terminal toneAmber
class node_filetypes,node_projectstate,node_localstorage toneMint
class node_codeeditor,node_syntax,node_completion,node_caret,node_download toneRose
class node_learner toneIndigo
```

## Components

### Workspace UI

- [IDE Application](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- [File Explorer](https://github.com/claudiobatistati/pyide/blob/main/src/components/FileExplorer.tsx): `src/components/FileExplorer.tsx`
- [React Entry](https://github.com/claudiobatistati/pyide/blob/main/src/main.tsx): `src/main.tsx`

### Python Execution

- [Pyodide Filesystem](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- [Pyodide Runtime](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- **Pyodide CDN**
- [Terminal I/O](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`

### Project Files

- [File Types](https://github.com/claudiobatistati/pyide/blob/main/src/types.ts): `src/types.ts`
- [Project State](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- **Browser Storage**

### Editing Tools

- [Code Editor](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- [Python Highlighting](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- [Keyword Completion](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- [Caret Coordinates](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`
- [Code Download](https://github.com/claudiobatistati/pyide/blob/main/src/App.tsx): `src/App.tsx`

### Other components

- **Learner**

## Connections

- Learner → IDE Application: uses
- React Entry → IDE Application: mounts (evidence: `src/main.tsx`)
- IDE Application → File Explorer: uses (evidence: `src/App.tsx`)
- IDE Application → File Types: imports (evidence: `src/App.tsx`)
- File Explorer → File Types: imports (evidence: `src/components/FileExplorer.tsx`)
- IDE Application → Browser Storage: loads and saves (evidence: `src/App.tsx`)
- IDE Application → Pyodide Filesystem: writes files (evidence: `src/App.tsx`)
- IDE Application → Pyodide Runtime: runs code (evidence: `src/App.tsx`)
- IDE Application → Pyodide CDN: loads runtime (evidence: `src/App.tsx`)
- Pyodide Runtime → Pyodide Filesystem: reads files (evidence: `src/App.tsx`)
- Pyodide Runtime → Terminal I/O: emits output (evidence: `src/App.tsx`)
- IDE Application → Terminal I/O: shows output (evidence: `src/App.tsx`)
- IDE Application → Code Editor: renders editor (evidence: `src/App.tsx`)
- IDE Application → Python Highlighting: highlights Python (evidence: `src/App.tsx`)
- IDE Application → Keyword Completion: suggests keywords (evidence: `src/App.tsx`)
- IDE Application → Caret Coordinates: gets coordinates (evidence: `src/App.tsx`)
- IDE Application → Code Download: downloads code (evidence: `src/App.tsx`)
