# appdome/appdome-api-bash architecture

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

- Interactive diagram: https://gitdiagram.com/appdome/appdome-api-bash
- Repository: https://github.com/appdome/appdome-api-bash

## Overview

1. **What this repo is**
   - A Bash client library that orchestrates Appdome Fusion task API calls against `https://fusion.appdome.com/`.
   - It is not an application server; it is a command-line automation layer built around `curl` and JSON/config file inputs.

2. **Primary entrypoints**
   - `appdome_api.sh` is the main end-to-end workflow for a task, from app upload through build, signing, and download.
   - `appdome_api_sdk.sh` is a lighter entrypoint for SDK/AAR/zip-style flows.
   - `release_fusion_set.sh` appears to be a separate utility for managing or publishing Fusion Set-related operations.

3. **High-level control flow**
   - The scripts accept CLI flags such as API key, Fusion Set ID, Team ID, app artifact path, signing inputs, and output paths.
   - The flow is: parse arguments → validate required inputs → upload or direct-upload artifact → create/trigger build task → poll task status → optionally sign → download outputs and reports.

4. **Task orchestration layer**
   - The `appdome_api_bash/` folder is the core orchestration library.
   - Scripts there are split by API stage: `upload.sh`, `build.sh`, `status.sh`, `download.sh`, `sign.sh`, `validate.sh`, and `direct_upload.sh`.
   - This suggests a pipeline where each stage is isolated and reused across the main wrappers.

5. **Input parsing and shared context**
   - `parser.sh` and `parser_sdk.sh` handle CLI argument decoding for the general and SDK flows.
   - `context.sh` likely stores normalized parameters so later stages can access a consistent runtime context instead of rereading raw CLI args.
   - This separation is important because the same build/sign/download logic can be driven by different input modes.

6. **Validation boundary**
   - `validate.sh` is the gatekeeper before any network operation.
   - It likely checks required files, mutually exclusive signing options, and platform-specific constraints such as Android-only fingerprint options.
   - This prevents invalid or incomplete requests from reaching the Appdome API.

7. **External service boundary**
   - All actual build execution happens outside the repo, in Appdome’s API.
   - The Bash code acts as a thin client around HTTP calls, so the main architectural boundary is between local CLI orchestration and remote Fusion task execution.

8. **Artifact handling**
   - The inputs are binary/mobile artifacts: APK, AAB, IPA, AAR, or ZIP depending on flow.
   - Outputs include signed or processed app artifacts and certificate/report files such as the `--certificate_output` PDF.
   - There is also support for downloading auxiliary outputs like deobfuscation bundles.

9. **Signing subsystem**
   - Signing is handled as a distinct stage via `sign.sh`, `private_sign.sh`, and `auto_dev_sign.sh`.
   - The repo supports different signing modes: Android keystore-based signing, iOS P12/provisioning-profile signing, and automated dev signing variants.
   - The main architectural distinction is whether signing happens on Appdome or is prepared as part of the client workflow.

10. **Vendor and feature-specific integrations**
   - `crashlytics.sh` and `datadog.sh` indicate optional feature configuration modules for integrating third-party observability or crash-reporting settings into the build.
   - These appear to be additive build-time concerns rather than separate services in this repo.
   - `sign.sh` and `build.sh` likely consume these feature settings as part of the request payload.

11. **Certificate pinning and Android signing fingerprints**
   - The README documents certificate pinning bundles and an Android signing fingerprint list.
   - Architecturally, these are specialized input packages that get folded into the build request, not separate runtime components.
   - The repo treats them as optional configuration artifacts that alter how the remote build is produced.

12. **Shared utilities and implementation style**
   - `utils.sh` is the common helper layer, likely containing shell helpers for file checks, logging, JSON handling, and curl invocation patterns.
   - The whole project is Bash-based, so the codebase is structured as composable shell modules rather than classes or services.
   - An architecture diagram should therefore show a single CLI client split into reusable script modules, with one external dependency: the Appdome API.

