# therealfredp3d/george_was_right architecture

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

- Interactive diagram: https://gitdiagram.com/therealfredp3d/george_was_right
- Repository: https://github.com/therealfredp3d/george_was_right

## Overview

a. Data Flow:
- How the Researcher Agent fetches data from external APIs
- Content flow between agents (Researcher → Writer → Illustrator → Editor)
- Demonstrate how the LLM Integration Layer interfaces with different LLM models

b. Control Flow:
- Orchestration flow from main.py through the CrewAI framework
- Configuration management affecting all components

##### Key Architectural Elements

- Environment variables (.env)
- Log files (in /log directory)
- Generated content (markdown reports)
- Generated images

b. Support Systems (Use rounded rectangles):
- Error handling
- Environment validation
- Model selection logic

Top Layer: User Interface/Entry Points
- start.py and main.py

Middle Layer: Core Processing
- Agent system
- LLM integration
- Task orchestration

Bottom Layer: External Services & Storage
- APIs
- LLM models
- File system storage

##### Specific technical details

- Supported LLM models (from llm_models directory)
- Configuration paths for different environments
- Logging mechanisms and output formats

##### Additional Elements

- Version information (v0.6)
- Error handling paths
- Async operations where applicable

## Diagram (Mermaid)

```mermaid
flowchart TB
    %%{ init: { 'theme': 'dark', 'themeVariables': { 'primaryColor': '#2D3436', 'secondaryColor': '#3498DB', 'tertiaryColor': '#2C3E50', 'mainBkg': '#1A1A1A', 'nodeBorder': '#666', 'lineColor': '#666', 'textColor': '#FFF' }}}%%

    subgraph Entry
        START[start.py]
        MAIN[main.py]
    end
    click START "https://github.com/therealfredp3d/george_was_right/blob/main/start.py"
    click MAIN "https://github.com/therealfredp3d/george_was_right/blob/main/main.py"

    subgraph Core["Core System Components"]
        AO[Agent Orchestration]
        LLM[LLM Integration]
        CONFIG[Configuration Management]
        LOG[Logging System]
    end
    click AO "https://github.com/therealfredp3d/george_was_right/blob/main/src/agents.py"
    click LLM "https://github.com/therealfredp3d/george_was_right/blob/main/src/llm.py"
    click CONFIG "https://github.com/therealfredp3d/george_was_right/blob/main/src/config.py"
    click LOG "https://github.com/therealfredp3d/george_was_right/tree/main/log/"

    subgraph Agents
        RA[Researcher Agent]:::agent
        WA[Writer Agent]:::agent
        IA[Illustrator Agent]:::agent
        EA[Editor Agent]:::agent
    end

    subgraph LLMModels["LLM Models"]
        GEM[Gemini]
        GLHF[GLHF]
        GROQ[Groq]
    end
    click GEM "https://github.com/therealfredp3d/george_was_right/tree/main/llm_models/gemini/"
    click GLHF "https://github.com/therealfredp3d/george_was_right/tree/main/llm_models/glhf/"
    click GROQ "https://github.com/therealfredp3d/george_was_right/tree/main/llm_models/groq/"

    subgraph ExternalServices["External Services"]
        GITHUB["GitHub API"]:::external
        SERPER["SerperDev API"]:::external
        DALLE["DALL-E"]:::external
    end

    subgraph Storage["Storage & Configuration"]
        ENV[".env Configuration"]:::storage
        LOGS["Log Files"]:::storage
        IMG["Generated Images"]:::storage
        DOCS["Documentation"]:::storage
    end
    click ENV "https://github.com/therealfredp3d/george_was_right/blob/main/.env.example"
    click LOGS "https://github.com/therealfredp3d/george_was_right/tree/main/log/"
    click IMG "https://github.com/therealfredp3d/george_was_right/tree/main/images/"
    click DOCS "https://github.com/therealfredp3d/george_was_right/tree/main/docs/"

    START --> MAIN
    MAIN --> AO
    AO --> RA & WA & IA & EA
    LLM --> GEM & GLHF & GROQ
    CONFIG --> AO
    CONFIG --> LLM
    LOG --> LOGS

    RA --> GITHUB
    RA --> SERPER
    IA --> DALLE
    
    RA --> WA
    WA --> IA
    IA --> EA
    
    EA --> LOGS
    EA --> IMG

    classDef agent fill:#2ECC71,stroke:#666,stroke-width:2px
    classDef external fill:#E67E22,stroke:#666,stroke-width:2px
    classDef storage fill:#9B59B6,stroke:#666,stroke-width:2px
    
    %% Legend
    subgraph Legend
        L1[Agent]:::agent
        L2[External Service]:::external
        L3[Storage]:::storage
    end
```
