# markusswedpal/slothmore architecture

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

- Interactive diagram: https://gitdiagram.com/markusswedpal/slothmore
- Repository: https://github.com/markusswedpal/slothmore

## Overview

Slothmore is a local dashboard for discovering code folders, starting servers or scripts, and managing their output and prompts. The main workflow runs from a user in the browser through the dashboard to the local server, which starts and monitors project processes; the dashboard also supports port management and project settings. A macOS menu-bar helper provides a compact control surface. The server is a large monolithic module, so several domain responsibilities share its path. Relationships for capabilities described only in the README are cited there; unsampled implementation details are not inferred.

Main entry points: [`server.py`](https://github.com/markusswedpal/slothmore/blob/main/server.py) (Local API server), [`static/app.js`](https://github.com/markusswedpal/slothmore/blob/main/static/app.js) (Browser dashboard), [`static/compact.js`](https://github.com/markusswedpal/slothmore/blob/main/static/compact.js) (Compact view), [`macos/menubar.py`](https://github.com/markusswedpal/slothmore/blob/main/macos/menubar.py) (Menu-bar helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_browser["Browser dashboard<br/>[app.js]"]
  node_compact["Compact view<br/>[compact.js]"]
end

subgraph group_runtime["Local runtime"]
  node_server["Local API server<br/>[server.py]"]
  node_auth["Access-token sign-in<br/>[server.py]"]
  node_discovery["Folder and project discovery<br/>[server.py]"]
  node_settings[("Watch and project settings<br/>[server.py]")]
  node_processes["Run and process control<br/>[server.py]"]
  node_terminal["Live output and prompts<br/>[server.py]"]
  node_ports["Port inspection and stopping<br/>[server.py]"]
  node_ai["AI server and agent detection<br/>[server.py]"]
  node_cli["Command-line launcher"]
end

subgraph group_macos["macOS helper"]
  node_menubar["Menu-bar helper<br/>[menubar.py]"]
  node_quickpanel["Native quick panel<br/>[quickpanel.py]"]
end

subgraph group_presentation["Presentation utilities"]
  node_markdown["README Markdown renderer<br/>[markdown.js]"]
  node_serviceworker["Installable-app worker<br/>[sw.js]"]
end

node_user(("User"))

node_user -->|"uses"| node_browser
node_cli -->|"starts"| node_server
node_browser -->|"requests API"| node_server
node_server -->|"checks sign-in"| node_auth
node_server -->|"lists projects"| node_discovery
node_server -->|"reads and saves"| node_settings
node_browser -->|"manages folders"| node_settings
node_browser -->|"starts and controls"| node_processes
node_server -->|"starts processes"| node_processes
node_processes -->|"produces output"| node_terminal
node_browser -->|"shows output and prompts"| node_terminal
node_browser -->|"manages ports"| node_ports
node_compact -->|"requests API"| node_server
node_compact -->|"shows AI summary"| node_ai
node_server -->|"detects servers and agents"| node_ai
node_menubar -->|"starts or queries"| node_server
node_menubar -->|"opens panel"| node_quickpanel
node_quickpanel -->|"loads view"| node_compact
node_browser -->|"renders README"| node_markdown
node_browser -->|"registers worker"| node_serviceworker

click node_browser "https://github.com/markusswedpal/slothmore/blob/main/static/app.js"
click node_compact "https://github.com/markusswedpal/slothmore/blob/main/static/compact.js"
click node_server "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_auth "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_discovery "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_settings "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_processes "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_terminal "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_ports "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_ai "https://github.com/markusswedpal/slothmore/blob/main/server.py"
click node_cli "https://github.com/markusswedpal/slothmore/blob/main/bin/slothmore"
click node_menubar "https://github.com/markusswedpal/slothmore/blob/main/macos/menubar.py"
click node_quickpanel "https://github.com/markusswedpal/slothmore/blob/main/macos/quickpanel.py"
click node_markdown "https://github.com/markusswedpal/slothmore/blob/main/static/markdown.js"
click node_serviceworker "https://github.com/markusswedpal/slothmore/blob/main/static/sw.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_browser,node_compact,node_user toneBlue
class node_server,node_auth,node_discovery,node_settings,node_processes,node_terminal,node_ports,node_ai,node_cli toneAmber
class node_menubar,node_quickpanel toneMint
class node_markdown,node_serviceworker toneRose
```

## Components

### Dashboard

- [Browser dashboard](https://github.com/markusswedpal/slothmore/blob/main/static/app.js): `static/app.js`
- [Compact view](https://github.com/markusswedpal/slothmore/blob/main/static/compact.js): `static/compact.js`

### Local runtime

- [Local API server](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Access-token sign-in](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Folder and project discovery](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Watch and project settings](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Run and process control](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Live output and prompts](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Port inspection and stopping](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [AI server and agent detection](https://github.com/markusswedpal/slothmore/blob/main/server.py): `server.py`
- [Command-line launcher](https://github.com/markusswedpal/slothmore/blob/main/bin/slothmore): `bin/slothmore`

### macOS helper

- [Menu-bar helper](https://github.com/markusswedpal/slothmore/blob/main/macos/menubar.py): `macos/menubar.py`
- [Native quick panel](https://github.com/markusswedpal/slothmore/blob/main/macos/quickpanel.py): `macos/quickpanel.py`

### Presentation utilities

- [README Markdown renderer](https://github.com/markusswedpal/slothmore/blob/main/static/markdown.js): `static/markdown.js`
- [Installable-app worker](https://github.com/markusswedpal/slothmore/blob/main/static/sw.js): `static/sw.js`

### Other components

- **User**

## Connections

- User → Browser dashboard: uses (evidence: `README.md`)
- Command-line launcher → Local API server: starts (evidence: `README.md`)
- Browser dashboard → Local API server: requests API (evidence: `README.md`)
- Local API server → Access-token sign-in: checks sign-in (evidence: `README.md`)
- Local API server → Folder and project discovery: lists projects (evidence: `README.md`)
- Local API server → Watch and project settings: reads and saves (evidence: `README.md`)
- Browser dashboard → Watch and project settings: manages folders (evidence: `README.md`)
- Browser dashboard → Run and process control: starts and controls (evidence: `README.md`)
- Local API server → Run and process control: starts processes (evidence: `server.py`)
- Run and process control → Live output and prompts: produces output (evidence: `README.md`)
- Browser dashboard → Live output and prompts: shows output and prompts (evidence: `README.md`)
- Browser dashboard → Port inspection and stopping: manages ports (evidence: `README.md`)
- Compact view → Local API server: requests API (evidence: `README.md`)
- Compact view → AI server and agent detection: shows AI summary (evidence: `README.md`)
- Local API server → AI server and agent detection: detects servers and agents (evidence: `README.md`)
- Menu-bar helper → Local API server: starts or queries (evidence: `macos/menubar.py`)
- Menu-bar helper → Native quick panel: opens panel (evidence: `macos/menubar.py`)
- Native quick panel → Compact view: loads view (evidence: `macos/quickpanel.py`)
- Browser dashboard → README Markdown renderer: renders README (evidence: `static/markdown.js`)
- Browser dashboard → Installable-app worker: registers worker (evidence: `static/app.js`)
