# galaxyproject/galaxy architecture

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

- Interactive diagram: https://gitdiagram.com/galaxyproject/galaxy
- Repository: https://github.com/galaxyproject/galaxy

## Overview

Galaxy is a web platform for running scientific analyses: users work with datasets, histories, tools, and workflows through a browser, while the server coordinates application services and persistence. The README confirms browser access and tools installed manually or from the Tool Shed. The sampled files expose a storage-management workflow and Tool Shed repository management; the broader analysis stages are represented from the source index and tree. Several links for those unsampled capabilities are intentionally omitted rather than inferred.

Main entry points: [`lib/galaxy/webapps/galaxy/services/storage_cleaner.py`](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/services/storage_cleaner.py) (Storage cleaner service), [`lib/galaxy/webapps/galaxy/api/storage_cleaner.py`](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/api/storage_cleaner.py) (Storage cleaner API), [`lib/galaxy/structured_app/__init__.py`](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/structured_app/__init__.py) (Application dependencies), [`lib/tool_shed/tools/tool_version_manager.py`](https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/tools/tool_version_manager.py) (Tool version management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_web_ui["Galaxy web interface<br/>[galaxy.js]"]
  node_client_api["Client API modules"]
  node_storage_ui["Storage screens<br/>[StorageManager.vue]"]
  node_storage_wizard["Operation wizard"]
  node_storage_run_view["Run monitor"]
end

subgraph group_analysis["Analysis domain"]
  node_datasets["Datasets and datatypes<br/>[registry.py]"]
  node_collections["Dataset collections<br/>[collections.py]"]
  node_histories["Histories<br/>[histories.py]"]
  node_workflow_scheduler["Workflow scheduling"]
  node_tool_sources[("Tool source store<br/>[sqlalchemy.py]")]
end

subgraph group_platform["Platform services"]
  node_manager_context["Manager context<br/>[context.py]"]
  node_users["User management<br/>[users.py]"]
  node_app_context["Application dependencies<br/>[__init__.py]"]
  node_orm[("ORM mapping<br/>[base.py]")]
end

subgraph group_storage["Storage management"]
  node_storage_api["Storage cleaner API<br/>[storage_cleaner.py]"]
  node_storage_service["Storage cleaner service<br/>[storage_cleaner.py]"]
  node_storage_ops["Dataset storage operations"]
  node_storage_schema["Storage schemas"]
end

subgraph group_shed["Tool Shed"]
  node_shed_app["Tool Shed application<br/>[structured_app.py]"]
  node_shed_web["Tool Shed web app<br/>[app.py]"]
  node_repository_management["Repository management<br/>[repository_util.py]"]
  node_metadata_management["Repository metadata"]
  node_version_management["Tool version management"]
end

node_user(("Galaxy user"))
node_external_tools["Installed tool sources"]

node_user -.->|"uses"| node_web_ui
node_web_ui -.->|"requests data"| node_client_api
node_client_api -.->|"calls API"| node_storage_api
node_storage_ui -.->|"manages items"| node_storage_api
node_storage_wizard -.->|"starts operation"| node_storage_api
node_storage_run_view -.->|"monitors run"| node_storage_api
node_storage_api -->|"delegates"| node_storage_service
node_storage_service -->|"uses context"| node_manager_context
node_storage_service -->|"authenticates user"| node_users
node_storage_service -->|"dispatches cleanup"| node_histories
node_storage_service -->|"dispatches cleanup"| node_datasets
node_storage_ops -->|"uses schema"| node_storage_schema
node_app_context -->|"registers"| node_datasets
node_app_context -->|"uses mapping"| node_orm
node_workflow_scheduler -->|"uses store"| node_tool_sources
node_shed_web -->|"configures"| node_shed_app
node_shed_app -->|"uses utilities"| node_repository_management
node_version_management -->|"uses"| node_repository_management
node_version_management -->|"uses"| node_metadata_management
node_external_tools -.->|"installs tools"| node_shed_web

click node_web_ui "https://github.com/galaxyproject/galaxy/blob/dev/client/src/app/galaxy.js"
click node_client_api "https://github.com/galaxyproject/galaxy/tree/dev/client/src/api"
click node_storage_ui "https://github.com/galaxyproject/galaxy/blob/dev/client/src/components/User/DiskUsage/Management/StorageManager.vue"
click node_storage_wizard "https://github.com/galaxyproject/galaxy/blob/dev/client/src/components/History/CurrentHistory/HistoryOperations/StorageOperationWizardModal.vue"
click node_storage_run_view "https://github.com/galaxyproject/galaxy/blob/dev/client/src/components/History/StorageOperations/StorageOperationRunView.vue"
click node_datasets "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/datatypes/registry.py"
click node_collections "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/collections.py"
click node_histories "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/histories.py"
click node_workflow_scheduler "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/workflow/scheduling_manager.py"
click node_tool_sources "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tools/source_store/sqlalchemy.py"
click node_manager_context "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/context.py"
click node_users "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/users.py"
click node_app_context "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/structured_app/__init__.py"
click node_orm "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/model/base.py"
click node_storage_api "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/api/storage_cleaner.py"
click node_storage_service "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/services/storage_cleaner.py"
click node_storage_ops "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/dataset_storage_operations.py"
click node_storage_schema "https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/schema/storage_operations.py"
click node_shed_app "https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/structured_app.py"
click node_shed_web "https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/webapp/app.py"
click node_repository_management "https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/util/repository_util.py"
click node_metadata_management "https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/metadata/repository_metadata_manager.py"
click node_version_management "https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/tools/tool_version_manager.py"

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_web_ui,node_client_api,node_storage_ui,node_storage_wizard,node_storage_run_view,node_user toneBlue
class node_datasets,node_collections,node_histories,node_workflow_scheduler,node_tool_sources toneAmber
class node_manager_context,node_users,node_app_context,node_orm toneMint
class node_storage_api,node_storage_service,node_storage_ops,node_storage_schema toneRose
class node_shed_app,node_shed_web,node_repository_management,node_metadata_management,node_version_management,node_external_tools toneIndigo
```

## Components

### Browser client

- [Galaxy web interface](https://github.com/galaxyproject/galaxy/blob/dev/client/src/app/galaxy.js): `client/src/app/galaxy.js`
- [Client API modules](https://github.com/galaxyproject/galaxy/tree/dev/client/src/api): `client/src/api`
- [Storage screens](https://github.com/galaxyproject/galaxy/blob/dev/client/src/components/User/DiskUsage/Management/StorageManager.vue): `client/src/components/User/DiskUsage/Management/StorageManager.vue`
- [Operation wizard](https://github.com/galaxyproject/galaxy/blob/dev/client/src/components/History/CurrentHistory/HistoryOperations/StorageOperationWizardModal.vue): `client/src/components/History/CurrentHistory/HistoryOperations/StorageOperationWizardModal.vue`
- [Run monitor](https://github.com/galaxyproject/galaxy/blob/dev/client/src/components/History/StorageOperations/StorageOperationRunView.vue): `client/src/components/History/StorageOperations/StorageOperationRunView.vue`

### Analysis domain

- [Datasets and datatypes](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/datatypes/registry.py): `lib/galaxy/datatypes/registry.py`
- [Dataset collections](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/collections.py): `lib/galaxy/managers/collections.py`
- [Histories](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/histories.py): `lib/galaxy/managers/histories.py`
- [Workflow scheduling](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/workflow/scheduling_manager.py): `lib/galaxy/workflow/scheduling_manager.py`
- [Tool source store](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tools/source_store/sqlalchemy.py): `lib/galaxy/tools/source_store/sqlalchemy.py`

### Platform services

- [Manager context](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/context.py): `lib/galaxy/managers/context.py`
- [User management](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/users.py): `lib/galaxy/managers/users.py`
- [Application dependencies](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/structured_app/__init__.py): `lib/galaxy/structured_app/__init__.py`
- [ORM mapping](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/model/base.py): `lib/galaxy/model/base.py`

### Storage management

- [Storage cleaner API](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/api/storage_cleaner.py): `lib/galaxy/webapps/galaxy/api/storage_cleaner.py`
- [Storage cleaner service](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/webapps/galaxy/services/storage_cleaner.py): `lib/galaxy/webapps/galaxy/services/storage_cleaner.py`
- [Dataset storage operations](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/managers/dataset_storage_operations.py): `lib/galaxy/managers/dataset_storage_operations.py`
- [Storage schemas](https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/schema/storage_operations.py): `lib/galaxy/schema/storage_operations.py`

### Tool Shed

- [Tool Shed application](https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/structured_app.py): `lib/tool_shed/structured_app.py`
- [Tool Shed web app](https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/webapp/app.py): `lib/tool_shed/webapp/app.py`
- [Repository management](https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/util/repository_util.py): `lib/tool_shed/util/repository_util.py`
- [Repository metadata](https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/metadata/repository_metadata_manager.py): `lib/tool_shed/metadata/repository_metadata_manager.py`
- [Tool version management](https://github.com/galaxyproject/galaxy/blob/dev/lib/tool_shed/tools/tool_version_manager.py): `lib/tool_shed/tools/tool_version_manager.py`

### Other components

- **Galaxy user**
- **Installed tool sources**

## Connections

- Galaxy user → Galaxy web interface: uses
- Galaxy web interface → Client API modules: requests data
- Client API modules → Storage cleaner API: calls API
- Storage screens → Storage cleaner API: manages items
- Operation wizard → Storage cleaner API: starts operation
- Run monitor → Storage cleaner API: monitors run
- Storage cleaner API → Storage cleaner service: delegates (evidence: `lib/galaxy/webapps/galaxy/api/storage_cleaner.py`)
- Storage cleaner service → Manager context: uses context (evidence: `lib/galaxy/webapps/galaxy/services/storage_cleaner.py`)
- Storage cleaner service → User management: authenticates user (evidence: `lib/galaxy/webapps/galaxy/services/storage_cleaner.py`)
- Storage cleaner service → Histories: dispatches cleanup (evidence: `lib/galaxy/webapps/galaxy/services/storage_cleaner.py`)
- Storage cleaner service → Datasets and datatypes: dispatches cleanup (evidence: `lib/galaxy/webapps/galaxy/services/storage_cleaner.py`)
- Dataset storage operations → Storage schemas: uses schema (evidence: `lib/galaxy/managers/dataset_storage_operations.py`)
- Application dependencies → Datasets and datatypes: registers (evidence: `lib/galaxy/structured_app/__init__.py`)
- Application dependencies → ORM mapping: uses mapping (evidence: `lib/galaxy/structured_app/__init__.py`)
- Workflow scheduling → Tool source store: uses store (evidence: `lib/galaxy/workflow/scheduling_manager.py`)
- Tool Shed web app → Tool Shed application: configures (evidence: `lib/tool_shed/webapp/app.py`)
- Tool Shed application → Repository management: uses utilities (evidence: `lib/tool_shed/structured_app.py`)
- Tool version management → Repository management: uses (evidence: `lib/tool_shed/tools/tool_version_manager.py`)
- Tool version management → Repository metadata: uses (evidence: `lib/tool_shed/tools/tool_version_manager.py`)
- Installed tool sources → Tool Shed web app: installs tools
