Raggy is a learning-focused Retrieval-Augmented Generation (RAG) system built to understand the fundamentals of modern AI applications. This side project was created to practice and explore:
Note: This is a learning project, not production-ready software. The focus is on understanding RAG concepts, embeddings, and vector search rather than building a polished application.
raggy/
āāā backend/ # Django backend application
ā āāā manage.py # Django management script
ā āāā backend/ # Django project configuration
ā āāā conversations/ # Chat and conversation handling
ā ā āāā engine.py # LlamaIndex chat engine
ā ā āāā models.py # Conversation and message models
ā āāā knowledge_base/ # Document processing and vector storage
ā ā āāā extractors/ # Document content extractors
ā ā āāā ingestion/ # Document ingestion pipeline
ā ā āāā vector_store.py # Milvus vector store integration
ā āāā users/ # User authentication and management
ā āāā core/ # Core utilities and Celery tasks
āāā frontend/ # Svelte frontend application
ā āāā src/
ā ā āāā components/ # Reusable UI components
ā ā āāā routes/ # SvelteKit routes and pages
ā ā āāā stores/ # State management
ā ā āāā types/ # TypeScript type definitions
ā āāā package.json # Frontend dependencies
āāā compose.yml # Docker services configuration
āāā pyproject.toml # Python dependencies
āāā README.md # This file
git clone <repository-url>
cd raggy
# Using curl (Linux/macOS)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using Homebrew (macOS)
brew install uv
Copy the .env-sample
as .env
and enter your secrets (particularly an OpenAI API key, a Sendgrid API key for email communication is optional) inside the backend directory.
# Create virtual environment and install dependencies
uv venv
uv sync
# Activate virtual environment (optional)
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
# Start all required services
docker compose up -d
# Verify services are running
docker compose ps
This starts:
cd backend
# Run migrations
uv run python manage.py migrate
# Create superuser
uv run python manage.py createsuperuser
# Terminal 1: Start Django server
cd backend
uv run python manage.py runserver
# Terminal 2: Start Celery worker
cd backend
uv run celery --app core worker --loglevel=info --concurrency=1 --pool=solo --queues=celery
# Terminal 3: Install dependencies and start dev server
cd frontend
npm install
npm run dev
root
, Password: milvus
)# Python dependencies
uv add <package-name>
# Frontend dependencies
cd frontend
npm install <package-name>
Port Conflicts: If you get port conflicts, check if services are already running:
docker compose down
docker compose up -d
Milvus Connection Issues: Ensure Milvus is fully started:
docker compose logs standalone
Python Path Issues: Always use the correct PYTHONPATH:
uv run python manage.py <command>
# Stop frontend and backend servers (Ctrl+C)
# Stop Docker services
docker compose down