BOUT

AI / OCR review / verification flow

Commits may appear as beancan0325, my previous GitHub username.

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. Upload

Receive the receipt image and OCR request.

2. Extract

Produce candidate date, amount, product, and category values.

3. Expose uncertainty

Use needs_review, warnings, and null rather than hiding guesses.

4. Human review

The user checks and edits candidate values.

5. Persist

Store 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.

1. Project Overview

What

An archive service for receipt originals, purchase details, and warranty expiry dates for electronics and appliances.

Why

Lost paper receipts and missed warranty dates make repair, exchange, or refund evidence hard to find later.

For whom

Users who need to revisit purchase records and warranty periods for electronics, appliances, or digital devices.

2. Design

OCR candidate extraction

The service drafts product name, purchase date, price, and warranty-period candidates from receipt photos.

User confirmation step

Since OCR can misread dates, prices, or product names, only user-confirmed values become permanent records.

Warranty record save

Confirmed purchase details and free-AS periods are saved as product-specific warranty records.

Backend responsibility split

I separated OCR candidate creation, user review, and product/warranty persistence to avoid mixing draft and final data.

3. Key Features

BOUT OCR review flow representative image
Receipt OCR

Upload a receipt image and convert extracted values into structured data.

BOUT warranty record representative image
Warranty records

Save confirmed product and purchase details for later warranty lookup.

BOUT product history representative image
Product history

Review product history from confirmed purchase records.

4. Project Problem-Solution

OCR / AI Review

Preventing OCR output from becoming incorrect warranty records

Problem

Receipt OCR is useful, but it can misread product names, prices, dates, or warranty periods.

Cause

AI extraction is probabilistic, so saving it directly can leave incorrect purchase or warranty records.

Fix

Keep OCR output as temporary candidates, validate JSON shape and required fields, then save only user-confirmed values.

Result

The workflow keeps AI speed while making final data responsibility visible in the review step.

Warranty Data

Structuring receipt data so warranty information can be found later

Problem

If only the receipt image is stored, users still need to search for product name, purchase date, and warranty period later.

Cause

Image files and searchable purchase/warranty fields need to be separated for lookup and reminders.

Fix

Separate the original receipt from structured fields such as product name, brand, purchase date, price, and warranty months.

Result

Product warranty lookup, AS expiry reminders, and original receipt review can continue from the same record.

5. Collaboration Process

Feature issues

Work is split by OCR, receipt saving, warranty lookup, and related API behavior.

Feature branches

Changes are kept reviewable through branch-based development and pull requests.

PR review

API response shape, data-save timing, and error rules are left in reviewable diffs.

Labels and releases

Issue labels and versioned releases keep the change scope easier to review.