System Diagram

System Overview

R2R is built on a modular, service-oriented architecture designed for scalability and flexibility:

  1. API Layer: A FastAPI-based cluster handles incoming requests, routing them to appropriate services.

  2. Core Services: Specialized services for authentication, retrieval, ingestion, graph building, and app management.

  3. Orchestration: Manages complex workflows and long-running tasks using a message queue system.

  4. Storage: Utilizes PostgreSQL with pgvector for vector storage and search, Neo4j for graph data, and a file system for raw document storage.

  5. Providers: Pluggable components for embedding, LLM, auth, and ingestion services, supporting multimodal ingestion and flexible model integration.

  6. R2R Application: A React+Next.js app providing a user interface for interacting with the R2R system.

This architecture enables R2R to handle everything from simple RAG applications to complex, production-grade systems with advanced features like hybrid search and GraphRAG.

Ready to get started? Check out our Docker installation guide and Quickstart tutorial to begin your R2R journey.