Brian Hung
Projects
Palate
An iPhone app that turns your photos and screenshots into a private map of places, with a concierge that plans around them.
Reading a photo
Cloud
every photo
POST /v1/photos/upload
/v1/sync/changes
below 0.8
0.8 or more
New photos
picker, share, screenshot
OCR and resolve
Vision, /extract-places
Suggestion
DbPhotoPlaceSuggestion
ImageUploader
background URLSession
PhotoApplier
caption, tags, places
prism
caption, tags, storefront
reconcileEnrichment
cron, plus GPS nearby
Linked place
DbPlacePhoto
Enrichment comes back through sync, so the places reach every device, not only the one that uploaded.
Syncing the library
iPhone
taste-api
Worker and Postgres
outbox, once signed in
ack clears pendingOpId
changes since cursor
optimistic
upsert
append
read in order
SyncEngine.write
domain row + OutboxItem
Local SQLite
GRDB, what the UI reads
EntityApplier
skips un-acked rows
applyMutations
POST /v1/sync/mutations
sync_log
Postgres, ordered by seq
getChanges
GET /v1/sync/changes
Sync runs on launch and after every write. Pulls run for everyone; the outbox waits for a real account.
Asking Atlas
iPhone
taste-api
Cloudflare Worker
turn, tool results
events, client-tool-call
streamText
text, tool calls
sendPush
Device tools
GPS, calendar, my places
RemoteChatClient
/v1/chat/connect socket
Push notification
reply arrives via sync
Server tools
web_search, search_places
ChatAgent
a Durable Object per chat
Background research
DO alarm, no device
gemini-3.7-flash
AI SDK streamText
Device tools run on the phone mid-turn. Research runs later, with no phone, and pushes the answer.