0
Kai Detmers
← Project index
Native consumer product · iOS · AI-assisted captureWorking MVP

CoffeeShelf— camera-first specialty coffee capture.

Photograph a specialty-coffee bag, extract structured metadata, research uncertain fields, review the draft and save it into a private taste history. The interaction starts with the physical object and makes model uncertainty explicit before persistence.

Stack

ClientSwiftUI · native iOS 17+
Personal dataSwiftData · private CloudKit
Shared catalogSupabase · coffee / roaster / community entities
AIvision extraction · web research · structured review
GatewayCloudflare Worker · server-side provider policy
TrustApp Attest · Sign in with Apple · EXIF stripping

Engineering evolution

Reconstructed from source, architecture notes and commit history. The sequence is simplified where multiple branches of work landed together.

01
Prove the camera-first input path.

The package already contains most of the useful metadata. Image capture reduces manual entry for roaster, origin, process, variety and tasting notes while keeping the real-world object central to the flow.

02
Insert human review before persistence.

Vision output is useful but not canonical. The flow became capture → suggested fields → editable review → save, making uncertainty a visible state rather than silently committing model output.

03
Separate personal memory from shared catalog data.

Taste ratings and a user's shelf belong to private CloudKit. Reusable coffee, roaster and community entities benefit from a shared Supabase layer. A single datastore would have been simpler but would blur privacy and ownership boundaries.

04
Move model access behind a trusted gateway.

App Attest and the shared Cloudflare gateway remove provider secrets from the binary and centralize model policy, budgets and abuse controls.

05
Harden account isolation.

Recent work focused on regression coverage around shelf, profile, roaster and discovery data — the class of boundary failure that becomes important as soon as multiple identities share a product.

06
Move from feature expansion to behavioral validation.

The next milestone is whether people repeatedly scan bags, correct model output when needed and return to their taste history. Further feature work should be driven by that evidence.

Interaction architecture

The bag is the primary inputThe camera is not an auxiliary button next to a form. It is the fastest representation of the physical object, so manual fields are primarily used for review and correction.
AI output remains visibly editableSuggested metadata reads as a draft rather than authoritative database content. Human review is part of the normal path, not an exception flow.
Collection before analyticsThe primary mental model is a personal shelf and taste history. Technical metadata supports the object without turning the main interface into a database browser.
Public and private domains stay distinctCommunity/catalog information can be explored and reused; personal ratings and history remain account-scoped. The information architecture reflects the underlying data boundary.

End-to-end architecture

CaptureCompress image and strip EXIF/GPS before AI processing.
AttestProve app identity and obtain gateway access without embedding a reusable provider secret.
ExtractVision maps package content into typed coffee fields.
ResearchUncertain or missing facts can be enriched from web research before review.
PersistPrivate shelf/taste data and shared catalog data are written into separate trust domains.

Validation state

E2Esign-in → photo → attestation → extraction/research → review → save works on device
Privatepersonal records use the user's private CloudKit database
Nextscan success, correction rate, repeat use and public distribution