Enterprise-grade Retrieval-Augmented Generation (RAG) platform with role-based access control, multi-provider support, and adaptive retrieval strategies. Built with FastAPI and Vue.js.
- Multi-Provider Support: OpenAI, Google Gemini, HuggingFace, Llama.cpp with automatic fallback
- 6 Vector Databases: Qdrant, Milvus, Pinecone, Weaviate, Faiss, Chroma (dev only)
- Flexible Embeddings: HuggingFace, OpenAI, Google, Cohere, Voyage AI
- Unified Configuration: Switch providers effortlessly with environment variables
- Role-Based Access Control (RBAC): Department-based permissions with multi-level security clearance
- Message Encryption: Conversation history encrypted at rest with optional cache encryption
- HTTPOnly Cookie Auth: Secure authentication with automatic log sanitization
- Multi-Tier Invitations: Email invitations with organization and department assignment
- Document Approval Workflow: Control document access and processing
- Semantic Caching: RedisVL-powered cache reduces LLM costs by up to 80%
- Adaptive Retrieval: Automatic fallback strategies (vector → hybrid → full-text → LLM-only)
- Hybrid Search: Vector + keyword search with configurable weights
- Cross-Encoder Reranking: Improved retrieval accuracy with reranking models
- Multi-Format Support: PDF, DOCX, TXT, Markdown, CSV, JSON, and more
- Department Isolation: Multi-tenant ready with department-level access control
- Processing Pipeline: Load → Chunk → Embed → Store with status tracking
- Reprocessing Jobs: Background job queue for document updates
- RESTful API: FastAPI backend with OpenAPI documentation
- Modern Frontend: Vue 3 + Vite + TailwindCSS
- Database Flexibility: SQLite, PostgreSQL, MySQL with Alembic migrations
- Demo Mode: Public showcase mode with restricted features
- Health Monitoring: System diagnostics and health checks
- Admin Dashboard: Centralized controls for LLM, embeddings, and vector store config
- Real-time Notifications: In-app notification system with read/unread tracking
- Exception Handling: Comprehensive error reporting and logging
- Docker Support: Multi-stage builds with resource limits and secrets management
Prefer Docker? See Docker Guide for containerized deployment.
Otherwise, see Installation Guide for complete setup instructions.
Backend:
cd backend
# Install dependencies (choose based on your needs)
uv sync --extra cpu # For HuggingFace embeddings (sentence transformers)
# uv sync --extra gpu # For GPU support (large download ~2GB+)
# uv sync --extra llamacpp # For local LLM via llama.cpp (model path)
# uv sync # Base install (OpenAI, Google, Cohere only)
# Combine extras if needed:
# uv sync --extra cpu --extra llamacpp # HuggingFace + local models
cp .env.example .env # Configure your API keys and database
# Option 1: Using uv run (recommended - no activation needed)
uv run setup.py --all # Initialize database with migrations and all seeders or
uv run setup.py --only-seeder admin #to run only the admin seeder
uv run startup.py # Start server on http://localhost:8000
# Option 1a: Development with auto-reload
uv run startup.py --reload # Start with hot-reload
# Option 2: Activate environment first
.venv\Scripts\Activate # Windows
source .venv/bin/activate # macOS/Linux
python setup.py --all / python setup.py --only-seeder admin
python startup.pyFrontend:
cd frontend
npm install
cp .env.example .env # Configure API URL
npm run dev # Start on http://localhost:5173Default Credentials:
- Admin:
admin@ragfortress.com/admin@RAGFortress123
- CHANGELOG - Release notes and version history
- Installation Guide - Complete setup with uv, prerequisites, and troubleshooting
- Docker Guide - Containerized deployment with Docker Compose
- Document Management - Document upload workflow
- Settings Guide - Configuration reference
- LLM Guide - Primary, Internal, and Fallback LLM configuration
- Adaptive Retrieval - Fallback strategies and reranking
- Vector Stores Guide - Vector databases and embeddings
- Permissions Guide - RBAC and security clearance
- Rate Limiting Guide - API rate limiting
- Jobs Guide - Background job processing
- RBAC System - Role and permission management
- API Docs:
http://localhost:8000/docs(Swagger) or/redoc(ReDoc)
Backend: FastAPI, SQLAlchemy, LangChain, Alembic, Pydantic, Pytest
Frontend: Vue 3, Vite, Vue Router, Pinia, TailwindCSS, Axios
Databases: PostgreSQL, MySQL, SQLite
Vector Stores: Chroma, Qdrant, Pinecone, Weaviate
LLMs: OpenAI (GPT-3.5/4/4o), Google Gemini, HuggingFace, Llama.cpp
Embeddings: HuggingFace, OpenAI, Google, Cohere
RAG Fortress uses environment variables for all configuration. Key settings:
SECRET_KEY- JWT secretDATABASE_URL- Database connection stringLLM_PROVIDER- Primary LLM (openai/google/huggingface/llamacpp)EMBEDDING_PROVIDER- Embedding provider (huggingface/openai/google/cohere/voyage)VECTOR_DB_PROVIDER- Vector database (chroma/qdrant/pinecone/weaviate)- Provider-specific API keys (OPENAI_API_KEY, GOOGLE_API_KEY, etc.)
FALLBACK_LLM_PROVIDER- Automatic LLM fallbackINTERNAL_LLM_PROVIDER- Separate LLM for security-sensitive operationsENABLE_RERANKER- Cross-encoder rerankingENABLE_CACHING- Query result cachingCHUNK_SIZE/CHUNK_OVERLAP- Document chunking parametersTOP_K_RESULTS/SIMILARITY_THRESHOLD- Retrieval parameters
See .env.example files for complete configuration options.
LLMs: OpenAI (GPT-4/GPT-4o), Google Gemini, HuggingFace, Llama.cpp
Embeddings: HuggingFace (free), OpenAI, Google, Cohere, Voyage AI
Vector DBs: Qdrant (recommended), Pinecone, Weaviate, Chroma (dev only)
⚠️ Python 3.14 Compatibility
Chroma requires Python ≤3.13 due to pydantic v1 dependencies. Use Qdrant/Pinecone/Weaviate for Python 3.14+, or downgrade to Python 3.12. Fix pending in chromadb PR #5555.
cd backend
pytest # Run all tests (93+ test cases)
pytest tests/test_services/ # Specific test directory
pytest -v # Verbose outputDatabase Migrations:
cd backend
alembic upgrade head # or python migrate.py upgrade to Apply migrations
alembic revision --autogenerate -m "description" # Create new migrationProduction:
# Backend
python run_production.py # Uses Gunicorn with multiple workers
# Frontend
npm run build # Creates dist/ folder for static hostingEnvironment: Set ENVIRONMENT=production to enable production safeguards (blocks Chroma, enforces HTTPS, etc.)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the terms in the LICENSE file.
Nurudeen Habibu
- GitHub: @nurudeen19
- Repository: rag-fortress
- Linkedin: Nurudeen Habibu
- Documentation: See
backend/docs/for detailed guides - API Reference:
http://localhost:8000/docs - Issues: Submit via GitHub Issues
Built with ❤️ using FastAPI and Vue.js