# raoulbia-ai/langraph-research-assistant-blogger architecture

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

- Interactive diagram: https://gitdiagram.com/raoulbia-ai/langraph-research-assistant-blogger
- Repository: https://github.com/raoulbia-ai/langraph-research-assistant-blogger

## Overview

##### Project Type and Purpose
- This is a command-line “Research Assistant Blogger” application (MVP) that:
- Lets a user search ArXiv for papers by topic
- Uses LLMs (via OpenAI API) to analyze paper content
- Generates a technical blog post
- Builds and visualizes a paper relationship graph (LangGraph)

- User Interface (CLI in app.py)
- Core Logic (src/main.py)
- Graph Module (src/graph and graph/)
- External Data Clients (utils/arxiv_client.py, utils/google_scholar_client.py)
- LLM Service (OpenAI API)
- Configuration (.env or config.json)
- Storage (local file system for saving posts)
- Tests (tests/)

##### Relationships and Data Flow
- User → CLI (app.py)
⇨ invokes Core Logic
⇨ Core Logic calls Graph Builder and Workflow nodes
⇨ Workflow nodes call External Data Clients to fetch papers
⇨ Graph Module organizes papers into nodes/edges
⇨ Core Logic calls OpenAI API for analysis/generation
⇨ Generated blog post is written to disk
- Config values (API keys, endpoints) flow into clients and LLM calls

##### Architectural Patterns and Technologies
- Modular Python packages (src/, graph/, utils/)
- Workflow/Node pattern via LangGraph (graph/workflow.py, nodes.py)
- External service integration (ArXiv API, Google Scholar, OpenAI)
- CLI entry point (app.py)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Layers
    User["User"]:::external
    CLI["CLI (app.py)"]:::internal
    Core["Core Logic (src/main.py)"]:::internal

    subgraph "Graph Module"
        Nodes["LangGraph Nodes"]:::internal
        Workflow["Workflow"]:::internal
        CoreNodes["Core Nodes"]:::internal
        Domain["Domain Models"]:::internal
        Builder["Graph Builder"]:::internal
    end

    subgraph "External Data Clients"
        Arxiv["ArXiv Client"]:::external
        GS["Google Scholar Client"]:::external
    end

    LLM["OpenAI API"]:::external
    Config["Config (config.json, .env.example)"]:::config
    Storage["Local Storage"]:::storage
    Tests["Tests"]:::internal

    %% Data Flow
    User -->|"runs"| CLI
    CLI -->|"invokes core logic"| Core
    Core -->|"trigger workflow"| Workflow
    Workflow -->|"fetch papers"| Arxiv
    Workflow -->|"fetch papers"| GS
    Workflow -->|"build graph"| Builder
    Builder --> Nodes
    Builder --> CoreNodes
    Builder --> Domain
    Core -->|"analyze via OpenAI"| LLM
    Core -->|"save blog post"| Storage
    Config --> Arxiv
    Config --> GS
    Config --> LLM
    Config --> Core

    %% Tests relation
    Tests -.-> Core

    %% Click Events
    click CLI "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/app.py"
    click Core "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/src/main.py"
    click Nodes "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/graph/nodes.py"
    click Workflow "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/graph/workflow.py"
    click CoreNodes "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/src/graph/core_nodes.py"
    click Domain "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/src/graph/domain.py"
    click Builder "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/src/graph/graph_builder.py"
    click Arxiv "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/utils/arxiv_client.py"
    click GS "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/utils/google_scholar_client.py"
    click Config "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/config.json"
    click Tests "https://github.com/raoulbia-ai/langraph-research-assistant-blogger/blob/main/tests/test_basic.py"

    %% Styles
    classDef internal fill:#e0f7e0,stroke:#2d572c,color:#204020
    classDef external fill:#e0e7f7,stroke:#24507f,color:#10304f
    classDef config fill:#dddddd,stroke:#888888,color:#333333
    classDef storage fill:#cccccc,stroke:#666666,color:#333333
```
