πΊ Watch the full end-to-end demo featuring Asynchronous PDF ingestion, LangGraph agentic routing, and 100% test coverage validation.
DocuMind is a production-grade, containerized RAG (Retrieval-Augmented Generation) Knowledge Management System. It mimics a secure Azure Enterprise setup, featuring an agentic core that intelligently routes user queries between general conversation and strict document search.
DocuMind-Enterprise is a production-grade Reference Architecture for building secure, compliant Retrieval-Augmented Generation (RAG) systems.
Most RAG demos fail in enterprise production because they lack governance and cost control. This project implements a strict "Citation-First" architecture designed for regulated industries (Legal, Finance, GDPR-compliant sectors). It enforces:
- Strict Source Attribution: No answer is generated without a verified PDF page reference (Zero Hallucination Policy).
- Agentic Routing: Uses LangGraph to intelligently distinguish between "general chitchat" and "database queries," significantly reducing token costs and latency.
- Asynchronous Ingestion: Non-blocking FastAPI pipelines for high-throughput document processing.
The application is built on a Microservices architecture using Docker Compose:
- Frontend (React + Vite): A modern "Glassmorphism" UI with streaming chat support and file ingestion status tracking.
- Backend (FastAPI): Asynchronous Python service handling file parsing, chunking, and AI orchestration.
- Database (PostgreSQL 16): Uses
pgvectorfor high-performance vector similarity search (1536 dimensions) alongside relational metadata. - AI Core (LangGraph): A state-machine agent that routes intent (Search vs.Β Chitchat) and enforces citation governance.
- Agentic Routing: Uses LangGraph to classify intent.
- Strict Governance: No hallucinations; every answer includes Citations.
- Enterprise Ingestion: Asynchronous pipeline for PDF/TXT files.
- Modern UX: Responsive React interface with real-time feedback.
- Backend: Python 3.11, FastAPI 0.110, SQLAlchemy Async, Alembic
- AI: LangChain, LangGraph, OpenAI, pgvector
- Frontend: React 18, TypeScript, Tailwind
- Infra: Docker Compose, Nginx
- Docker & Docker Compose
- OpenAI API Key
git clone https://github.com/Nibir1/documind-enterprise.git
cd documind-enterprise
cp .env.example .env
# Add OPENAI_API_KEY
make buildThis project includes a comprehensive integration test suite covering 100% of the critical path logic. The tests run inside the Docker container to ensure environment consistency and use AsyncMock to simulate OpenAI and PostgreSQL, ensuring zero-cost, fast execution.
To run the test suite:
make test- Frontend: http://localhost:3000
- API Docs: http://localhost:8000/docs
- PDF uploaded β Text extracted β 1000-token chunks
- Embedded via
text-embedding-3-smallβ Stored in Postgres
- Router Node β Retriever Node β Generator Node
- Mandatory citations (Filename + Page + Confidence)
- Zero hallucination policy
- Azure Monitor--ready audit logs
- Router decides if query should use search or chitchat
- Recursive chunking & real-time status
documind-enterprise/
βββ backend/
β βββ app/
β β βββ api/v1/
β β βββ core/
β β βββ models/
β β βββ schemas/
β β βββ services/
βββ frontend/
β βββ src/
β β βββ api/
β β βββ features/
β β βββ components/
βββ docker-compose.yml
βββ Makefile
- Core RAG Architecture
- Azure AD (Entra ID) SSO
- Azure Container Apps deployment
- RBAC for document sets
Author: Nahasat Nibir -- Senior Backend Engineer & AI Systems Architect