# windmill-labs/windmill architecture

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

- Interactive diagram: https://gitdiagram.com/windmill-labs/windmill
- Repository: https://github.com/windmill-labs/windmill

## Overview

Windmill is a self-hostable developer platform for turning scripts into runnable interfaces, composing scripts into workflows, and exposing them through apps, APIs, and event triggers. A typical path starts with a developer or operator creating a script, then a user or trigger starts a run; the backend queues work for a worker, which executes it and returns a result. The README documents additional app, flow, scheduling, and integration capabilities. The graph uses those documented relationships and tree-supported paths; source excerpts are partial and do not establish every internal call.

Main entry points: [`backend/windmill-api/src/lib.rs`](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/lib.rs) (Backend API), [`backend/windmill-api-workers/src`](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-workers/src) (Workers), [`backend/windmill-api-scripts/src`](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-scripts/src) (Scripts and assets), [`frontend/src/lib`](https://github.com/windmill-labs/windmill/tree/main/frontend/src/lib) (Generated UIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Authoring and assets"]
  node_scriptassets["Scripts and assets"]
  node_parsers["Language parsers"]
  node_flows["Workflow flows"]
end

subgraph group_orchestration["Execution and orchestration"]
  node_triggers["Trigger handlers"]
  node_schedules["Schedules"]
  node_jobqueue["Job queue"]
  node_worker["Workers"]
  node_runtimes["Language runtimes<br/>[lib.rs]"]
  node_results["Job results"]
end

subgraph group_interfaces["User interfaces"]
  node_webide["Web IDE"]
  node_cli["CLI"]
  node_autoforms["Generated UIs"]
  node_apps["Custom apps<br/>[apps.rs]"]
end

subgraph group_platform["Platform services"]
  node_api["Backend API<br/>[lib.rs]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_integrations["Data and integrations"]
  node_objectstore[("Object storage<br/>[lib.rs]")]
  node_resources["Resources and secrets<br/>[resources.rs]"]
  node_ai["AI services<br/>[lib.rs]"]
  node_hub["Windmill Hub"]
end

node_developer(("Developer"))
node_enduser(("App user"))
node_trigger(("External trigger"))

node_developer -->|"authors scripts"| node_webide
node_developer -->|"syncs assets"| node_cli
node_webide -->|"saves assets"| node_scriptassets
node_cli -->|"calls API"| node_api
node_scriptassets -->|"parses code"| node_parsers
node_scriptassets -->|"stores assets"| node_postgres
node_scriptassets -->|"generates forms"| node_autoforms
node_enduser -->|"starts run"| node_autoforms
node_enduser -->|"uses app"| node_apps
node_developer -->|"composes scripts"| node_flows
node_flows -->|"references scripts"| node_scriptassets
node_trigger -->|"starts workflow"| node_triggers
node_trigger -->|"starts scheduled run"| node_schedules
node_triggers -->|"dispatches run"| node_api
node_schedules -->|"enqueues jobs"| node_jobqueue
node_autoforms -->|"requests run"| node_api
node_apps -->|"requests run"| node_api
node_flows -->|"submits workflow"| node_api
node_api -->|"enqueues jobs"| node_jobqueue
node_jobqueue -->|"dispatches jobs"| node_worker
node_worker -->|"executes code"| node_runtimes
node_worker -->|"reads resources"| node_resources
node_worker -->|"records outcome"| node_results
node_results -->|"stores run data"| node_postgres
node_results -->|"returns result"| node_autoforms
node_worker -->|"reads and writes files"| node_objectstore
node_api -.->|"uses AI services"| node_ai
node_developer -.->|"discovers assets"| node_hub

click node_webide "https://github.com/windmill-labs/windmill/tree/main/frontend/src/lib"
click node_cli "https://github.com/windmill-labs/windmill/tree/main/cli/src"
click node_scriptassets "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-scripts/src"
click node_parsers "https://github.com/windmill-labs/windmill/tree/main/backend/parsers"
click node_autoforms "https://github.com/windmill-labs/windmill/tree/main/frontend/src/lib"
click node_apps "https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/apps.rs"
click node_flows "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-flows/src"
click node_triggers "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api/src/triggers"
click node_schedules "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-schedule/src"
click node_api "https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/lib.rs"
click node_jobqueue "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-queue/src"
click node_worker "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-workers/src"
click node_runtimes "https://github.com/windmill-labs/windmill/blob/main/backend/windmill-runtime-nativets/src/lib.rs"
click node_results "https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-jobs/src"
click node_objectstore "https://github.com/windmill-labs/windmill/blob/main/backend/windmill-object-store/src/lib.rs"
click node_resources "https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/resources.rs"
click node_ai "https://github.com/windmill-labs/windmill/blob/main/backend/windmill-ai/src/lib.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_scriptassets,node_parsers,node_flows,node_enduser toneBlue
class node_triggers,node_schedules,node_jobqueue,node_worker,node_runtimes,node_results toneAmber
class node_webide,node_cli,node_autoforms,node_apps toneMint
class node_api,node_postgres toneRose
class node_objectstore,node_resources,node_ai,node_hub,node_developer,node_trigger toneIndigo
```

## Components

### Authoring and assets

- [Scripts and assets](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-scripts/src): `backend/windmill-api-scripts/src`
- [Language parsers](https://github.com/windmill-labs/windmill/tree/main/backend/parsers): `backend/parsers`
- [Workflow flows](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-flows/src): `backend/windmill-api-flows/src`

### Execution and orchestration

- [Trigger handlers](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api/src/triggers): `backend/windmill-api/src/triggers`
- [Schedules](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-schedule/src): `backend/windmill-api-schedule/src`
- [Job queue](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-queue/src): `backend/windmill-queue/src`
- [Workers](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-workers/src): `backend/windmill-api-workers/src`
- [Language runtimes](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-runtime-nativets/src/lib.rs): `backend/windmill-runtime-nativets/src/lib.rs`
- [Job results](https://github.com/windmill-labs/windmill/tree/main/backend/windmill-api-jobs/src): `backend/windmill-api-jobs/src`

### User interfaces

- [Web IDE](https://github.com/windmill-labs/windmill/tree/main/frontend/src/lib): `frontend/src/lib`
- [CLI](https://github.com/windmill-labs/windmill/tree/main/cli/src): `cli/src`
- [Generated UIs](https://github.com/windmill-labs/windmill/tree/main/frontend/src/lib): `frontend/src/lib`
- [Custom apps](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/apps.rs): `backend/windmill-api/src/apps.rs`

### Platform services

- [Backend API](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/lib.rs): `backend/windmill-api/src/lib.rs`
- **PostgreSQL**

### Data and integrations

- [Object storage](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-object-store/src/lib.rs): `backend/windmill-object-store/src/lib.rs`
- [Resources and secrets](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-api/src/resources.rs): `backend/windmill-api/src/resources.rs`
- [AI services](https://github.com/windmill-labs/windmill/blob/main/backend/windmill-ai/src/lib.rs): `backend/windmill-ai/src/lib.rs`
- **Windmill Hub**

### Other components

- **Developer**
- **App user**
- **External trigger**

## Connections

- Developer → Web IDE: authors scripts
- Developer → CLI: syncs assets
- Web IDE → Scripts and assets: saves assets
- CLI → Backend API: calls API
- Scripts and assets → Language parsers: parses code
- Scripts and assets → PostgreSQL: stores assets
- Scripts and assets → Generated UIs: generates forms
- App user → Generated UIs: starts run
- App user → Custom apps: uses app
- Developer → Workflow flows: composes scripts
- Workflow flows → Scripts and assets: references scripts
- External trigger → Trigger handlers: starts workflow
- External trigger → Schedules: starts scheduled run
- Trigger handlers → Backend API: dispatches run
- Schedules → Job queue: enqueues jobs
- Generated UIs → Backend API: requests run
- Custom apps → Backend API: requests run
- Workflow flows → Backend API: submits workflow
- Backend API → Job queue: enqueues jobs
- Job queue → Workers: dispatches jobs
- Workers → Language runtimes: executes code
- Workers → Resources and secrets: reads resources
- Workers → Job results: records outcome
- Job results → PostgreSQL: stores run data
- Job results → Generated UIs: returns result
- Workers → Object storage: reads and writes files
- Backend API → AI services: uses AI services
- Developer → Windmill Hub: discovers assets
