All projectsMulti-tenant RAG Platform

DocuMind

Turn Company Documents into an Intelligent Assistant

DocuMind turns a folder of company policy PDFs into an assistant employees can actually trust. Platform admins create organizations, upload documents and add members; members ask in plain language and get streamed answers with numbered citations that open the PDF at the cited page. Retrieval is hybrid — Okapi BM25 implemented in SQL fused with pgvector HNSW through weighted Reciprocal Rank Fusion — and an orchestrator routes each question to department specialists (HR, IT, Finance, Compliance…) that know when a country supplement overrides the base policy. Two companion apps ship with it: DocuMind Office, a walkable 3D virtual office where each department room has its own expert, and DocuMind Evaluation, a harness that measures the whole system end to end.

Category
Multi-tenant RAG Platform
Role
Solo design & engineering
AI engine
OpenAI + Claude judge
Status
Live · Open source
Built with

Next.jsReactTypeScriptTailwind CSSShadcn/UIFastAPIPythonOpenAI Responses APIPostgreSQLpgvectorBetter AuthMinIOThree.jsClaude (LLM judge)ResendUpstash Redis

The landing-page explainer — upload policies, ask in plain language, get cited answers.
What it does

Policy answers people can verify.

Hybrid retrieval

BM25 implemented in SQL catches document codes and defined terms; pgvector HNSW catches paraphrases. Weighted RRF fuses both, with a jurisdiction boost so the right country's manual wins.

Department agents

An orchestrator routes each question to HR, IT, Finance, Procurement, Facilities, Compliance or International specialists — skipped when the user scopes the chat to specific documents.

Page-exact citations

Every answer streams with numbered sources. Click one and the private PDF opens at that page with the passage highlighted.

Orgs, quotas & cost analytics

Per-organization documents, members and settings; monthly per-user quotas; every OpenAI call metered for tokens, tier, latency and cost, with standard/flex service tiers per org.

The flow

From a folder of PDFs to cited answers.

  1. 1Upload policy PDFs — each is validated, stored privately in MinIO and queued for indexing.
  2. 2A background worker parses pages, extracts metadata with an LLM, builds section-aware chunks with contextual headers, then embeds and indexes them.
  3. 3A member asks a question; the orchestrator routes it to the right department specialists and hybrid retrieval gathers the passages.
  4. 4One streamed call writes the answer with citations that open the exact PDF page.
Architecture

Next.js front door, FastAPI brain.

BFF + FastAPI

The browser only talks to Next.js. A backend-for-frontend checks the Better Auth session, then calls FastAPI with a service key and the user id; SSE answers and PDFs stream through unbuffered.

Postgres 17 + pgvector

One database for auth, app data, vectors, BM25 terms and the durable ingestion job queue — plus a private MinIO bucket for the PDFs.

Self-hosted deploys

Coolify on a VPS, with a GitHub Actions workflow that lints, typechecks and redeploys only the app that changed.

Companion apps

A 3D office and an evaluation harness.

DocuMind Office

office.documind.zeeshanai.cloud — a walkable low-poly 3D office. Reception issues access cards, department rooms host experts that answer through DocuMind with real citations and real quota, plus a presentation room, play area, quests, achievements and a rooftop to unlock.

DocuMind Evaluation

evaluation.documind.zeeshanai.cloud — a standalone admin app with versioned datasets and durable runs scored on retrieval, answers (Claude judge), citations, safety, cost and latency — with paired A/B comparison, bootstrap CIs and human-review judge calibration.

Adversarial & safety suite

Prompt injection, out-of-scope refusals, a leakage-canary organization, jurisdiction traps and authorization probes run against the live system.

Gallery

A closer look.

DocuMind chat answering a Berlin employee's policy question with citations
The chat — a question routed to the HR and Finance agents for Germany, answered with numbered citations, sources, cost and latency.
DocuMind citation panel opening the Germany HR manual at the cited page
A citation opens the private PDF at the exact page — here the Germany HR manual's resignation and notice section.
DocuMind documents table with department, jurisdiction, version and indexing status
Documents — each policy PDF with its department, jurisdiction, version, page count and indexing status.
DocuMind analytics dashboard with cost, tokens, latency and cache hit rate
Analytics — cost per answer, tokens, cache hit rate, latency percentiles and ratings, by day.
DocuMind 3D Office globe for choosing a city office
DocuMind 3D Office — pick a city office on the globe; each office answers from its own country's policies.
Low-poly 3D lobby with a reception desk and the player avatar
The lobby — reception issues access cards for the department rooms, with quests and achievements along the way.
Talking to the HR expert inside the 3D office
Department experts — the HR expert answers inside the room, through DocuMind, with real citations and quota.
PDF sheet opened from a citation inside the 3D office with the passage highlighted
Cited sources open the PDF in the office, with the passage highlighted on the cited page.
The IT department room in the 3D office
A department room — the IT bay, with its own expert and a card-locked door.
3D office with the floor-plan minimap open
The floor plan — reception, seven department rooms, a presentation room and a play area.
DocuMind Evaluation dashboard with latest runs, trends and spend
DocuMind Evaluation — latest runs, trend sparklines and spend across the judge and DocuMind itself.
Evaluation run detail with key metrics and confidence intervals
A run — faithfulness, answer quality, behaviour, hit@k, MRR, citation validity and leakage with 95% confidence intervals.
Paired comparison of two evaluation runs with Holm-adjusted tests
Compare — two runs paired on case keys, with bootstrap CIs, Holm-adjusted p-values and an A/A noise floor.
Evaluation trends chart across runs with change markers
Trends — each metric over time with confidence bands and change markers.