# joeyoneill/medium_rag_series architecture

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

- Interactive diagram: https://gitdiagram.com/joeyoneill/medium_rag_series
- Repository: https://github.com/joeyoneill/medium_rag_series

## Overview

##### Main Components
- Demo Notebooks: Represent “01_Intro_to_RAG”, “02_Advanced_RAG”, and “03_Agentic_RAG” as standalone examples or modules. They show variations of RAG implementations and can be depicted as “Notebook Demos” that illustrate different levels of technical depth.
- Full-Stack Application:
- Frontend Client: The “04_Fullstack_w_stream/React_Frontend” directory holds the React-based user interface (with configurations, TypeScript files, etc.). This is the “React Frontend” where users interact with the system.
- Documentation: The “RAG_Docs” folder contains additional project documentation (e.g., articles and state of the union notes). Represent this as “Project Documentation” which might be referenced by both developers and system users.

##### Out Relationships and Interactions
- For the Full-Stack part of the project:

##### Architectural Patterns and Technologies
- Separation of concerns inherent in full-stack applications – distinct boundaries between the frontend (React) and backend (FastAPI).
- Mention that the backend leverages Python and, likely, specialized libraries for RAG. Clearly note the “RAGChain” module as a key component.
- The frontend’s implementation with React (and TypeScript) should be noted as the layer that handles user interactions and visualizations.
- Optionally, if any build or deployment scripts (like package.json, tsconfig files, or ESLint setup) are relevant, note that they ensure code quality and proper project structuring.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Notebook Demos Subgraph
    subgraph "Notebook Demos"
        NB1["Introductory RAG Example"]:::notebook
        NB2["Advanced RAG Example"]:::notebook
        NB3["Agentic RAG Example"]:::notebook
    end

    %% Full-Stack Application Subgraph
    subgraph "Full-Stack Application"
        subgraph "FastAPI RAG Backend"
            BE1["Backend Service (main.py)"]:::backend
            BE2["RAGChain Module"]:::module
        end
        FE["React Frontend"]:::frontend
    end

    %% Project Documentation Node
    DOC["Project Documentation"]:::docs

    %% Connections
    FE -->|"API_Request"| BE1
    BE1 -->|"calls_RAGChain"| BE2
    DOC -->|"provides_context"| NB1
    DOC -->|"provides_context"| BE1

    %% Styling Classes
    classDef notebook fill:#C4E1FF,stroke:#333,stroke-width:2px;
    classDef backend fill:#FFCCCC,stroke:#cc0000,stroke-width:2px;
    classDef module fill:#FFE5CC,stroke:#FF8C00,stroke-width:2px;
    classDef frontend fill:#D5E8D4,stroke:#82B366,stroke-width:2px;
    classDef docs fill:#F3E5AB,stroke:#E1C699,stroke-width:2px;

    %% Click Events
    click NB1 "https://github.com/joeyoneill/medium_rag_series/blob/main/01_Intro_to_RAG/main.ipynb"
    click NB2 "https://github.com/joeyoneill/medium_rag_series/blob/main/02_Advanced_RAG/main.ipynb"
    click NB3 "https://github.com/joeyoneill/medium_rag_series/blob/main/03_Agentic_RAG/main.ipynb"
    click BE1 "https://github.com/joeyoneill/medium_rag_series/blob/main/04_Fullstack_w_stream/FastAPI_Backend/main.py"
    click BE2 "https://github.com/joeyoneill/medium_rag_series/blob/main/04_Fullstack_w_stream/FastAPI_Backend/RAGChain.py"
    click FE "https://github.com/joeyoneill/medium_rag_series/tree/main/04_Fullstack_w_stream/React_Frontend"
    click DOC "https://github.com/joeyoneill/medium_rag_series/tree/main/RAG_Docs"
```
