"Chat with your documents" sounds simple. Then you build it, and you discover a good RAG system is really eight systems wearing a trench coat.

I recently finished myRAG — a fully self-hosted RAG stack: FastAPI backend, React frontend, and three storage engines (Qdrant, PostgreSQL, Neo4j), all orchestrated with Docker Compose. This post walks through every stage of the pipeline and the concept behind it, with real code from the project.

For a link to the codebase, scroll to bottom!

The architecture at a glance

Document ─► Docling ─► Chunker ─┬─► Dense embed (OpenRouter) ──┐