Skip to content

document-ingest-foundation

Shared PDF/Scan/Image → normalized-text ingest primitive. Owns the documentExtract entity (fileRefId, storageKey, per-page text + metadata) as an implicit entity-projection, the per-tenant ocrLanguage/maxPagesPerFile config keys, the documentIngestProvider extension-point providers register accepted mimeTypes/size caps under, and a fileRef.created/fileRef.restored trigger that resolves the provider for a file’s mimeType and requests ingest via documentIngest.requested tagged with the winning provider — a delete→restore round-trip re-requests ingest the same way a fresh upload does. An orphan-extract guard forgets any documentExtract whose fileRef is no longer live at processing time, regardless of how a provider’s own write races the fileRef’s delete/forget — providers should write through writeDocumentExtractForLiveFileRef.

What this feature needs to run (Requires).

flowchart TB
  n_document_ingest_foundation["document-ingest-foundation"]
  subgraph how_reqs["Requires"]
    n_config["config"]
    n_tenant_lifecycle["tenant-lifecycle"]
  end
  n_config --> n_document_ingest_foundation
  n_tenant_lifecycle --> n_document_ingest_foundation

Per-tenant config keys, set via the tenant-admin UI or a seed. 🔒 = encrypted at rest.

KeyTypeDefaultScopeWho can writeWho can read
max-pages-per-filenumber (1–500)50tenantTenantAdmin, SystemAdminTenantAdmin, SystemAdmin, User
ocr-languagetextdeu+engtenantTenantAdmin, SystemAdminTenantAdmin, SystemAdmin, User
  • Registers extension: tenantData → documentExtract