# smackfunyc/chieuminh architecture

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

- Interactive diagram: https://gitdiagram.com/smackfunyc/chieuminh
- Repository: https://github.com/smackfunyc/chieuminh

## Overview

##### Project type and purpose
- This is an AI & product-design portfolio repository: a collection of self-contained Python “mini-projects” showcasing AI scripts and tools.
- Key subprojects:
- 3LLMAgent – an LLM orchestration prototype
- Research_Agent – a multi-agent research system
- x_scraper – a Twitter-data scraper
- The portfolio root simply organizes and showcases these tools; there is no single monolithic app.

##### File structure
- Top level directories:
- 3LLMAgent/ – lives its own README and code (LLM orchestrator)
- Research_Agent/ – contains README plus six Python modules (manager + five agents)
- x_scraper/ – contains README, scraper scripts, helper module, and CSV output
- ai/ and portfolio/ – placeholders (.gitkeep) for future AI assets and portfolio docs
- No build scripts or deployment descriptors – pure Python scripts triggered via CLI or import.

##### README for additional insights
- The root README describes the repo’s purpose: a battle-tested showcase of AI/data/AML/health scripts.

##### Key points to capture
- Don’t overthink: break the repo into its three runnable tools, each with internal orchestration and external integrations.
- How each module starts (CLI or import), what sub-components it invokes, and where data flows in/out.
- Make it obvious where to drop in a new agent, a new scraper, or a new external service.

## Diagram (Mermaid)

```mermaid
flowchart TD
    CLI["CLI / User"]
    PortfolioHub["Portfolio Hub"]:::core

    CLI --> PortfolioHub

    subgraph "Portfolio Hub"
        PH_Readme["README.md"]:::file
        AI_dir["ai/"]:::file
        Portfolio_dir["portfolio/"]:::file
    end

    PortfolioHub --> LLMO["3LLMAgent Module"]:::core
    PortfolioHub --> RA["Research_Agent Module"]:::core
    PortfolioHub --> XS["x_scraper Module"]:::core

    subgraph "3LLMAgent Module"
        LLMO_dir["3LLMAgent/"]:::core
        LLMO_Readme["README.md"]:::file
    end

    LLMO --> LLM_API["LLM API"]:::external

    subgraph "Research_Agent Module"
        RM["research_manager.py"]:::orchestration
        PA["planner_agent.py"]:::core
        SA["search_agent.py"]:::core
        CA["crypto_research.py"]:::core
        EA["email_agent.py"]:::core
        WA["writer_agent.py"]:::core
    end

    RA --> RM
    RM --> PA
    RM --> SA
    RM --> CA
    RM --> EA
    RM --> WA

    SA --> WS["Web Search API"]:::external
    CA --> CryptoAPI["Crypto Data API"]:::external
    EA --> SMTP["Email/SMTP"]:::external
    WA --> RM

    RM --> CLI

    subgraph "x_scraper Module"
        XS_dir["x_scraper/"]:::core
        XS_Readme["README.md"]:::file
        XS_main["x_scraper.py"]:::core
        XS_alt["X2_scraper.py"]:::core
        XS_util["xfiles.py"]:::core
        CSV["solana_tweets.csv"]:::storage
    end

    XS --> XS_main
    XS --> XS_alt
    XS_main --> TwitterAPI["Twitter/X API"]:::external
    XS_alt --> TwitterAPI
    TwitterAPI --> CSV

    classDef core fill:#D6EAF8,stroke:#000,stroke-width:1px
    classDef orchestration fill:#A9DFBF,stroke:#000,stroke-width:1px
    classDef external fill:#F5B041,stroke:#000,stroke-width:1px
    classDef storage fill:#ABB2B9,stroke:#000,stroke-width:1px
    classDef file fill:#D2B4DE,stroke:#000,stroke-width:1px

    click PH_Readme "https://github.com/smackfunyc/chieuminh/blob/main/README.md"
    click AI_dir "https://github.com/smackfunyc/chieuminh/tree/main/ai/"
    click Portfolio_dir "https://github.com/smackfunyc/chieuminh/tree/main/portfolio/"
    click LLMO_dir "https://github.com/smackfunyc/chieuminh/tree/main/3LLMAgent/"
    click LLMO_Readme "https://github.com/smackfunyc/chieuminh/blob/main/3LLMAgent/README.md"
    click RM "https://github.com/smackfunyc/chieuminh/blob/main/Research_Agent/research_manager.py"
    click PA "https://github.com/smackfunyc/chieuminh/blob/main/Research_Agent/planner_agent.py"
    click SA "https://github.com/smackfunyc/chieuminh/blob/main/Research_Agent/search_agent.py"
    click CA "https://github.com/smackfunyc/chieuminh/blob/main/Research_Agent/crypto_research.py"
    click EA "https://github.com/smackfunyc/chieuminh/blob/main/Research_Agent/email_agent.py"
    click WA "https://github.com/smackfunyc/chieuminh/blob/main/Research_Agent/writer_agent.py"
    click XS_dir "https://github.com/smackfunyc/chieuminh/tree/main/x_scraper/"
    click XS_Readme "https://github.com/smackfunyc/chieuminh/blob/main/x_scraper/README.md"
    click XS_main "https://github.com/smackfunyc/chieuminh/blob/main/x_scraper/x_scraper.py"
    click XS_alt "https://github.com/smackfunyc/chieuminh/blob/main/x_scraper/X2_scraper.py"
    click XS_util "https://github.com/smackfunyc/chieuminh/blob/main/x_scraper/xfiles.py"
    click CSV "https://github.com/smackfunyc/chieuminh/blob/main/x_scraper/solana_tweets.csv"
```
