F34.us Content Aggregator Prototype

A Photo Can Suggest an Item, Not Create One

A look at typed AI suggestions, human review, transient originals, and bounded media retention in Inventory System onboarding.

Taking a photo is one of the quickest ways to say “this is the thing I mean.” It is not a reliable way to say exactly what the thing is, when it was prepared, how much remains, or when it should be used. I built photo-assisted onboarding around that difference. The image can reduce typing, but it cannot silently create inventory.

The flow begins with a deliberately narrow upload boundary. The service accepts a small set of ordinary image formats, limits the incoming byte count, then decodes the file and checks that its real format agrees with its declared type. Dimension and total-pixel limits catch images that are modest on disk but expensive to expand. A malformed file, an oversized image, or a mismatched type stops before analysis. These controls are mundane compared with the model call, but they are what make a camera-facing feature safe to leave available in a real application.

Analysis returns a typed suggestion rather than free-form prose. The schema can propose a name, item type, optional category, quantity, quantity mode, estimated dates, a bounded expiration profile, notes, confidence, questions, and warnings. Unknown fields are rejected; scores, lengths, quantity ranges, and the allowed profile names are validated. The prompt also asks the model to expose uncertainty and avoid claiming certainty from appearance alone. If the response cannot satisfy that contract, the application treats it as unusable instead of attempting to salvage plausible-looking fragments.

The important product boundary comes next: analysis only repopulates an editable onboarding form. At this point there is still no asset and no onboarding event. The person can replace a guessed name, clear a rough date, switch a bag from unit counting to percent remaining, or ignore the suggestion entirely. Questions and warnings sit beside the draft so uncertainty is part of the review rather than hidden metadata. A follow-up answer can refine the suggestion, but that request carries the prior draft, the current form values, and the new answer—not the original image. User-edited fields are explicitly part of the refinement context so the assistant is less likely to overwrite work already done.

Only the normal onboarding submission crosses into the trusted ledger. That single action creates the asset, appends the event, assigns the chosen or generated label, and attaches any pending photo. The photo is linked through a random upload token, and an already attached upload cannot be reassigned to a different asset. A failed form submission preserves the pending token so correcting a validation error does not require another analysis call. This keeps the assisted route compatible with the same idempotent creation path as manual onboarding instead of inventing a second kind of asset creation.

I also separated the image used for understanding from the media retained for browsing. The uploaded bytes are used transiently for analysis and derivative generation; the original is not stored. The media service normalizes orientation and writes a square thumbnail plus a bounded medium JPEG under the served media tree. If either derivative fails, partial files are removed and no photo row remains. Before an item is confirmed, those derivatives are pending rather than attached; an operator cleanup removes stale pending rows and files. Backups likewise pair database state with the public derivatives, not a hidden archive of original camera uploads.

Photo analysis remains optional. When it is not configured, the manual form and label workflow still work; the UI says why the analysis control is unavailable instead of failing midway. That graceful boundary matters because the lasting value is not “AI identified my food.” The lift is a shorter path from camera to a useful, labeled record while a person still owns every fact that enters the inventory. Automation prepares evidence, review turns it into a claim, and the ledger begins only after that claim is accepted.

F34.us Background Image