# ieedan/jsrepo architecture

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

- Interactive diagram: https://gitdiagram.com/ieedan/jsrepo
- Repository: https://github.com/ieedan/jsrepo

## Overview

##### Main Components Identification

The system consists of three main parts:
- CLI Package (`packages/cli`)
- Registry System (`examples/registry`)
- Documentation Site (`sites/docs`)

**┌─────────────────────────────────────────────────┐**
- jsrepo System                   │

- ┌─────────────┐      ┌──────────────────────┐ │
- Registry Hub      │ │
- CLI Tool   │◄────►│  (Block Management)   │ │

- ┘      └──────────────────────┘ │
- ▲                       ▲              │

- ▼                       ▼              │
- ┌─────────────┐      ┌──────────────────────┐ │
- Project   │      │    Documentation     │ │
- Management │      │        Site          │ │
- ┘      └──────────────────────┘ │
- ┘

##### CLI Tool (Command Layer)
- Commands: init, add, auth, build, exec, test, update
- Configuration management
- Git provider integration
- Package management interface

##### Registry Hub
- Block storage and management
- Support for multiple frameworks:
- Angular
- Vue
- Svelte
- Generic JavaScript/TypeScript
- Asset management (styles, scripts)

##### Project Management
- Project initialization
- Dependency resolution
- Build configuration
- Testing infrastructure

##### Documentation Site
- Interactive documentation
- Component showcase
- API documentation
- Usage guides

c) Integration Points:

- CLI ↔ Registry (block fetching/publishing)
- CLI ↔ Git Providers (authentication/repository management)
- CLI ↔ Project (initialization/management)
- Registry ↔ Documentation (component documentation)

- Command interfaces (CLI) - Blue
- Storage components (Registry) - Green
- User interfaces (Documentation) - Purple
- Project management - Orange
- External integrations - Gray

##### Technical Stack Indicators

Following technology markers:
- TypeScript/JavaScript core
- Svelte (documentation site)
- Multiple framework support (Angular, Vue, Svelte)
- Build tools integration
- Package manager compatibility

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph CLI["CLI Tool"]
        Commands["Command Interface"]
        GitIntegration["Git Provider Integration"]
        ConfigMgmt["Configuration Management"]
        PackageMgmt["Package Management"]
    end

    subgraph Registry["Registry Hub"]
        BlockStorage["Block Storage"]
        subgraph Frameworks["Framework Support"]
            Angular["Angular Blocks"]
            Vue["Vue Blocks"]
            Svelte["Svelte Blocks"]
        end
        AssetMgmt["Asset Management"]
    end

    subgraph ProjectMgmt["Project Management"]
        Init["Project Initialization"]
        Dependencies["Dependency Resolution"]
        BuildConfig["Build Configuration"]
        Testing["Testing Infrastructure"]
    end

    subgraph Docs["Documentation Site"]
        UI["UI Components"]
        APIDoc["API Documentation"]
        Guides["Usage Guides"]
        Showcase["Component Showcase"]
    end

    subgraph GitProviders["Git Providers"]
        GitHub["GitHub"]
        GitLab["GitLab"]
        Bitbucket["Bitbucket"]
        AzureDevOps["Azure DevOps"]
    end

    Commands --> BlockStorage
    Commands --> ProjectMgmt
    GitIntegration --> GitProviders
    BlockStorage --> Docs
    Commands --> Dependencies
    BlockStorage --> Frameworks
    AssetMgmt --> BlockStorage

    %% Component Mappings
    click Commands "https://github.com/ieedan/jsrepo/tree/main/packages/cli/src/commands/"
    click BlockStorage "https://github.com/ieedan/jsrepo/tree/main/examples/registry/blocks/"
    click Angular "https://github.com/ieedan/jsrepo/tree/main/examples/registry/blocks/angular/"
    click Vue "https://github.com/ieedan/jsrepo/tree/main/examples/registry/blocks/vue/"
    click Svelte "https://github.com/ieedan/jsrepo/tree/main/examples/registry/blocks/svelte/"
    click AssetMgmt "https://github.com/ieedan/jsrepo/tree/main/examples/registry/blocks/styles/"
    click ProjectMgmt "https://github.com/ieedan/jsrepo/tree/main/packages/cli/src/utils/"
    click BuildConfig "https://github.com/ieedan/jsrepo/tree/main/packages/cli/src/utils/build/"
    click Dependencies "https://github.com/ieedan/jsrepo/blob/main/packages/cli/src/utils/dependencies.ts"
    click GitIntegration "https://github.com/ieedan/jsrepo/blob/main/packages/cli/src/utils/git-providers.ts"
    click UI "https://github.com/ieedan/jsrepo/tree/main/sites/docs/src/lib/components/ui/"
    click APIDoc "https://github.com/ieedan/jsrepo/tree/main/sites/docs/src/lib/components/site/docs/"
    click Docs "https://github.com/ieedan/jsrepo/tree/main/sites/docs/src/"
    click ConfigMgmt "https://github.com/ieedan/jsrepo/tree/main/packages/cli/schemas/"

    classDef cli fill:#3498db,stroke:#2980b9,color:white
    classDef registry fill:#2ecc71,stroke:#27ae60,color:white
    classDef docs fill:#9b59b6,stroke:#8e44ad,color:white
    classDef project fill:#e67e22,stroke:#d35400,color:white
    classDef git fill:#95a5a6,stroke:#7f8c8d,color:white

    class Commands,GitIntegration,ConfigMgmt,PackageMgmt cli
    class BlockStorage,Frameworks,AssetMgmt,Angular,Vue,Svelte registry
    class UI,APIDoc,Guides,Showcase docs
    class Init,Dependencies,BuildConfig,Testing project
    class GitHub,GitLab,Bitbucket,AzureDevOps git
```
