# ethanramli/boardtutor architecture

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

- Interactive diagram: https://gitdiagram.com/ethanramli/boardtutor
- Repository: https://github.com/ethanramli/boardtutor

## Overview

Board Tutor is a desktop whiteboard paired with a terminal for Claude Code. The student opens and edits boards in the Excalidraw canvas; the app saves them locally and lets Claude inspect or modify the open board through an MCP server. The terminal runs a local shell where Claude Code can be started. The map includes board management and workspace setup documented in the README. Edges reflect shown calls or README statements; unsampled implementation details are not expanded.

Main entry points: [`src/main.tsx`](https://github.com/ethanramli/boardtutor/blob/main/src/main.tsx) (Desktop App), [`src-tauri/src/board_tools.rs`](https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/board_tools.rs) (Local MCP Server), [`src/Terminal.tsx`](https://github.com/ethanramli/boardtutor/blob/main/src/Terminal.tsx) (Terminal Pane), [`src/Boards.tsx`](https://github.com/ethanramli/boardtutor/blob/main/src/Boards.tsx) (Boards Menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_whiteboard["Whiteboard"]
  node_app["Desktop App<br/>[main.tsx]"]
  node_canvas["Excalidraw Canvas"]
  node_boarddata["Board Serialization<br/>[board.ts]"]
end

subgraph group_management["Boards and Workspace"]
  node_boardsmenu["Boards Menu<br/>[Boards.tsx]"]
  node_pathlogic["Board Path Logic<br/>[tree.ts]"]
  node_localstorage[("Board and Image Storage<br/>[main.rs]")]
  node_workspace["Tutor Workspace Setup<br/>[main.rs]"]
end

subgraph group_tutoring["Claude Board Tools"]
  node_mcp["Local MCP Server<br/>[board_tools.rs]"]
  node_toolbridge["Tool Request Bridge<br/>[main.tsx]"]
  node_boardtools["Board Tool Logic<br/>[boardTools.ts]"]
end

subgraph group_terminal["Terminal"]
  node_terminalui["Terminal Pane<br/>[Terminal.tsx]"]
  node_pty["Shell Session<br/>[terminal.rs]"]
end

node_student(("Student"))
node_claude(("Claude Code"))

node_student -->|"uses"| node_app
node_app -->|"renders"| node_canvas
node_app -->|"loads and saves"| node_boarddata
node_app -->|"renders"| node_boardsmenu
node_boardsmenu -->|"uses"| node_pathlogic
node_app -->|"invokes board commands"| node_localstorage
node_app -->|"starts setup"| node_workspace
node_app -->|"starts server"| node_mcp
node_claude -->|"calls tools"| node_mcp
node_mcp -->|"dispatches request"| node_toolbridge
node_toolbridge -->|"runs board actions"| node_boardtools
node_boardtools -->|"updates scene"| node_canvas
node_toolbridge -->|"returns result"| node_mcp
node_app -->|"opens terminal"| node_terminalui
node_terminalui -->|"starts and controls"| node_pty
node_pty -->|"emits output"| node_terminalui

click node_app "https://github.com/ethanramli/boardtutor/blob/main/src/main.tsx"
click node_boarddata "https://github.com/ethanramli/boardtutor/blob/main/src/board.ts"
click node_boardsmenu "https://github.com/ethanramli/boardtutor/blob/main/src/Boards.tsx"
click node_pathlogic "https://github.com/ethanramli/boardtutor/blob/main/src/tree.ts"
click node_localstorage "https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/main.rs"
click node_workspace "https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/main.rs"
click node_mcp "https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/board_tools.rs"
click node_toolbridge "https://github.com/ethanramli/boardtutor/blob/main/src/main.tsx"
click node_boardtools "https://github.com/ethanramli/boardtutor/blob/main/src/boardTools.ts"
click node_terminalui "https://github.com/ethanramli/boardtutor/blob/main/src/Terminal.tsx"
click node_pty "https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/terminal.rs"

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_canvas,node_boarddata toneBlue
class node_boardsmenu,node_pathlogic,node_localstorage,node_workspace toneAmber
class node_mcp,node_toolbridge,node_boardtools toneMint
class node_terminalui,node_pty toneRose
class node_student,node_claude toneIndigo
```

## Components

### Whiteboard

- [Desktop App](https://github.com/ethanramli/boardtutor/blob/main/src/main.tsx): `src/main.tsx`
- **Excalidraw Canvas**
- [Board Serialization](https://github.com/ethanramli/boardtutor/blob/main/src/board.ts): `src/board.ts`

### Boards and Workspace

- [Boards Menu](https://github.com/ethanramli/boardtutor/blob/main/src/Boards.tsx): `src/Boards.tsx`
- [Board Path Logic](https://github.com/ethanramli/boardtutor/blob/main/src/tree.ts): `src/tree.ts`
- [Board and Image Storage](https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/main.rs): `src-tauri/src/main.rs`
- [Tutor Workspace Setup](https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/main.rs): `src-tauri/src/main.rs`

### Claude Board Tools

- [Local MCP Server](https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/board_tools.rs): `src-tauri/src/board_tools.rs`
- [Tool Request Bridge](https://github.com/ethanramli/boardtutor/blob/main/src/main.tsx): `src/main.tsx`
- [Board Tool Logic](https://github.com/ethanramli/boardtutor/blob/main/src/boardTools.ts): `src/boardTools.ts`

### Terminal

- [Terminal Pane](https://github.com/ethanramli/boardtutor/blob/main/src/Terminal.tsx): `src/Terminal.tsx`
- [Shell Session](https://github.com/ethanramli/boardtutor/blob/main/src-tauri/src/terminal.rs): `src-tauri/src/terminal.rs`

### Other components

- **Student**
- **Claude Code**

## Connections

- Student → Desktop App: uses (evidence: `README.md`)
- Desktop App → Excalidraw Canvas: renders (evidence: `src/main.tsx`)
- Desktop App → Board Serialization: loads and saves (evidence: `src/main.tsx`)
- Desktop App → Boards Menu: renders (evidence: `src/main.tsx`)
- Boards Menu → Board Path Logic: uses (evidence: `src/Boards.tsx`)
- Desktop App → Board and Image Storage: invokes board commands (evidence: `src/main.tsx`)
- Desktop App → Tutor Workspace Setup: starts setup (evidence: `README.md`)
- Desktop App → Local MCP Server: starts server
- Claude Code → Local MCP Server: calls tools (evidence: `src-tauri/src/board_tools.rs`)
- Local MCP Server → Tool Request Bridge: dispatches request (evidence: `src-tauri/src/board_tools.rs`)
- Tool Request Bridge → Board Tool Logic: runs board actions (evidence: `src/main.tsx`)
- Board Tool Logic → Excalidraw Canvas: updates scene (evidence: `src/boardTools.ts`)
- Tool Request Bridge → Local MCP Server: returns result (evidence: `src/main.tsx`)
- Desktop App → Terminal Pane: opens terminal (evidence: `src/main.tsx`)
- Terminal Pane → Shell Session: starts and controls (evidence: `src/Terminal.tsx`)
- Shell Session → Terminal Pane: emits output (evidence: `src-tauri/src/terminal.rs`)
