How ahmedmostafaattiaaa/rag_system works
Project type and purpose
• This is a monolithic Python backend service built with FastAPI, implementing a Retrieval-Augmented Generation (RAG) system.
• It exposes HTTP endpoints for data ingestion, processing, and project-level operations, then orchestrates calls to external components (e.g., LLM APIs, vector store).
File structure
• Entry point: src/main.py (instantiates FastAPI, includes routes).
• Routes layer: src/routes/… defines HTTP endpoints and Pydantic schemes.
• Controllers: src/controllers/… contain business logic (DataController, ProcessController, ProjectController).
• Models: src/models/enums define domain constants.
• Helpers: src/helpers/config.py loads environment variables.
• Assets: src/assets holds static files (if any).
• Configuration: .env/.env.example for secrets, requirements.txt for dependencies.
README for additional insights
• Server run command: uvicorn main:app --reload …
• Marks use of environment variables for API keys.
Elements
• Labels for each component (e.g., “FastAPI App”, “DataController”)
• Orange clouds for external APIs (LLM)
• Grey oval for environment/config
• Related modules in containers (e.g., “src/controllers” cluster).