Skip to content
Work
AutomotivePublic

Avtosan

Backend EngineeringAI / Computer VisionDocument SystemsIntegrations

Automated vehicle valuation and document analysis

System architecture and backend engineering

Context

Vehicle appraisal was a chain of human document reading, spreadsheet pricing, and PDF assembly. Banks needed a repeatable valuation with an audit trail, not a desk process that drifted per operator.

System boundary

In scope

  • document intake
  • OCR
  • VIN validation
  • market comparables
  • valuation
  • generated reports
  • bank handoff

Out of scope

  • physical inspection hardware
  • lender underwriting decisions

Architecture

A FastAPI service owns ingestion and valuation. OCR and VIN checks are isolated stages so a document failure does not contaminate pricing. Generated PDFs are artifacts, not the source of truth; the valuation record is.

A production assessment platform that reads vehicle documents, validates identity, prices against market data, and issues bank-ready reports.
  1. Market source
  2. Ingestion
  3. OCR
  4. VIN validation
  5. Valuation
  6. Documents
  7. Banking API
  • Source → transform → sink
  • Last node is the handoff
Published sequence
  1. Market source
  2. Ingestion
  3. OCR
  4. VIN validation
  5. Valuation
  6. Documents
  7. Banking API
Roles in the diagram
  • external1
  • service1
  • process3
  • store1
  • interface1

Counts from the published record. They describe structure, not a measured result.

Where does validation become a report?

inputs

  • externalMarket source

pipeline

  • serviceIngestion
  • processOCR
  • processVIN validation
  • processValuation

records

  • storeDocuments

handoff

  • interfaceBanking API
  1. Market sourceIngestion
  2. IngestionOCR
  3. OCRVIN validation
  4. VIN validationValuation
  5. ValuationDocuments
  6. DocumentsBanking API

Critical flows

  1. A document pack arrives

  2. pages are classified

  3. OCR extracts identity fields

  4. VIN is validated against registry rules

  5. comparables are scored

  6. a valuation is written

  7. a report is generated

  8. the bank API receives a signed payload.

Stages

  • Document intake
  • Identity validation
  • Market pricing
  • Report generation
  • Bank handoff

Decisions

01

Stage the pipeline

Each stage writes an explicit record. Replay and audit are cheaper than a single opaque job.

02

Keep valuation deterministic

Market adapters are versioned. A valuation cites the data vintage used, not “whatever the API returned today”.

03

Treat PDFs as exports

The report is a projection of the valuation record. Correcting a number means regenerating the artifact, not editing a file.

When it fails

ConditionDetectionResponse
Unreadable or mixed-language documentsOCR confidence + required-field presenceHold for operator review; do not price
VIN checksum or registry mismatchValidation stage rejectStop pipeline; flag identity exception
Stale or missing market comparablesAdapter freshness windowDegrade to manual pricing queue
Bank API timeout or schema rejectHandoff status + retry budgetRetry with backoff; keep local valuation intact

Infrastructure

  • Linux hosts
  • reverse proxy
  • object storage for packs and reports
  • worker queue for OCR and generation
  • structured logs per stage

Outcome

End-to-end appraisal runs as a recorded pipeline. Banks receive a generated pack tied to a valuation record rather than a one-off PDF.

Current state

In production. New document types and lender schemas are added as stages, not as forks of the valuation core.

  • FastAPI
  • Python
  • OCR
  • VIN validation
  • PostgreSQL
  • Redis
  • Nginx
  • Docker
Contact