{
  "id": 13759668,
  "title": "A Pet Photo Is Not Posted Until It Has a Receipt: Build a Durable Community Outbox",
  "url": "https://urgent.news/2026/10/11/a-pet-photo-is-not-posted-until-it-has-a-receipt-build-a-durable",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-11T17:14:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/susiewang/a-pet-photo-is-not-posted-until-it-has-a-receipt-build-a-durable-community-outbox-16j8"
  },
  "original_language": "en",
  "account": "The article describes how to build a reliable system for posting community photos with a receipt mechanism. It outlines the main design considerations and dependencies.\n\nThe system distinguishes between two approaches: directly sending photos as chat messages, or saving a canonical post that is later announced in chat. The second design is chosen, as it allows for moderated, editable or long-lived community content stored in an application database.\n\nThe article emphasizes that a failed announcement should not erase a saved post, and retrying an announcement should never create a duplicate canonical post. This distinction allows the system to truthfully represent that a failed announcement does not result in an extra saved post, even if retries occur.\n\nThe core components are modeled as two state machines. The first represents the browser's role in preparing media content, moving through stages like uploading, accepting, blocking, or failing. The second represents the server's responsibilities for maintaining the canonical post and announcement status, including queued, sending, sent, failed or unknown outcomes.\n\nThe unknown state is distinguished from failed to capture situations where the application cannot definitively determine whether the external announcement succeeded. Automatic retries are suggested where failures are expected, but unknown outcomes should only be handled if duplicate announcements are acceptable or the downstream system provides an idempotency contract that the application has verified.\n\nThe tutorial provides TypeScript interfaces for managing submissions, posts, and repositories, along with utilities to fingerprint submissions and build canonical post records. It also references a messaging layer like Tencent RTC's Social Messaging solution to handle the actual community announcements.\n\nIn summary, the article provides a structured approach for building a robust, durable community photo posting system that maintains accurate records of both the submitted content and its eventual announcement status, even in the face of network issues, failures or uncertain outcomes.",
  "summary": "A community prompt such as “show us your pet” sounds almost too simple to architect: choose a photo, add a caption, and post it. Then a mobile connection drops at exactly the wrong moment. The author presses Post again. The first request may have succeeded, the announcement may have been delivered, and the browser has no receipt. A convincing demo retries everything. A reliable community product…",
  "key_points": [
    "Failed announcements do not create duplicate saved posts, ensuring accurate representation.",
    "Core components modeled as two state machines for browser and server responsibilities."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}