Document Intelligence, OCR & Cloud Storage Pipeline

Document Intelligence, OCR & Cloud Storage Pipeline A data-flow diagram generated by Archify. 01 / Document Sources 02 / Ingest & Hash 03 / Extraction & OCR 04 / Durable Stores 05 / Search & Access Scans & PDFs · Invoices & deeds · 01 / Document Sources · Raw files Scans & PDFs Invoices & deeds Raw files Documents View · Drag & drop files · 01 / Document Sources · DocumentsView.jsx Documents View Drag & drop files DocumentsView.jsx Google Drive · External cloud · 01 / Document Sources · Drive API Google Drive External cloud Drive API Upload API · POST /documents · 02 / Ingest & Hash · Multer :3005 Upload API POST /documents Multer :3005 Path Relativizer · Relative storage · 02 / Ingest & Hash · uploads.js Path Relativizer Relative storage uploads.js Drive Sync API · POST /drive/sync · 02 / Ingest & Hash · Google OAuth Drive Sync API POST /drive/sync Google OAuth OCR Pipeline · Text extraction · 03 / Extraction & OCR · Tesseract / PDF OCR Pipeline Text extraction Tesseract / PDF FTS Tokenizer · Porter stemming · 03 / Extraction & OCR · Italian lexicon FTS Tokenizer Porter stemming Italian lexicon Folder Mapper · Hierarchy tree · 03 / Extraction & OCR · Condo / units Folder Mapper Hierarchy tree Condo / units Object Storage · Binary files · 04 / Durable Stores · MinIO / S3 Object Storage Binary files MinIO / S3 FTS5 Index · Virtual table · 04 / Durable Stores · document_text_fts FTS5 Index Virtual table document_text_fts Drive Mirror · Cloud backup · 04 / Durable Stores · Google Workspace Drive Mirror Cloud backup Google Workspace Secure Stream · Signed PDF link · 05 / Search & Access · Protected access Secure Stream Signed PDF link Protected access Search Engine · FTS highlighting · 05 / Search & Access · Snippet preview Search Engine FTS highlighting Snippet preview Drive Modal · Two-way status · 05 / Search & Access · Third-party apps Drive Modal Two-way status Third-party apps upload files PDF/images extract text raw stream persist binary encrypted stream preview signed URL document entry metadata stem words tokens insert FTS search index match snippet FTS results OAuth token credentials condo tree folder paths mirror files backup sync status verified audit Legend primary data policy / PII data store data flow

Tesseract OCR Pipeline

  • • Parses unstructured PDF scans and receipt images directly during ingestion
  • • Extracts invoice identifiers, dates, payment amounts, and VAT codes automatically
  • • Stores original binaries securely in MinIO/S3 using deterministic relative keys

SQLite FTS5 Search Engine

  • • Applies Italian language stemming and tokenization on extracted document text
  • • Maintains real-time virtual search table document_text_fts indexed by document ID
  • • Enables instant keyword searches with match highlights and excerpt snippet generation

Google Drive Archival Mirror

  • • Connects via Google OAuth with read/write access scoped to dedicated application folder
  • • Hierarchically structures backup directories: Condominium -> Year -> Invoices / Minutes
  • • Tracks backup synchronization status and offers one-click missing file backfill