AI / OCR review / verification flow
BOUT — a receipt and warranty archive for electronics and appliances
Team project | 2026.06 ~ 2026.08
BOUT helps users keep receipt and warranty information for electronics and appliances in one place, so they can find proof of purchase
when they need repair, exchange, refund, or free AS support. Users upload receipt photos, and the service extracts draft values such as
purchase date, product name, price, and warranty period with OCR/AI. Because recognition can be wrong, my backend flow focuses on keeping
extracted values as candidates and saving only user-confirmed data as final product and warranty records.
My Contribution
OCR candidate flow, review-before-save boundary, receipt/warranty data shape, and API responsibility split.
Decision
AI/OCR output should remain draft data until the user confirms values that become service records.
Verification
API examples and tests verify the extraction response contract, receipt file references, and invalid final-save requests.
Limitation
The backend does not prove that UI review occurred. For now, that responsibility is separated through distinct API contracts.
Selected backend case
Separating well-formed but incorrect OCR output from final records
An AI response can satisfy a JSON schema and still misread the receipt. I kept extraction success separate from persistence: uncertainty stays visible in the OCR response, while the final receipt API accepts only user-confirmed fields.
1. UploadReceive the receipt image and OCR request.
2. ExtractProduce candidate date, amount, product, and category values.
3. Expose uncertaintyUse needs_review, warnings, and null rather than hiding guesses.
4. Human reviewThe user checks and edits candidate values.
5. PersistStore only reviewed fields and receipt_file_ids.
- Failure state
- A wrong purchase date, price, or product name arrives as a valid-looking response and silently becomes final data.
- Decision
- Constrain categories with Pydantic
Literal, return null for unreadable optional fields, and keep OCR responses separate from receipt creation requests.
- Code evidence
app/modules/ocr/infrastructure/receipt_ocr_client.py, app/modules/ocr/api/schemas.py, app/modules/receipts/api/schemas.py, app/modules/receipts/domain/value_objects.py
- Verification
app/modules/ocr/tests/test_api.py checks review-required responses; app/modules/receipts/tests/test_api.py checks file references and invalid persistence requests.
- Limitation
- The server does not attest that the UI review was completed. The current contract prevents OCR-only fields from leaking into final persistence.
Outcome: instead of overstating AI accuracy, the backend controls the point where uncertain output is promoted into trusted service data.