# exa-protocol/exadrive-sdk architecture

> Architecture diagram of the GitHub repository exa-protocol/exadrive-sdk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/exa-protocol/exadrive-sdk
- Repository: https://github.com/exa-protocol/exadrive-sdk

## Overview

##### Main Components
- Core SDK Library: Focus on the "src" directory (especially src/index.ts) where the primary logic resides. This is the heart of the ExaDrive SDK.
- Documentation and Guides: Represent the multiple documentation folders (.gitbook, exacompute-desktop-app, exadrive-dashboard, getting-started, getting-started-with-exacompute) that serve as user and developer guidance explaining how to install, integrate, and use the SDK.
- Build and Configuration: Include nodes for package.json, tsconfig.json, and tsup.config.ts which govern dependencies, TypeScript settings, and bundling configurations.

##### Relationships & Interactions
- Documentation Flow: Demonstrate that various guides (from exacompute-desktop-app, exadrive-dashboard, and getting-started directories) wrap around the core SDK functionality to educate and support users. These components could be shown as supporting layers that interact indirectly with the core using conceptual flows (not direct code dependencies).

##### Architectural Patterns and Design Principles
- Modular Design: The code in the SDK is separated from the documentation, build configuration, and usage guides. This separation helps in both development and version management.
- Open Source and Extensibility: Since the itself an open-source tool, highlight its extensible points – for example, clear API definitions (in TypeScript) that facilitate contributions and integrations.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A("Developer Application"):::app
    D("Core SDK Library"):::core
    C1("package.json"):::config
    C2("tsconfig.json"):::config
    C3("tsup.config.ts"):::config
    E("ExaDrive Storage Network"):::external
    Dist("Distribution Channels"):::external
    GIT("GitBook"):::doc
    EDA("Exacompute Desktop App"):::doc
    EDD("Exadrive Dashboard"):::doc
    GS("Getting Started"):::doc
    GSX("Getting Started with Exacompute"):::doc

    %% Relationships
    A -->|"UsesAPI"| D
    A -->|"GuidedBy"| GIT
    A -->|"GuidedBy"| EDA
    A -->|"GuidedBy"| EDD
    A -->|"GuidedBy"| GS
    A -->|"GuidedBy"| GSX
    D -->|"ConfiguredBy"| C1
    D -->|"ConfiguredBy"| C2
    D -->|"ConfiguredBy"| C3
    D -->|"FileOps"| E
    D -->|"AvailableOn"| Dist

    %% Click Events for Component Mapping
    click D "https://github.com/exa-protocol/exadrive-sdk/blob/main/src/index.ts"
    click GIT "https://github.com/exa-protocol/exadrive-sdk/blob/main/.gitbook"
    click EDA "https://github.com/exa-protocol/exadrive-sdk/tree/main/exacompute-desktop-app"
    click EDD "https://github.com/exa-protocol/exadrive-sdk/tree/main/exadrive-dashboard"
    click GS "https://github.com/exa-protocol/exadrive-sdk/tree/main/getting-started"
    click GSX "https://github.com/exa-protocol/exadrive-sdk/tree/main/getting-started-with-exacompute"
    click C1 "https://github.com/exa-protocol/exadrive-sdk/blob/main/package.json"
    click C2 "https://github.com/exa-protocol/exadrive-sdk/blob/main/tsconfig.json"
    click C3 "https://github.com/exa-protocol/exadrive-sdk/blob/main/tsup.config.ts"

    %% Styles
    classDef app fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef core fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
    classDef config fill:#D6EAF8,stroke:#3498DB,stroke-width:2px;
    classDef external fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;
    classDef doc fill:#D5F5E3,stroke:#28B463,stroke-width:2px;
```
