Context
In every company, knowledge sits in documents: policies, contracts, manuals, quotes, spreadsheets. When someone needs an answer, they dig through folders or ask a colleague. Public AI tools would help, but many companies do not want to send internal documents to someone else’s servers. DocMind answers questions about a company’s documents and runs on the company’s own server. I built it alone, from architecture to installation.
What was built
- Questions and answers over documents: a user asks in plain language, and the answer streams into the browser with the sources it was built from.
- Document ingestion: PDF, Word, PowerPoint, Excel, text and Markdown, with optional OCR for scanned documents, plus BookStack wiki pages and files from an Azure Storage container. Changes are ingested incrementally, and folders can be synced automatically.
- Retrieval: hybrid search in the Qdrant vector database with cross-encoder reranking, so the language model only receives the most relevant passages.
- Local language model: answers come from a model running through Ollama on the company’s server, so documents never leave it. An external model can be connected when needed.
- Sign-in and separated data: Keycloak sign-in, each organisation’s data fully isolated, and folder access restricted per user group.
- Administration: document sources, ingestion jobs and language model settings per organisation.
- Website chat widget: one line of code on the company’s site gives visitors an assistant that answers only from approved folders, with question limits and no stored question text.
Stack
The backend is Python 3.11 (FastAPI, LlamaIndex, PostgreSQL, Redis) and the frontend is Angular 20. Vectors live in Qdrant, text embeddings come from BAAI/bge-m3, and answers come from a local model through Ollama. Everything runs on Docker Compose, with an optional NVIDIA GPU for speed.
Outcome
DocMind is in active development and installs on a company’s own server with a single setup script.