# utmist/mist architecture

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

- Interactive diagram: https://gitdiagram.com/utmist/mist
- Repository: https://github.com/utmist/mist

## Overview

Mist is a private research-compute platform: researchers sign in, choose a team workspace, upload or select datasets, submit Python or tagged-container jobs against CPU, NVIDIA, or Tenstorrent resources, then follow execution and retrieve logs and persistent results. The web portal and CLI are separate clients of the Go API; the API manages team access, Kubernetes job execution, shared storage, and hardware reporting. The README documents these capabilities; relationships for unsampled routes and API handlers are shown only where explicitly documented, and source excerpts provide additional evidence for storage and routing.

Main entry points: [`src/http.go`](https://github.com/utmist/mist/blob/main/src/http.go) (HTTP API), [`web-interface/src/routeTree.gen.ts`](https://github.com/utmist/mist/blob/main/web-interface/src/routeTree.gen.ts) (Portal routes), [`src/kubernetes.go`](https://github.com/utmist/mist/blob/main/src/kubernetes.go) (Kubernetes executor), [`src/jobs_http.go`](https://github.com/utmist/mist/blob/main/src/jobs_http.go) (Job API and lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_portal["Web portal<br/>[main.tsx]"]
  node_routes["Portal routes<br/>[routeTree.gen.ts]"]
  node_dashboard["Workspace overview<br/>[dashboard.tsx]"]
  node_jobui["Job submission and tracking<br/>[JobsPage.tsx]"]
  node_dataui["Dataset and storage UI<br/>[DatasetsPage.tsx]"]
  node_teamui["Team workspace UI<br/>[TeamsPage.tsx]"]
  node_cli["Mist CLI<br/>[job_submit.go]"]
end

subgraph group_identity["Identity and teams"]
  node_api["HTTP API<br/>[http.go]"]
  node_auth["Authentication<br/>[auth.go]"]
  node_teams["Team access and policy<br/>[teams.go]"]
  node_teamruntime["Team runtime<br/>[team_runtime.go]"]
end

subgraph group_compute["Job execution"]
  node_jobs["Job API and lifecycle<br/>[jobs_http.go]"]
  node_states["Job states and types<br/>[job_states.go]"]
  node_k8s["Kubernetes executor<br/>[kubernetes.go]"]
  node_images["Container images<br/>[images.go]"]
  node_queue["Team job queue<br/>[team_queue.go]"]
end

subgraph group_data["Data and results"]
  node_datasets[("Dataset storage<br/>[shared_storage.go]")]
  node_teamstorage["Team folders and datasets<br/>[team_storage.go]"]
  node_outputs[("Job outputs<br/>[outputs.go]")]
end

subgraph group_infra["Cluster resources"]
  node_hardware["Accelerator inventory<br/>[hardware.go]"]
  node_cluster{{"Kubernetes cluster"}}
  node_storagehost[("Persistent shared storage")]
end

node_researcher(("Researcher"))

node_researcher -->|"uses"| node_portal
node_researcher -->|"uses"| node_cli
node_portal -->|"starts router"| node_routes
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_jobui
node_routes -->|"routes to"| node_dataui
node_routes -->|"routes to"| node_teamui
node_dashboard -->|"requests status"| node_api
node_jobui -.->|"submits and tracks"| node_api
node_dataui -.->|"manages datasets"| node_api
node_teamui -.->|"manages workspace"| node_api
node_cli -->|"sends HTTP requests"| node_api
node_api -.->|"authenticates"| node_auth
node_api -.->|"checks membership"| node_teams
node_api -.->|"routes job requests"| node_jobs
node_jobs -.->|"dispatches jobs"| node_k8s
node_jobs -.->|"tracks lifecycle"| node_states
node_jobs -.->|"uses team queue"| node_queue
node_k8s -.->|"creates workloads"| node_cluster
node_k8s -.->|"allocates accelerators"| node_hardware
node_k8s -.->|"uses tagged images"| node_images
node_api -.->|"handles uploads"| node_datasets
node_api -->|"serves folder access"| node_teamstorage
node_teamstorage -->|"reads and writes"| node_datasets
node_k8s -.->|"persists results"| node_outputs
node_datasets -.->|"stores dataset files"| node_storagehost
node_outputs -.->|"stores job results"| node_storagehost

click node_portal "https://github.com/utmist/mist/blob/main/web-interface/src/main.tsx"
click node_routes "https://github.com/utmist/mist/blob/main/web-interface/src/routeTree.gen.ts"
click node_dashboard "https://github.com/utmist/mist/blob/main/web-interface/src/routes/dashboard.tsx"
click node_jobui "https://github.com/utmist/mist/blob/main/web-interface/src/components/JobsPage.tsx"
click node_dataui "https://github.com/utmist/mist/blob/main/web-interface/src/components/DatasetsPage.tsx"
click node_teamui "https://github.com/utmist/mist/blob/main/web-interface/src/components/TeamsPage.tsx"
click node_cli "https://github.com/utmist/mist/blob/main/cli/cmd/job_submit.go"
click node_api "https://github.com/utmist/mist/blob/main/src/http.go"
click node_auth "https://github.com/utmist/mist/blob/main/src/auth.go"
click node_teams "https://github.com/utmist/mist/blob/main/src/teams.go"
click node_teamruntime "https://github.com/utmist/mist/blob/main/src/team_runtime.go"
click node_jobs "https://github.com/utmist/mist/blob/main/src/jobs_http.go"
click node_states "https://github.com/utmist/mist/blob/main/src/job_states.go"
click node_k8s "https://github.com/utmist/mist/blob/main/src/kubernetes.go"
click node_hardware "https://github.com/utmist/mist/blob/main/src/hardware.go"
click node_images "https://github.com/utmist/mist/blob/main/src/images.go"
click node_datasets "https://github.com/utmist/mist/blob/main/src/shared_storage.go"
click node_teamstorage "https://github.com/utmist/mist/blob/main/src/team_storage.go"
click node_queue "https://github.com/utmist/mist/blob/main/src/team_queue.go"
click node_outputs "https://github.com/utmist/mist/blob/main/src/outputs.go"

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_portal,node_routes,node_dashboard,node_jobui,node_dataui,node_teamui,node_cli toneBlue
class node_api,node_auth,node_teams,node_teamruntime toneAmber
class node_jobs,node_states,node_k8s,node_images,node_queue toneMint
class node_datasets,node_teamstorage,node_outputs toneRose
class node_hardware,node_cluster,node_storagehost,node_researcher toneIndigo
```

## Components

### User clients

- [Web portal](https://github.com/utmist/mist/blob/main/web-interface/src/main.tsx): `web-interface/src/main.tsx`
- [Portal routes](https://github.com/utmist/mist/blob/main/web-interface/src/routeTree.gen.ts): `web-interface/src/routeTree.gen.ts`
- [Workspace overview](https://github.com/utmist/mist/blob/main/web-interface/src/routes/dashboard.tsx): `web-interface/src/routes/dashboard.tsx`
- [Job submission and tracking](https://github.com/utmist/mist/blob/main/web-interface/src/components/JobsPage.tsx): `web-interface/src/components/JobsPage.tsx`
- [Dataset and storage UI](https://github.com/utmist/mist/blob/main/web-interface/src/components/DatasetsPage.tsx): `web-interface/src/components/DatasetsPage.tsx`
- [Team workspace UI](https://github.com/utmist/mist/blob/main/web-interface/src/components/TeamsPage.tsx): `web-interface/src/components/TeamsPage.tsx`
- [Mist CLI](https://github.com/utmist/mist/blob/main/cli/cmd/job_submit.go): `cli/cmd/job_submit.go`

### Identity and teams

- [HTTP API](https://github.com/utmist/mist/blob/main/src/http.go): `src/http.go`
- [Authentication](https://github.com/utmist/mist/blob/main/src/auth.go): `src/auth.go`
- [Team access and policy](https://github.com/utmist/mist/blob/main/src/teams.go): `src/teams.go`
- [Team runtime](https://github.com/utmist/mist/blob/main/src/team_runtime.go): `src/team_runtime.go`

### Job execution

- [Job API and lifecycle](https://github.com/utmist/mist/blob/main/src/jobs_http.go): `src/jobs_http.go`
- [Job states and types](https://github.com/utmist/mist/blob/main/src/job_states.go): `src/job_states.go`
- [Kubernetes executor](https://github.com/utmist/mist/blob/main/src/kubernetes.go): `src/kubernetes.go`
- [Container images](https://github.com/utmist/mist/blob/main/src/images.go): `src/images.go`
- [Team job queue](https://github.com/utmist/mist/blob/main/src/team_queue.go): `src/team_queue.go`

### Data and results

- [Dataset storage](https://github.com/utmist/mist/blob/main/src/shared_storage.go): `src/shared_storage.go`
- [Team folders and datasets](https://github.com/utmist/mist/blob/main/src/team_storage.go): `src/team_storage.go`
- [Job outputs](https://github.com/utmist/mist/blob/main/src/outputs.go): `src/outputs.go`

### Cluster resources

- [Accelerator inventory](https://github.com/utmist/mist/blob/main/src/hardware.go): `src/hardware.go`
- **Kubernetes cluster**
- **Persistent shared storage**

### Other components

- **Researcher**

## Connections

- Researcher → Web portal: uses
- Researcher → Mist CLI: uses
- Web portal → Portal routes: starts router (evidence: `web-interface/src/main.tsx`)
- Portal routes → Workspace overview: routes to (evidence: `web-interface/src/routeTree.gen.ts`)
- Portal routes → Job submission and tracking: routes to (evidence: `web-interface/src/routeTree.gen.ts`)
- Portal routes → Dataset and storage UI: routes to (evidence: `web-interface/src/routeTree.gen.ts`)
- Portal routes → Team workspace UI: routes to (evidence: `web-interface/src/routeTree.gen.ts`)
- Workspace overview → HTTP API: requests status (evidence: `web-interface/src/routes/dashboard.tsx`)
- Job submission and tracking → HTTP API: submits and tracks
- Dataset and storage UI → HTTP API: manages datasets
- Team workspace UI → HTTP API: manages workspace
- Mist CLI → HTTP API: sends HTTP requests
- HTTP API → Authentication: authenticates
- HTTP API → Team access and policy: checks membership
- HTTP API → Job API and lifecycle: routes job requests
- Job API and lifecycle → Kubernetes executor: dispatches jobs
- Job API and lifecycle → Job states and types: tracks lifecycle
- Job API and lifecycle → Team job queue: uses team queue
- Kubernetes executor → Kubernetes cluster: creates workloads
- Kubernetes executor → Accelerator inventory: allocates accelerators
- Kubernetes executor → Container images: uses tagged images
- HTTP API → Dataset storage: handles uploads (evidence: `src/shared_storage.go`)
- HTTP API → Team folders and datasets: serves folder access (evidence: `src/team_storage.go`)
- Team folders and datasets → Dataset storage: reads and writes (evidence: `src/team_storage.go`)
- Kubernetes executor → Job outputs: persists results
- Dataset storage → Persistent shared storage: stores dataset files
- Job outputs → Persistent shared storage: stores job results
