# zotero/zotero-standalone-build architecture

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

- Interactive diagram: https://gitdiagram.com/zotero/zotero-standalone-build
- Repository: https://github.com/zotero/zotero-standalone-build

## Overview

##### Main Components

a. Build System Core
- Central build scripts (/scripts directory)
- Configuration files (config.sh, *.mozconfig files)
- Platform-specific build processes

b. Platform-Specific Components
- Windows build pipeline (/win)
- macOS build pipeline (/mac)
- Linux build pipeline (/linux)

c. Update System
- Update packaging system (/update-packaging)
- Incremental update generation
- Full update generation

d. Asset Management
- Resource files (/assets)
- Branding elements
- Localization files
- Configuration files

e. Integration Modules
- LibreOffice integration
- Word for Mac integration
- Word for Windows integration

**[Input Layer]**
**Zotero Core Repository --> Build Configuration --> Platform Detection**

**[Build Process Layer]**
- Windows Build Pipeline
**Source Code ------> macOS Build Pipeline**
- Linux Build Pipeline

**[Integration Layer]**
**Office Integration Modules --> Platform-Specific Builds**

**[Packaging Layer]**
**Platform Builds --> Installer Generation --> Update Package Creation**

**[Distribution Layer]**
**Final Builds --> Update System --> Deployment**

##### Important Elements to Highlight

- Blue: Core build processes
- Green: Platform-specific components
- Orange: Integration modules
- Purple: Update system
- Gray: Support utilities

b. Connection Types:

##### Technical Details

- XULRunner dependency
- Mozilla-based architecture
- Platform-specific installer systems (NSIS for Windows)
- Update mechanism infrastructure

##### Implementation Notes

- Use standardized UML or similar notation
- Version/branch management representation
- Build artifact flow

##### Key Relationships

- Build script orchestration
- Platform-specific customization flow
- Update package generation process
- Integration module compilation and linking

Remember to include subcomponents like:
- Build script dependencies
- Configuration management
- Resource compilation
- Update package generation
- Platform-specific installer creation

This will create a comprehensive visualization of the build utility's architecture while maintaining clarity about the system's primary purpose of creating distributable Zotero bundles for different platforms.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        ZC[Zotero Core Repository]
        BC["Build Configuration"]:::config
        PD[Platform Detection]
    end

    subgraph BuildProcess
        SRC[Source Code]
        WBP["Windows Build Pipeline"]:::platform
        MBP["macOS Build Pipeline"]:::platform
        LBP["Linux Build Pipeline"]:::platform
    end

    subgraph Integration
        LO["LibreOffice Integration"]:::integration
        WM["Word for Mac Integration"]:::integration
        WW["Word for Windows Integration"]:::integration
    end

    subgraph Packaging
        PB[Platform Builds]
        IG[Installer Generation]
        UPC["Update Package Creation"]:::update
    end

    subgraph Distribution
        FB[Final Builds]
        US["Update System"]:::update
        DEP[Deployment]
    end

    subgraph AssetManagement
        AM["Asset Management"]:::asset
        BR["Branding Resources"]:::asset
        PSA["Platform-Specific Assets"]:::asset
    end

    %% Connections
    ZC --> BC
    BC --> PD
    PD --> SRC

    SRC --> WBP & MBP & LBP
    
    LO & WM & WW --> PB
    
    WBP & MBP & LBP --> PB
    PB --> IG
    IG --> UPC
    
    UPC --> FB
    FB --> US
    US --> DEP

    AM --> IG
    BR --> IG
    PSA --> IG

    %% Styling
    classDef platform fill:#90EE90
    classDef integration fill:#FFA500
    classDef update fill:#DDA0DD
    classDef config fill:#ADD8E6
    classDef asset fill:#D3D3D3

    %% Click Events
    click BC "https://github.com/zotero/zotero-standalone-build/blob/master/config.sh"
    click WBP "https://github.com/zotero/zotero-standalone-build/tree/master/win/"
    click MBP "https://github.com/zotero/zotero-standalone-build/tree/master/mac/"
    click LBP "https://github.com/zotero/zotero-standalone-build/tree/master/linux/"
    click LO "https://github.com/zotero/zotero-standalone-build/tree/master/modules/zotero-libreoffice-integration/"
    click WM "https://github.com/zotero/zotero-standalone-build/tree/master/modules/zotero-word-for-mac-integration/"
    click WW "https://github.com/zotero/zotero-standalone-build/tree/master/modules/zotero-word-for-windows-integration/"
    click US "https://github.com/zotero/zotero-standalone-build/tree/master/update-packaging/"
    click AM "https://github.com/zotero/zotero-standalone-build/tree/master/assets/"
    click BR "https://github.com/zotero/zotero-standalone-build/tree/master/assets/branding/"
    click PSA "https://github.com/zotero/zotero-standalone-build/tree/master/assets/"
```
