# biccsdev/3land_sdk architecture

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

- Interactive diagram: https://gitdiagram.com/biccsdev/3land_sdk
- Repository: https://github.com/biccsdev/3land_sdk

## Overview

##### Main Components

a) Core SDK Layer:
- Store Management Module
- Collection Management Module
- NFT Operations Module
- Validation Layer

b) External Integration Layer:
- Solana Blockchain Connection
- Irys Storage Integration
- Wallet Interface

c) Type System:
- Account Types
- Instruction Types
- Error Handling System

**┌─────────────────────────────────────────────────────────────┐**
- Client Application                       │
- ┬─────────────────────────────────┘
- ↓
**┌─────────────────────────────────────────────────────────────┐**
- 3Land SDK Layer                        │
- ┬────────────┬────────────────┬─────────────────┤
- Store    │Collection  │     NFT        │    Utility      │
- Module    │  Module    │   Operations   │    Services     │
- ┴────────────┴────────────────┴─────────────────┘
- ↓
**┌─────────────────────────────────────────────────────────────┐**
- Integration Layer                         │
- ┬────────────┬────────────────┬─────────────────┤
- Solana    │   Irys     │    Wallet      │     PDA         │
- Connection  │  Storage   │   Interface    │   Manager       │
- ┴────────────┴────────────────┴─────────────────┘
- ↓
**┌─────────────────────────────────────────────────────────────┐**
- External Services                         │
- ┬────────────┬────────────────┬─────────────────┤
- Solana    │   Irys     │    Wallet      │     Other       │
- Blockchain  │  Network   │   Provider     │   Services      │
- ┴────────────┴────────────────┴─────────────────┘

##### Component Details

Store Module (src/library/Store.ts):
- Connections to store-related instructions
- Link to store-type definitions
- To PDA Manager

Instruction Layer (src/types/instructions):
- Related instructions (e.g., store, NFT, collection)
- Flow to account types

Account Types (src/types/accounts):
- Related account types
- Relationships between accounts

##### Data Flow Indicators

- Data transformation flows
- Error propagation paths

##### Implementation Notes

- The modular nature of the SDK
- Clear separation between core functionality and external services
- Error handling pathways
- Configuration flexibility

##### Additional Elements

Specialized features like:
- Fee handling mechanisms
- Collection management flows
- NFT minting processes
- Validation checkpoints

Remember to include version information and any network-specific configurations that might affect the architecture.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Application"]
        APP[Client App]
    end

    subgraph SDK["3Land SDK Layer"]
        Store["Store Management"]:::core
        Collection["Collection Management"]:::core
        NFT["NFT Operations"]:::core
        Utility["Utility Services"]:::core
    end

    subgraph Integration["Integration Layer"]
        Solana["Solana Connection"]:::integration
        Irys["Irys Storage"]:::integration
        Wallet["Wallet Interface"]:::integration
        PDA["PDA Manager"]:::integration
    end

    subgraph Types["Type System"]
        AccountTypes["Account Types"]:::types
        InstructionTypes["Instruction Types"]:::types
        ErrorHandling["Error Handling"]:::types
    end

    subgraph External["External Services"]
        SolanaBC["Solana Blockchain"]:::external
        IrysNetwork["Irys Network"]:::external
        WalletProvider["Wallet Provider"]:::external
    end

    %% Connections
    APP --> SDK
    Store --> Integration
    Collection --> Integration
    NFT --> Integration
    Utility --> Integration
    
    Integration --> Types
    Integration --> External

    %% Click events for component mapping
    click Store "https://github.com/biccsdev/3land_sdk/blob/master/src/library/Store.ts"
    click Collection "https://github.com/biccsdev/3land_sdk/blob/master/src/types/accounts/CollectionRegistry.ts"
    click NFT "https://github.com/biccsdev/3land_sdk/blob/master/src/types/instructions/createSingle.ts"
    click Utility "https://github.com/biccsdev/3land_sdk/blob/master/src/utility/utils.ts"
    click Solana "https://github.com/biccsdev/3land_sdk/blob/master/src/utility/Connection.ts"
    click Irys "https://github.com/biccsdev/3land_sdk/blob/master/src/library/Irys/irys.ts"
    click PDA "https://github.com/biccsdev/3land_sdk/blob/master/src/utility/PdaManager.ts"
    click AccountTypes "https://github.com/biccsdev/3land_sdk/blob/master/src/types/accounts/index.ts"
    click InstructionTypes "https://github.com/biccsdev/3land_sdk/blob/master/src/types/instructions/index.ts"
    click ErrorHandling "https://github.com/biccsdev/3land_sdk/blob/master/src/types/errors/index.ts"

    %% Styling
    classDef core fill:#2374ab,stroke:#000,stroke-width:2px,color:#fff
    classDef integration fill:#48a9a6,stroke:#000,stroke-width:2px,color:#fff
    classDef types fill:#d4b483,stroke:#000,stroke-width:2px,color:#000
    classDef external fill:#c1666b,stroke:#000,stroke-width:2px,color:#fff

    %% Legend
    subgraph Legend
        CoreComp["Core Component"]:::core
        IntComp["Integration Component"]:::integration
        TypeComp["Type System Component"]:::types
        ExtComp["External Service"]:::external
    end
```