Main entry points: [`appdome_api_bash/build.sh`](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/build.sh) (Build), [`appdome_api_bash/sign.sh`](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/sign.sh) (Sign), [`appdome_api_bash/upload.sh`](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/upload.sh) (Upload), [`utils.sh`](https://github.com/appdome/appdome-api-bash/blob/master/utils.sh) (Utils)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Entry points"]
  node_appdome_api_sh["Main CLI<br/>entrypoint<br/>[appdome_api.sh]"]
  node_appdome_api_sdk_sh["SDK CLI<br/>entrypoint<br/>[appdome_api_sdk.sh]"]
  node_release_fusion_set_sh["Fusion Set"]
end

subgraph group_orchestration["Orchestration"]
  node_parser_sh["Parser<br/>[parser.sh]"]
  node_parser_sdk_sh["SDK parser<br/>cli parser<br/>[parser_sdk.sh]"]
  node_validate_sh["Validate<br/>gatekeeper<br/>[validate.sh]"]
  node_upload_sh["Upload<br/>api stage<br/>[upload.sh]"]
  node_direct_upload_sh["Direct upload<br/>api stage<br/>[direct_upload.sh]"]
  node_build_sh["Build<br/>api stage<br/>[build.sh]"]
  node_status_sh["Status<br/>api stage<br/>[status.sh]"]
  node_download_sh["Download<br/>api stage<br/>[download.sh]"]
end

subgraph group_signing["Signing"]
  node_sign_sh["Sign<br/>[sign.sh]"]
  node_private_sign_sh["Private sign<br/>signing mode<br/>[private_sign.sh]"]
  node_auto_dev_sign_sh["Auto dev sign<br/>signing mode<br/>[auto_dev_sign.sh]"]
end

subgraph group_integrations["Integrations"]
  node_crashlytics_sh["Crashlytics<br/>feature module<br/>[crashlytics.sh]"]
  node_datadog_sh["Datadog<br/>feature module<br/>[datadog.sh]"]
end

subgraph group_support["Support"]
  node_context_sh["Context<br/>runtime state<br/>[context.sh]"]
  node_utils_sh["Utils<br/>shared helpers<br/>[utils.sh]"]
end

subgraph group_external["External service"]
  node_appdome_api_fusion(("Fusion API<br/>external api"))
end

node_appdome_api_sh -->|"uses"| node_parser_sh
node_appdome_api_sdk_sh -->|"uses"| node_parser_sdk_sh
node_parser_sh -->|"normalize"| node_context_sh
node_parser_sdk_sh -->|"normalize"| node_context_sh
node_context_sh -->|"feeds"| node_validate_sh
node_validate_sh -->|"gates"| node_upload_sh
node_validate_sh -->|"gates"| node_direct_upload_sh
node_upload_sh -->|"hands off"| node_build_sh
node_direct_upload_sh -->|"hands off"| node_build_sh
node_build_sh -->|"polls"| node_status_sh
node_status_sh -->|"completes"| node_download_sh
node_build_sh -->|"configures"| node_sign_sh
node_sign_sh -->|"branches"| node_private_sign_sh
node_sign_sh -->|"branches"| node_auto_dev_sign_sh
node_crashlytics_sh -->|"augments"| node_build_sh
node_datadog_sh -->|"augments"| node_build_sh
node_upload_sh -->|"calls"| node_appdome_api_fusion
node_direct_upload_sh -->|"calls"| node_appdome_api_fusion
node_build_sh -->|"calls"| node_appdome_api_fusion
node_status_sh -->|"calls"| node_appdome_api_fusion
node_download_sh -->|"calls"| node_appdome_api_fusion
node_sign_sh -->|"calls"| node_appdome_api_fusion
node_utils_sh -->|"supports"| node_upload_sh
node_utils_sh -->|"supports"| node_build_sh
node_utils_sh -->|"supports"| node_download_sh

click node_appdome_api_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api.sh"
click node_appdome_api_sdk_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_sdk.sh"
click node_release_fusion_set_sh "https://github.com/appdome/appdome-api-bash/blob/master/release_fusion_set.sh"
click node_parser_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/parser.sh"
click node_parser_sdk_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/parser_sdk.sh"
click node_context_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/context.sh"
click node_validate_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/validate.sh"
click node_upload_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/upload.sh"
click node_direct_upload_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/direct_upload.sh"
click node_build_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/build.sh"
click node_status_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/status.sh"
click node_download_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/download.sh"
click node_sign_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/sign.sh"
click node_private_sign_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/private_sign.sh"
click node_auto_dev_sign_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/auto_dev_sign.sh"
click node_crashlytics_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/crashlytics.sh"
click node_datadog_sh "https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/datadog.sh"
click node_utils_sh "https://github.com/appdome/appdome-api-bash/blob/master/utils.sh"

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_appdome_api_sh,node_appdome_api_sdk_sh,node_release_fusion_set_sh toneBlue
class node_parser_sh,node_parser_sdk_sh,node_validate_sh,node_upload_sh,node_direct_upload_sh,node_build_sh,node_status_sh,node_download_sh toneAmber
class node_sign_sh,node_private_sign_sh,node_auto_dev_sign_sh toneMint
class node_crashlytics_sh,node_datadog_sh toneRose
class node_context_sh,node_utils_sh toneIndigo
class node_appdome_api_fusion toneTeal
```

## Components

### Entry points

Top-level command scripts that start the Bash workflows.

- [Main CLI](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api.sh): entrypoint · Full end-to-end task workflow for upload, build, sign, and download. · `appdome_api.sh`
- [SDK CLI](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_sdk.sh): entrypoint · Lighter entrypoint for SDK, AAR, and zip-style flows. · `appdome_api_sdk.sh`
- [Fusion Set](https://github.com/appdome/appdome-api-bash/blob/master/release_fusion_set.sh): utility · Separate utility for Fusion Set-related management or publishing. · `release_fusion_set.sh`

### Orchestration

Core task pipeline modules that wrap Appdome API stages.

- [Parser](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/parser.sh): cli parser · Decodes general CLI flags into normalized inputs. · `appdome_api_bash/parser.sh`
- [SDK parser](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/parser_sdk.sh): cli parser · Decodes CLI flags for the SDK-focused workflow. · `appdome_api_bash/parser_sdk.sh`
- [Validate](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/validate.sh): gatekeeper · Checks required inputs and request constraints before network calls. · `appdome_api_bash/validate.sh`
- [Upload](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/upload.sh): api stage · Uploads artifacts to Appdome for build processing. · `appdome_api_bash/upload.sh`
- [Direct upload](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/direct_upload.sh): api stage · Alternative upload path for direct artifact submission. · `appdome_api_bash/direct_upload.sh`
- [Build](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/build.sh): api stage · Triggers the remote Fusion build task with configured options. · `appdome_api_bash/build.sh`
- [Status](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/status.sh): api stage · Polls task progress until the remote build completes. · `appdome_api_bash/status.sh`
- [Download](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/download.sh): api stage · Fetches processed artifacts, reports, and auxiliary outputs. · `appdome_api_bash/download.sh`

### Signing

Signing-related flow modules and variants.

- [Sign](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/sign.sh): signing stage · Coordinates signing-related request setup and execution. · `appdome_api_bash/sign.sh`
- [Private sign](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/private_sign.sh): signing mode · Handles private signing flows such as keystore or P12-based signing. · `appdome_api_bash/private_sign.sh`
- [Auto dev sign](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/auto_dev_sign.sh): signing mode · Automates development-signing variants for supported platforms. · `appdome_api_bash/auto_dev_sign.sh`

### Integrations

Optional feature modules folded into build requests.

- [Crashlytics](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/crashlytics.sh): feature module · Injects crash-reporting settings into the build payload. · `appdome_api_bash/crashlytics.sh`
- [Datadog](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/datadog.sh): feature module · Injects observability settings into the build payload. · `appdome_api_bash/datadog.sh`

### Support

Shared runtime state and helper utilities.

- [Context](https://github.com/appdome/appdome-api-bash/blob/master/appdome_api_bash/context.sh): runtime state · Holds normalized parameters shared across stages. · `appdome_api_bash/context.sh`
- [Utils](https://github.com/appdome/appdome-api-bash/blob/master/utils.sh): shared helpers · Common shell helpers for logging, file checks, JSON handling, and curl patterns. · `utils.sh`

### External service

Remote Appdome Fusion API executed outside this repo.

- **Fusion API**: external api · Remote Appdome service that executes uploads, builds, signing, and downloads.

## Connections

- Main CLI → Parser: uses · Main CLI begins by parsing general arguments.
- SDK CLI → SDK parser: uses · SDK CLI begins by parsing SDK-specific arguments.
- Parser → Context: normalize · Parsed flags are stored in shared runtime context.
- SDK parser → Context: normalize · SDK parsing also populates shared runtime context.
- Context → Validate: feeds · Validation reads normalized inputs and constraints.
- Validate → Upload: gates · Validation must pass before uploading or building.
- Validate → Direct upload: gates · Validation also guards direct upload paths.
- Upload → Build: hands off · Uploaded artifacts proceed into the build stage.
- Direct upload → Build: hands off · Direct uploads feed the build stage.
- Build → Status: polls · Build execution is followed by status polling.
- Status → Download: completes · Successful completion leads to output download.
- Build → Sign: configures · Build requests incorporate signing setup when needed.
- Sign → Private sign: branches · Signing can route through private signing modes.
- Sign → Auto dev sign: branches · Signing can also route through automated dev signing.
- Crashlytics → Build: augments · Crashlytics options are folded into build payloads.
- Datadog → Build: augments · Datadog options are folded into build payloads.
- Upload → Fusion API: calls · Upload stage invokes the remote Fusion API.
- Direct upload → Fusion API: calls · Direct upload stage invokes the remote Fusion API.
- Build → Fusion API: calls · Build stage submits the task to the remote service.
- Status → Fusion API: calls · Status polling queries remote task state.
- Download → Fusion API: calls · Download stage retrieves remote outputs.
- Sign → Fusion API: calls · Signing-related operations are executed through the remote API.
- Utils → Upload: supports · Shared helpers are used by stage modules.
- Utils → Build: supports · Shared helpers are used by stage modules.
- Utils → Download: supports · Shared helpers are used by stage modules.
