# thilinahewagama/ai-ready-source-code-compiler architecture

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

- Interactive diagram: https://gitdiagram.com/thilinahewagama/ai-ready-source-code-compiler
- Repository: https://github.com/thilinahewagama/ai-ready-source-code-compiler

## Overview

##### Main Components

a) Input Layer:
- Source Code Directories
- Configuration Settings (file types and ignored folders)

b) Processing Layer:
- File Discovery System
- Filtering Mechanism
- File Content Extractor
- Content Aggregator

c) Output Layer:
- Compiled Output File

##### Flow and Relationships

1. Directory Scanning → File Discovery
2. Configuration Rules → Filtering Mechanism
3. File Discovery → Filtering Mechanism
4. Filtering Mechanism → File Content Extractor
5. File Content Extractor → Content Aggregator
6. Content Aggregator → Output File

##### Component Details

Input Layer:
**┌─ Source Directories**
- iOS Projects (.swift)
- React Native Projects (.ts, .tsx)
- Configuration
- File Types
- Ignored Folders

Processing Layer:
**┌─ File Discovery**
- Filtering (node_modules, ios, android, __tests__, Pods)
- Content Extraction
- Aggregation

Output Layer:
- full_source_code.txt

##### Additional Elements

- File type symbols
- Directory symbols
- Configuration rule indicators
- Exclusion patterns

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef input fill:#90EE90,stroke:#333,stroke-width:2px
    classDef process fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef output fill:#FFA500,stroke:#333,stroke-width:2px
    classDef config fill:#FFB6C1,stroke:#333,stroke-width:2px

    %% Input Layer
    subgraph Input
        SD["Source Directories"]:::input
        CF["Configuration Settings"]:::config
    end

    %% Processing Layer
    subgraph Processing
        FD["File Discovery System"]:::process
        FM["Filtering Mechanism"]:::process
        FCE["File Content Extractor"]:::process
        CA["Content Aggregator"]:::process
    end

    %% Implementation Types
    subgraph Implementations
        IOS["iOS Implementation"]:::process
        RN["React Native Implementation"]:::process
    end

    %% Output Layer
    OUT["full_source_code.txt"]:::output

    %% Relationships
    SD --> FD
    CF -.-> FM
    FD --> FM
    FM --> FCE
    FCE --> CA
    CA --> OUT
    
    FD --> IOS
    FD --> RN
    IOS --> CA
    RN --> CA

    %% Click events
    click IOS "https://github.com/ThilinaHewagama/AI-Ready-Source-Code-Compiler/blob/main/Examples/compile_source_ios.sh"
    click RN "https://github.com/ThilinaHewagama/AI-Ready-Source-Code-Compiler/blob/main/Examples/compile_source_rn.sh"
    click OUT "https://github.com/ThilinaHewagama/AI-Ready-Source-Code-Compiler/blob/main/compile_source_code.sh"

    %% Legend
    subgraph Legend
        L1["Input Components"]:::input
        L2["Processing Components"]:::process
        L3["Output Components"]:::output
        L4["Configuration"]:::config
    end

    %% Notes
    classDef note fill:#fff,stroke:#333,stroke-width:1px
    N1["Excludes: node_modules, ios,<br/>android, __tests__, Pods"]:::note
    FM --- N1
```
