# vcat-dev/shared-configs architecture

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

- Interactive diagram: https://gitdiagram.com/vcat-dev/shared-configs
- Repository: https://github.com/vcat-dev/shared-configs

## Overview

##### Main Components

a) Configuration Providers
- ESLint Configuration Module
- Prettier Configuration Module
- Biome Configuration Module

b) Integration Layer
- Configuration Extension System
- File System Interface

c) CI/CD Components
- GitHub Actions Integration
- NPM Publishing Pipeline

**┌─────────────────────────────────────────────┐**
- Consumer Projects              │
- ┘
- ▲

**┌─────────────────────────────────────────────┐**
- Configuration Distribution          │
- (NPM Package Registry)            │
- ┘
- ▲

**┌─────────────────────────────────────────────┐**
- Shared Configs Core Package         │
- ┬─────────────┬────────────────┤
- ESLint    │  Prettier   │     Biome      │
- Config    │   Config    │    Config      │
- ┴─────────────┴────────────────┘
- ▲

**┌─────────────────────────────────────────────┐**
- CI/CD Pipeline                   │
- (GitHub Actions & Automation)          │
- ┘

##### Important Elements to Highlight

a) Configuration Flow:
- How configurations are extended
- Configuration inheritance paths
- Integration points with consumer projects

b) Tool Integration:
- How the three tools (ESLint, Prettier, Biome) interact
- Potential conflict resolution paths
- Configuration overlap handling

c) Automation Components:
- GitHub Actions workflow integration
- NPM publishing pipeline
- Testing and validation processes

##### Key Relationships to Emphasize

- Configuration inheritance patterns
- Tool interoperability
- CI/CD integration points
- Package distribution flow

##### Implementation Details Level

- Configuration file relationships
- Tool execution order
- Integration touchpoints
- Distribution mechanisms

Remember to include:
##### Tool interaction flows

This will provide a comprehensive view of how the shared configurations system works while maintaining clarity and usefulness for development teams.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Consumer["Consumer Projects"]
        CP1[Project 1]
        CP2[Project 2]
        CP3[Project N]
    end

    subgraph Distribution["Configuration Distribution"]
        NPM["NPM Package Registry"]:::distribution
    end

    subgraph Core["Shared Configs Core Package"]
        subgraph Configs["Configuration Modules"]
            ESLint["ESLint Config"]:::config
            Prettier["Prettier Config"]:::config
            Biome["Biome Config"]:::config
        end
        
        subgraph Files["Configuration Files"]
            ESLintFile["ESLint Config File"]:::file
            PrettierFile["Prettier Config File"]:::file
            BiomeFile["Biome Config File"]:::file
        end
    end

    subgraph Testing["Testing Framework"]
        TestConsole["Console Tests"]:::test
        TestUnused["Unused Vars Tests"]:::test
        TestSuite["Test Suite"]:::test
    end

    subgraph CICD["CI/CD Pipeline"]
        GHA["GitHub Actions"]:::cicd
        NPMPub["NPM Publishing"]:::cicd
        PRReview["AI PR Reviewer"]:::cicd
    end

    Consumer --> NPM
    NPM --> Core
    Core --> CICD
    Testing --> Core
    
    ESLint --> ESLintFile
    Prettier --> PrettierFile
    Biome --> BiomeFile
    
    TestConsole --> TestSuite
    TestUnused --> TestSuite
    
    GHA --> NPMPub
    GHA --> PRReview

    %% Click Events
    click ESLintFile "https://github.com/vcat-dev/shared-configs/blob/master/eslint.config.mjs"
    click PrettierFile "https://github.com/vcat-dev/shared-configs/blob/master/prettier.config.mjs"
    click BiomeFile "https://github.com/vcat-dev/shared-configs/blob/master/biome.jsonc"
    click PRReview "https://github.com/vcat-dev/shared-configs/blob/master/.github/workflows/ai-pr-reviewer.yml"
    click NPMPub "https://github.com/vcat-dev/shared-configs/blob/master/.github/workflows/npm-publish.yml"
    click TestConsole "https://github.com/vcat-dev/shared-configs/blob/master/tests/no-console-invalid.ts"
    click TestUnused "https://github.com/vcat-dev/shared-configs/blob/master/tests/no-unused-vars-invalid.ts"

    %% Styling
    classDef config fill:#2196F3,stroke:#1565C0,color:white
    classDef file fill:#90CAF9,stroke:#1565C0,color:black
    classDef distribution fill:#4CAF50,stroke:#2E7D32,color:white
    classDef cicd fill:#FF9800,stroke:#F57C00,color:white
    classDef test fill:#9C27B0,stroke:#7B1FA2,color:white

    %% Legend
    subgraph Legend
        L1["Configuration Module"]:::config
        L2["Config File"]:::file
        L3["Distribution"]:::distribution
        L4["CI/CD"]:::cicd
        L5["Testing"]:::test
    end
```
