# cjtrowbridge/trashcan architecture

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

- Interactive diagram: https://gitdiagram.com/cjtrowbridge/trashcan
- Repository: https://github.com/cjtrowbridge/trashcan

## Overview

Trashcan is a host-setup and operational documentation repository for converting a 2013 Mac Pro into a local Ollama AI machine. Its primary workflow dispatches into bootstrap checks, repairs failed machine stages through the Debian backend, then manages and rechecks model context aliases. The README also describes remote-desktop and terminal access, GPU/container setup, benchmarks, diagnostics, and performance research. Those documented capabilities are retained as subsystems, but unsampled implementation links are omitted or marked unverified.

Main entry points: [`scripts/bootstrap-v1.py`](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py) (Desired-state checks), [`bootstrap.sh`](https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh) (Debian repair stages), [`scripts/verify-ollama-context-aliases.py`](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/verify-ollama-context-aliases.py) (Alias load verifier), [`llm_benchmark`](https://github.com/cjtrowbridge/trashcan/tree/main/llm_benchmark) (Inference benchmark)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bootstrap["Host bootstrap"]
  node_stable["Bootstrap entrypoint<br/>[bootstrap.py]"]
  node_dispatcher["Desired-state checks<br/>[bootstrap-v1.py]"]
end

subgraph group_machine["Machine services"]
  node_debian["Debian repair stages<br/>[bootstrap.sh]"]
  node_desktop["Desktop access<br/>[bootstrap.sh]"]
  node_terminal["Web terminal<br/>[bootstrap.sh]"]
  node_docker["Docker and GPU setup<br/>[bootstrap.sh]"]
end

subgraph group_inference["Local inference"]
  node_ollama["Ollama container<br/>[bootstrap-v1.py]"]
  node_aliasmanager["Context alias manager"]
  node_aliases["Context aliases<br/>[bootstrap-v1.py]"]
  node_verify["Alias load verifier"]
  node_ollapi["Ollama API"]
end

subgraph group_operations["Operations and research"]
  node_benchmark["Inference benchmark"]
  node_diagnostics["Desktop diagnostics"]
  node_latency["Latency investigation"]
  node_idle["Idle failure investigation"]
  node_optimization["Inference optimization research"]
  node_pipeline["Future inference workflows"]
  node_report["Benchmark reports"]
end

node_operator(("Host operator"))

node_operator -->|"runs"| node_stable
node_stable -->|"dispatches to"| node_dispatcher
node_dispatcher -->|"invokes repairs"| node_debian
node_debian -.->|"configures"| node_desktop
node_debian -.->|"configures"| node_terminal
node_debian -.->|"configures"| node_docker
node_dispatcher -->|"checks config"| node_ollama
node_dispatcher -->|"loads manager"| node_aliasmanager
node_dispatcher -->|"provisions and checks"| node_aliases
node_aliasmanager -.->|"manages"| node_aliases
node_operator -->|"runs trials"| node_verify
node_verify -->|"imports bootstrap"| node_dispatcher
node_verify -->|"sends requests"| node_ollapi
node_ollapi -.->|"queries runtime"| node_ollama
node_operator -->|"runs benchmark"| node_benchmark
node_benchmark -.->|"measures models"| node_ollapi
node_benchmark -->|"writes reports"| node_report
node_operator -->|"runs collector"| node_diagnostics
node_diagnostics -.->|"supports investigation"| node_idle
node_latency -.->|"defines trials"| node_desktop
node_optimization -.->|"evaluates tuning"| node_ollama
node_pipeline -.->|"future use"| node_ollapi

click node_stable "https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap.py"
click node_dispatcher "https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py"
click node_debian "https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh"
click node_desktop "https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh"
click node_terminal "https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh"
click node_docker "https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh"
click node_ollama "https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py"
click node_aliases "https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py"
click node_verify "https://github.com/cjtrowbridge/trashcan/blob/main/scripts/verify-ollama-context-aliases.py"
click node_benchmark "https://github.com/cjtrowbridge/trashcan/tree/main/llm_benchmark"
click node_diagnostics "https://github.com/cjtrowbridge/trashcan/blob/main/scripts/collect-remote-desktop-diagnostics.sh"
click node_latency "https://github.com/cjtrowbridge/trashcan/blob/main/plans/remote-desktop-latency-investigation.md"
click node_idle "https://github.com/cjtrowbridge/trashcan/blob/main/research/remote-desktop-idle-failure.md"
click node_optimization "https://github.com/cjtrowbridge/trashcan/blob/main/research/maximizing-local-llm-inference-research.md"
click node_pipeline "https://github.com/cjtrowbridge/trashcan/tree/main/agentic-pipelines"
click node_report "https://github.com/cjtrowbridge/trashcan/tree/main/llm_benchmark"

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_stable,node_dispatcher toneBlue
class node_debian,node_desktop,node_terminal,node_docker toneAmber
class node_ollama,node_aliasmanager,node_aliases,node_verify,node_ollapi toneMint
class node_benchmark,node_diagnostics,node_latency,node_idle,node_optimization,node_pipeline,node_report toneRose
class node_operator toneIndigo
```

## Components

### Host bootstrap

- [Bootstrap entrypoint](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap.py): `scripts/bootstrap.py`
- [Desired-state checks](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py): `scripts/bootstrap-v1.py`

### Machine services

- [Debian repair stages](https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh): `bootstrap.sh`
- [Desktop access](https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh): `bootstrap.sh`
- [Web terminal](https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh): `bootstrap.sh`
- [Docker and GPU setup](https://github.com/cjtrowbridge/trashcan/blob/main/bootstrap.sh): `bootstrap.sh`

### Local inference

- [Ollama container](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py): `scripts/bootstrap-v1.py`
- **Context alias manager**
- [Context aliases](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/bootstrap-v1.py): `scripts/bootstrap-v1.py`
- [Alias load verifier](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/verify-ollama-context-aliases.py): `scripts/verify-ollama-context-aliases.py`
- **Ollama API**

### Operations and research

- [Inference benchmark](https://github.com/cjtrowbridge/trashcan/tree/main/llm_benchmark): `llm_benchmark`
- [Desktop diagnostics](https://github.com/cjtrowbridge/trashcan/blob/main/scripts/collect-remote-desktop-diagnostics.sh): `scripts/collect-remote-desktop-diagnostics.sh`
- [Latency investigation](https://github.com/cjtrowbridge/trashcan/blob/main/plans/remote-desktop-latency-investigation.md): `plans/remote-desktop-latency-investigation.md`
- [Idle failure investigation](https://github.com/cjtrowbridge/trashcan/blob/main/research/remote-desktop-idle-failure.md): `research/remote-desktop-idle-failure.md`
- [Inference optimization research](https://github.com/cjtrowbridge/trashcan/blob/main/research/maximizing-local-llm-inference-research.md): `research/maximizing-local-llm-inference-research.md`
- [Future inference workflows](https://github.com/cjtrowbridge/trashcan/tree/main/agentic-pipelines): `agentic-pipelines`
- [Benchmark reports](https://github.com/cjtrowbridge/trashcan/tree/main/llm_benchmark): `llm_benchmark`

### Other components

- **Host operator**

## Connections

- Host operator → Bootstrap entrypoint: runs (evidence: `readme.md`)
- Bootstrap entrypoint → Desired-state checks: dispatches to (evidence: `scripts/bootstrap.py`)
- Desired-state checks → Debian repair stages: invokes repairs (evidence: `scripts/bootstrap-v1.py`)
- Debian repair stages → Desktop access: configures (evidence: `readme.md`)
- Debian repair stages → Web terminal: configures (evidence: `readme.md`)
- Debian repair stages → Docker and GPU setup: configures (evidence: `readme.md`)
- Desired-state checks → Ollama container: checks config (evidence: `scripts/bootstrap-v1.py`)
- Desired-state checks → Context alias manager: loads manager (evidence: `scripts/bootstrap-v1.py`)
- Desired-state checks → Context aliases: provisions and checks (evidence: `readme.md`)
- Context alias manager → Context aliases: manages
- Host operator → Alias load verifier: runs trials (evidence: `readme.md`)
- Alias load verifier → Desired-state checks: imports bootstrap (evidence: `scripts/verify-ollama-context-aliases.py`)
- Alias load verifier → Ollama API: sends requests (evidence: `scripts/verify-ollama-context-aliases.py`)
- Ollama API → Ollama container: queries runtime (evidence: `readme.md`)
- Host operator → Inference benchmark: runs benchmark (evidence: `readme.md`)
- Inference benchmark → Ollama API: measures models (evidence: `readme.md`)
- Inference benchmark → Benchmark reports: writes reports (evidence: `readme.md`)
- Host operator → Desktop diagnostics: runs collector (evidence: `readme.md`)
- Desktop diagnostics → Idle failure investigation: supports investigation (evidence: `readme.md`)
- Latency investigation → Desktop access: defines trials (evidence: `readme.md`)
- Inference optimization research → Ollama container: evaluates tuning (evidence: `readme.md`)
- Future inference workflows → Ollama API: future use (evidence: `readme.md`)
