Architecture¶
Last verified: 2026-07-26 against dev at f0388abb.
SDP is a shared smart document processing application with a frontend, backend, extractor workers, storage, messaging, and evaluation tooling.
Components¶
| Component | Responsibility |
|---|---|
| Frontend | React/Vite UI for assessments, validation, extraction/redaction workflows, and organization-scoped API calls. |
| Backend | FastAPI API for assessments, documents, batches, processors, corrections, exports, tenancy, and auth. |
| Extractor apps | Azure Function workers that process Service Bus messages and extract structured data. |
| Service Bus | Queue-based routing from backend processing requests to extractor workers. |
| Blob storage | Document content and intermediate artifacts. |
| Database | Assessments, documents, batches, schemas, processors, extracted items, corrections, and status. |
| Phoenix/Arize | Tracing, dataset, experiment, and evaluator workflows. |
| Infrastructure repo | Terraform-managed deployed Azure resources. |
Runtime Flow¶
- A user creates an assessment and uploads documents.
- Backend stores metadata and document content.
- A batch/batch run selects documents and a processor.
- Backend sends work to the extractor queue.
- Extractor workers process documents and return structured outputs.
- Backend records extracted items, fields, status, and corrections.
- Frontend displays review/validation/export workflows.
Design Notes¶
- Assessments are the top-level organization-scoped unit.
- Processors are schema/extractor combinations.
- Backend registry state and deployed function-app infrastructure are separate; both must be updated for extractor changes.
- BYOK for consumer apps uses server-side forwarding only; browsers must never receive long-lived LLM keys.