# prodrivetechnologies/voyager architecture

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

- Interactive diagram: https://gitdiagram.com/prodrivetechnologies/voyager
- Repository: https://github.com/prodrivetechnologies/voyager

## Overview

##### Project type and purpose
- Voyager is a Python-based, command-line package manager for C/C++ that integrates with an Artifactory server.
- It provides a CLI frontend, core logic for dependency resolution, download, and install, and a plugin system for extending support (e.g., CMake, MSBuild).

##### File structure
- Top-level files and dirs:
- cli.py: CLI entry point
- voyager/: core Python modules (singleton, config, artifact downloader, plugin registry, generators, utilities)
- plugins/: external/plugin extensions (voyager_fake, voyager_listplugins)
- deploy/: PyInstaller spec and installer scripts
- docs/: MkDocs-based documentation
- tests/: integration and unit tests
- Patterns:
- Plugin architecture (plugin_interfaces.py, plugin_registry.py)
- Generators for build-system integration (voyager/generators)
- Static resources and schemas under voyager/static
- Deployment via PyInstaller and Windows Installer scripts

##### Insights from README
- Written for Python 3.10
- Commands: voyager login, voyager install
- Integrates with Artifactory via REST API
- Extensible via plugins conforming to plugin_interfaces
- Built as both pip wheel and standalone executable

- User → CLI
- CLI → Core Engine
- Core Engine ↔ Artifactory Server
- Core Engine → Plugin Registry → Plugin Implementations
- Plugin Implementations → File System / Generated Build Files
- Blue for core components
- Green for plugins
- Orange for external systems (Artifactory, file system)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User and CLI
    User["User"]:::external
    CLI["CLI Frontend"]:::core

    %% Core Engine Components
    subgraph "Core Engine"
        config["Config & Files"]:::core
        resolve["Dependency Resolver & Lockfile Handler"]:::core
        artifact["Artifact Management"]:::core
        infra["Plugin Infrastructure"]:::core
    end

    %% Generator Plugins
    subgraph "Generator Plugins"
        gen_base["generator.py"]:::plugin
        gen_cmake["cmake.py"]:::plugin
        gen_vs["visualstudio.py"]:::plugin
        gen_list["packagelist.py"]:::plugin
        gen_header["headercheck.py"]:::plugin
    end

    %% External Plugins
    subgraph "External/Third-Party Plugins"
        p_fake["voyager_fake"]:::plugin
        p_list["voyager_listplugins"]:::plugin
    end

    %% External Systems
    Artifactory["Artifactory Server"]:::external
    FS["File System\n(Local cache, lockfile,\ninstall directory)"]:::external
    BuildSys["Build Systems\n(CMake/MSBuild)"]:::external

    %% Deployment, Docs, Tests
    subgraph "Deployment Subsystem"
        dep_spec["voyager.spec\nvoyager_onefile.spec"]:::core
        dep_scripts["createspec.py\nhook-voyager_plugins.py\nInstaller.iss"]:::core
    end
    Docs["Documentation\n(docs/, mkdocs.yml)"]:::external
    Tests["Tests\n(tests/)"]:::external

    %% Relationships
    User -->|issues command| CLI
    CLI -->|parses & invokes| config
    CLI -->|calls| resolve
    CLI -->|initializes| infra

    config -->|provides data| resolve
    resolve -->|resolves & lock| artifact
    artifact -->|auth & search| Artifactory
    Artifactory -->|returns artifacts| artifact
    artifact -->|downloads to| FS
    resolve -->|writes lockfile| FS

    infra -->|registers & loads| gen_base
    infra -->|registers & loads| gen_cmake
    infra -->|registers & loads| gen_vs
    infra -->|registers & loads| gen_list
    infra -->|registers & loads| gen_header

    infra -->|discovers| p_fake
    infra -->|discovers| p_list

    gen_base -->|generates files in| FS
    gen_cmake -->|generates CMake files| FS
    gen_vs -->|generates VS props| FS
    gen_list -->|generates package list| FS
    gen_header -->|performs header check| FS

    FS -->|consumed by| BuildSys

    CLI -->|packaged by| dep_spec
    dep_spec -->|includes scripts| dep_scripts

    Docs -->|describes| CLI
    Tests -->|validate| CLI

    %% Click events
    click CLI "https://github.com/prodrivetechnologies/voyager/blob/master/cli.py"
    click CLI "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/voyager.py"
    click config "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/configfile.py"
    click config "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/lockfile.py"
    click config "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/voyagerfile.py"
    click config "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/voyagerpackagefile.py"
    click resolve "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/lockfile.py"
    click resolve "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/package_update.py"
    click resolve "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/deployfromlockfile.py"
    click artifact "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/artifactorylogin.py"
    click artifact "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/artifactorysearch.py"
    click artifact "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/artifactdownloader.py"
    click infra "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/plugin_interfaces.py"
    click infra "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/plugin_registry.py"
    click infra "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/Singleton.py"
    click gen_base "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/generators/generator.py"
    click gen_cmake "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/generators/cmake.py"
    click gen_vs "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/generators/visualstudio.py"
    click gen_list "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/generators/packagelist.py"
    click gen_header "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/generators/headercheck.py"
    click FS "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/static/config_template_linux.json"
    click FS "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/static/config_template_windows.json"
    click FS "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/static/voyager.schema.json"
    click FS "https://github.com/prodrivetechnologies/voyager/blob/master/voyager/static/voyager_doc_index.html"
    click Docs "https://github.com/prodrivetechnologies/voyager/tree/master/docs/"
    click Docs "https://github.com/prodrivetechnologies/voyager/blob/master/mkdocs.yml"
    click Tests "https://github.com/prodrivetechnologies/voyager/blob/master/tests/test_integration.py"
    click Tests "https://github.com/prodrivetechnologies/voyager/blob/master/tests/test_login.py"
    click Tests "https://github.com/prodrivetechnologies/voyager/blob/master/tests/test_plugins.py"
    click Tests "https://github.com/prodrivetechnologies/voyager/tree/master/tests/files/"

    %% Styles
    classDef core fill:#cce5ff,stroke:#004085,color:#004085
    classDef plugin fill:#d4edda,stroke:#155724,color:#155724
    classDef external fill:#fff3cd,stroke:#856404,color:#856404
```
