Reference guide to the layout of the RAGMaster project.
RAG-master/
|-- backend/
| |-- eval/ # RAGAS evaluation harness + Streamlit dashboard
| | |-- run_eval.py # CLI: run the pipeline over a question set, score with RAGAS
| | |-- dashboard.py # Streamlit metrics dashboard
| | |-- golden_set.json # Curated Q&A over sample_docs/
| | \-- README.md
| |-- tests/ # Pytest unit tests (chunking, retrieval, ingestion)
| |-- chroma_db/ # Persistent ChromaDB collection (auto-created, gitignored)
| |-- logs/ # Backend run logs (gitignored)
| |-- main.py # FastAPI entry point & API routes
| |-- config.py # Typed settings (pydantic-settings), single source of config
| |-- rag_service.py # End-to-end RAG pipeline
| |-- retrieval.py # Hybrid retriever (dense + BM25 + RRF + cross-encoder rerank)
| |-- vector_store.py # ChromaDB wrapper
| |-- chunking.py # Structure-aware markdown/token chunking
| |-- pdf_ingestion.py # PDF/MD/TXT loading + directory scanning
| |-- llm_provider.py # Thin client for any OpenAI-compatible LLM
| |-- database.py # Async SQLAlchemy session/engine
| |-- models.py # SQLAlchemy models (ChatHistory, Feedback)
| |-- middleware.py # Request-ID + latency logging middleware
| |-- requirements.txt # Backend dependencies
| |-- requirements-eval.txt # Extra deps for the eval harness
| |-- requirements-dev.txt # Test/dev deps (pytest)
| |-- Dockerfile / .dockerignore
| \-- .env.example # Copy to .env (the real .env is gitignored)
|-- frontend/
| |-- src/
| | |-- App.jsx / App.css
| | |-- components/Chat.jsx & Chat.css
| | \-- index.jsx / index.css
| |-- index.html
| |-- package.json / package-lock.json
| |-- vite.config.js
| \-- Dockerfile / .dockerignore / nginx.conf
|-- sample_docs/ # Example knowledge base (committed). Put your own docs here.
| |-- what-is-rag.md
| \-- ragmaster-architecture.md
|-- scripts/
| \-- start.sh # Helper to boot backend + frontend together
|-- docker-compose.yml # Run the whole stack with Docker
|-- README.md # Project overview & instructions
|-- LICENSE # MIT
|-- CHANGELOG.md
|-- DESIGN.md # Design tokens & layout conventions
|-- ERRORS.md # Backend-error → friendly-UI-text dictionary
|-- CONTRIBUTING.md # How to set up, test, and contribute
|-- FOLDER_STRUCTURE.md # This document
\-- .gitignore / .gitattributes
- Keep all shell scripts under
scripts/. .env,chroma_db/,chat_history.db,logs/, andvenv/are intentionally gitignored — see.gitignore.sample_docs/is the default knowledge base. Replace it with your own documents (or pointDOCUMENTS_DIRelsewhere), then re-run/reindex.- Copyrighted or private corpora must not be committed;
design/,leadership/,documents/, andcorpus/are gitignored for that reason.