Back to projects
Independent/portfolio experience

OCR Ingestor

A containerized document-ingestion platform triggered by Nextcloud tags, with per-user MCP authentication, configurable scan depth, and bounded VLM fallback.

Evidence status: Repository-verified implementationPython · FastAPI · PostgreSQL · Qdrant · Docling · Tesseract
FIG. 02 · DOCUMENT → CHUNKS → MCP

OCR INGESTOR / INGESTION LINE

OCR INGESTOR / INGESTION LINEIllustrative document-ingestion line: scanner, router, text splitter into chunks, bounded-fallback VLM booth, Markdown press, index rack and an MCP gateway with an agent.OCR-01012345012
PAGES
0
CHUNKS
0
IMAGES
0
DESCRIBED
0
INDEXED
0

StatusREADY

Illustrative cycle: a document is scanned, its text is split into chunks, and meaningful images pass — only as a bounded fallback — through a vision-language model and come back as text. The result is stored as Markdown and as indexed chunks that an agent later queries through MCP.

Illustrative demo values: one page, three text chunks and four index slots. They do not describe performance, accuracy or scale. Search returns chunks only; complete Markdown needs a separate scope.

01

A document-ingestion workflow that produces structured Markdown, routes review work, and supports ownership-aware vector search.

02

Document workflows need to bridge self-hosted storage with AI-assisted extraction without manual exports or unsecured shared credentials. Users need a reliable way to ingest documents directly from Nextcloud, control whether compute-heavy vision models are invoked, and securely query processed records using personal keys.

People working with document collections that need extraction and search while respecting ownership boundaries.

03

Independent/portfolio work: designed and built the platform.

04

  1. User tags a document with an ingestion tag directly in Nextcloud to trigger the processing pipeline
  2. Nextcloud webhook notifies the ingestion service to retrieve and queue the targeted document
  3. User selects the scan depth: fast text/layout parsing, or deep analysis with bounded VLM fallback for complex visual structures
  4. Parse document with Docling/Tesseract into clean, structured Markdown and metadata
  5. Generate text and image embeddings and store them with tenant-ownership metadata in Qdrant
  6. Users authenticate with personal API keys via MCP to validate their authorization and query their own documents securely

05

  • Used Nextcloud file tags as the native trigger to integrate document intake into existing storage habits without separate upload portals.
  • Allowed users to configure scan depth per document, reserving expensive VLM inference only for visually ambiguous layouts.
  • Implemented individual user keys at the MCP boundary to enforce strict authentication, authorization, and ownership-filtered vector search.