# voltservice/tuist architecture

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

- Interactive diagram: https://gitdiagram.com/voltservice/tuist
- Repository: https://github.com/voltservice/tuist

## Overview

Tuist is a monorepo for build-system tooling and a hosted platform supporting Xcode, Gradle, and Bazel. Its principal documented workflow is to use Tuist’s tools and services to accelerate and manage builds, then inspect build and test insights; other product branches include previews, the Swift package registry, bundle analysis, and generated projects. The README identifies the CLI, server, registry, cache mesh, and Gradle plugin, but the sampled source does not establish most cross-service runtime calls. Accordingly, edges below capture documented capabilities rather than inferred implementation flow.

Main entry points: [`server`](https://github.com/voltservice/tuist/tree/main/server) (Tuist Server), [`cache`](https://github.com/voltservice/tuist/tree/main/cache) (Build Cache), [`cli/Sources/TuistServer/Services/PreviewsUploadService.swift`](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Services/PreviewsUploadService.swift) (Preview Upload), [`cli`](https://github.com/voltservice/tuist/tree/main/cli) (Tuist CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tooling["Build Tooling"]
  node_cli["Tuist CLI"]
  node_project_paths["Project Paths<br/>[Path.swift]"]
  node_coverage_sources["Coverage Sources"]
  node_run_metadata["Run Metadata"]
  node_cache_items["Cache Items<br/>[CacheItem.swift]"]
  node_cache_hashing["Cache Hashing"]
  node_git["Git Operations"]
  node_http_handles["HTTP Handles"]
  node_gradle_plugin["Gradle Plugin"]
  node_gradle_metrics["Machine Metrics"]
  node_gradle_refresh["Token Refresh"]
  node_selective_testing["Selective Testing"]
  node_generated_projects["Generated Projects"]
end

subgraph group_platform["Hosted Platform"]
  node_server["Tuist Server"]
  node_server_previews["Preview API"]
  node_server_storage[("Server Storage<br/>[storage.ex]")]
  node_cache_service[("Build Cache")]
  node_kura["Cache Mesh<br/>[app.rs]"]
  node_kura_auth["Mesh Authorization<br/>[engine.rs]"]
  node_analytics["Build Insights"]
  node_bundle_insights["Bundle Insights"]
end

subgraph group_previews["Preview Sharing"]
  node_preview_types["Preview Types<br/>[PreviewType.swift]"]
  node_preview_upload["Preview Upload"]
  node_artifact_upload["Artifact Transfer"]
  node_android_previews["Android Previews"]
end

subgraph group_registry["Package Registry"]
  node_registry_service["Swift Registry"]
  node_registry_controller["Registry API"]
end

subgraph group_operations["Operations"]
  node_atlas["Internal Ops"]
end

node_engineer(("Developer"))

node_engineer -.->|"uses tooling"| node_cli
node_engineer -->|"speeds builds"| node_cache_service
node_engineer -->|"selects tests"| node_selective_testing
node_engineer -->|"reviews insights"| node_analytics
node_engineer -->|"analyzes bundles"| node_bundle_insights
node_engineer -->|"shares previews"| node_preview_upload
node_engineer -->|"resolves packages"| node_registry_service
node_engineer -->|"manages projects"| node_generated_projects
node_server -->|"hosts cache"| node_cache_service
node_server -.->|"provides previews"| node_server_previews
node_server -.->|"uses storage"| node_server_storage
node_cache_service -.->|"distributed cache"| node_kura
node_kura -->|"authorizes requests"| node_kura_auth
node_registry_service -.->|"serves registry"| node_registry_controller
node_cli -->|"uploads previews"| node_preview_upload
node_preview_upload -->|"transfers artifacts"| node_artifact_upload
node_android_previews -.->|"requests previews"| node_server_previews
node_gradle_plugin -.->|"reports metrics"| node_gradle_metrics

click node_cli "https://github.com/voltservice/tuist/tree/main/cli"
click node_project_paths "https://github.com/voltservice/tuist/blob/main/cli/Sources/ProjectDescription/Path.swift"
click node_coverage_sources "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Analytics/CoverageBuildSources.swift"
click node_run_metadata "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Analytics/RunMetadataStorage.swift"
click node_cache_items "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Cache/CacheItem.swift"
click node_cache_hashing "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Cache/TargetContentHashSubhashes.swift"
click node_git "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistGit/GitController.swift"
click node_http_handles "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistHTTP/FullHandleService.swift"
click node_preview_types "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Models/PreviewType.swift"
click node_preview_upload "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Services/PreviewsUploadService.swift"
click node_artifact_upload "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Services/MultipartUploadArtifactService.swift"
click node_android_previews "https://github.com/voltservice/tuist/blob/main/android/app/src/main/java/dev/tuist/app/data/previews/PreviewsRepository.kt"
click node_server "https://github.com/voltservice/tuist/tree/main/server"
click node_server_previews "https://github.com/voltservice/tuist/blob/main/server/lib/tuist_web/controllers/api/previews_controller.ex"
click node_server_storage "https://github.com/voltservice/tuist/blob/main/server/lib/tuist/storage.ex"
click node_cache_service "https://github.com/voltservice/tuist/tree/main/cache"
click node_kura "https://github.com/voltservice/tuist/blob/main/kura/src/app.rs"
click node_kura_auth "https://github.com/voltservice/tuist/blob/main/kura/src/auth/engine.rs"
click node_gradle_plugin "https://github.com/voltservice/tuist/tree/main/gradle"
click node_gradle_metrics "https://github.com/voltservice/tuist/blob/main/gradle/src/main/kotlin/dev/tuist/gradle/MachineMetricsCollector.kt"
click node_gradle_refresh "https://github.com/voltservice/tuist/blob/main/gradle/src/main/kotlin/dev/tuist/gradle/services/RefreshAuthTokenService.kt"
click node_registry_service "https://github.com/voltservice/tuist/tree/main/registry"
click node_registry_controller "https://github.com/voltservice/tuist/blob/main/registry/lib/tuist_registry_web/controllers/swift/registry_controller.ex"
click node_analytics "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Analytics/RunMetadataStorage.swift"
click node_selective_testing "https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Cache/TargetContentHashSubhashes.swift"
click node_bundle_insights "https://github.com/voltservice/tuist/tree/main/server"
click node_generated_projects "https://github.com/voltservice/tuist/tree/main/cli"
click node_atlas "https://github.com/voltservice/tuist/tree/main/atlas"

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_cli,node_project_paths,node_coverage_sources,node_run_metadata,node_cache_items,node_cache_hashing,node_git,node_http_handles,node_gradle_plugin,node_gradle_metrics,node_gradle_refresh,node_selective_testing,node_generated_projects toneBlue
class node_server,node_server_previews,node_server_storage,node_cache_service,node_kura,node_kura_auth,node_analytics,node_bundle_insights toneAmber
class node_preview_types,node_preview_upload,node_artifact_upload,node_android_previews toneMint
class node_registry_service,node_registry_controller toneRose
class node_atlas,node_engineer toneIndigo
```

## Components

### Build Tooling

- [Tuist CLI](https://github.com/voltservice/tuist/tree/main/cli): `cli`
- [Project Paths](https://github.com/voltservice/tuist/blob/main/cli/Sources/ProjectDescription/Path.swift): `cli/Sources/ProjectDescription/Path.swift`
- [Coverage Sources](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Analytics/CoverageBuildSources.swift): `cli/Sources/TuistCore/Analytics/CoverageBuildSources.swift`
- [Run Metadata](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Analytics/RunMetadataStorage.swift): `cli/Sources/TuistCore/Analytics/RunMetadataStorage.swift`
- [Cache Items](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Cache/CacheItem.swift): `cli/Sources/TuistCore/Cache/CacheItem.swift`
- [Cache Hashing](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Cache/TargetContentHashSubhashes.swift): `cli/Sources/TuistCore/Cache/TargetContentHashSubhashes.swift`
- [Git Operations](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistGit/GitController.swift): `cli/Sources/TuistGit/GitController.swift`
- [HTTP Handles](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistHTTP/FullHandleService.swift): `cli/Sources/TuistHTTP/FullHandleService.swift`
- [Gradle Plugin](https://github.com/voltservice/tuist/tree/main/gradle): `gradle`
- [Machine Metrics](https://github.com/voltservice/tuist/blob/main/gradle/src/main/kotlin/dev/tuist/gradle/MachineMetricsCollector.kt): `gradle/src/main/kotlin/dev/tuist/gradle/MachineMetricsCollector.kt`
- [Token Refresh](https://github.com/voltservice/tuist/blob/main/gradle/src/main/kotlin/dev/tuist/gradle/services/RefreshAuthTokenService.kt): `gradle/src/main/kotlin/dev/tuist/gradle/services/RefreshAuthTokenService.kt`
- [Selective Testing](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Cache/TargetContentHashSubhashes.swift): `cli/Sources/TuistCore/Cache/TargetContentHashSubhashes.swift`
- [Generated Projects](https://github.com/voltservice/tuist/tree/main/cli): `cli`

### Hosted Platform

- [Tuist Server](https://github.com/voltservice/tuist/tree/main/server): `server`
- [Preview API](https://github.com/voltservice/tuist/blob/main/server/lib/tuist_web/controllers/api/previews_controller.ex): `server/lib/tuist_web/controllers/api/previews_controller.ex`
- [Server Storage](https://github.com/voltservice/tuist/blob/main/server/lib/tuist/storage.ex): `server/lib/tuist/storage.ex`
- [Build Cache](https://github.com/voltservice/tuist/tree/main/cache): `cache`
- [Cache Mesh](https://github.com/voltservice/tuist/blob/main/kura/src/app.rs): `kura/src/app.rs`
- [Mesh Authorization](https://github.com/voltservice/tuist/blob/main/kura/src/auth/engine.rs): `kura/src/auth/engine.rs`
- [Build Insights](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistCore/Analytics/RunMetadataStorage.swift): `cli/Sources/TuistCore/Analytics/RunMetadataStorage.swift`
- [Bundle Insights](https://github.com/voltservice/tuist/tree/main/server): `server`

### Preview Sharing

- [Preview Types](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Models/PreviewType.swift): `cli/Sources/TuistServer/Models/PreviewType.swift`
- [Preview Upload](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Services/PreviewsUploadService.swift): `cli/Sources/TuistServer/Services/PreviewsUploadService.swift`
- [Artifact Transfer](https://github.com/voltservice/tuist/blob/main/cli/Sources/TuistServer/Services/MultipartUploadArtifactService.swift): `cli/Sources/TuistServer/Services/MultipartUploadArtifactService.swift`
- [Android Previews](https://github.com/voltservice/tuist/blob/main/android/app/src/main/java/dev/tuist/app/data/previews/PreviewsRepository.kt): `android/app/src/main/java/dev/tuist/app/data/previews/PreviewsRepository.kt`

### Package Registry

- [Swift Registry](https://github.com/voltservice/tuist/tree/main/registry): `registry`
- [Registry API](https://github.com/voltservice/tuist/blob/main/registry/lib/tuist_registry_web/controllers/swift/registry_controller.ex): `registry/lib/tuist_registry_web/controllers/swift/registry_controller.ex`

### Operations

- [Internal Ops](https://github.com/voltservice/tuist/tree/main/atlas): `atlas`

### Other components

- **Developer**

## Connections

- Developer → Tuist CLI: uses tooling
- Developer → Build Cache: speeds builds
- Developer → Selective Testing: selects tests
- Developer → Build Insights: reviews insights
- Developer → Bundle Insights: analyzes bundles
- Developer → Preview Upload: shares previews
- Developer → Swift Registry: resolves packages
- Developer → Generated Projects: manages projects
- Tuist Server → Build Cache: hosts cache
- Tuist Server → Preview API: provides previews
- Tuist Server → Server Storage: uses storage
- Build Cache → Cache Mesh: distributed cache
- Cache Mesh → Mesh Authorization: authorizes requests (evidence: `kura/src/auth/engine.rs`)
- Swift Registry → Registry API: serves registry
- Tuist CLI → Preview Upload: uploads previews (evidence: `cli/Sources/TuistServer/Services/PreviewsUploadService.swift`)
- Preview Upload → Artifact Transfer: transfers artifacts (evidence: `cli/Sources/TuistServer/Services/PreviewsUploadService.swift`)
- Android Previews → Preview API: requests previews
- Gradle Plugin → Machine Metrics: reports metrics (evidence: `gradle/src/main/kotlin/dev/tuist/gradle/TuistMachineMetricsService.kt`)
