Originally created by: Waqasahmedwaseer
Architecture phase for the v1.1 flagship — Inbox. Design only, no code. Per the CLAUDE.md workflow: design doc → maintainer approval → implementation.
📄 Full design: docs/designs/inbox.md (github.com)
Turns WaSphere from a send-only API into a two-way platform. Today nothing in the dashboard persists inbound messages (wa-server just fires message.received). The Inbox adds:
Contact / Conversation / Message (+ enums, indexes). All net-new tables → single additive migration, zero backfill, zero risk to existing data.POST /internal/webhook-event/:workspaceId → persists messages idempotently.Dialog/Sheet/Card/Avatar…). No bespoke CSS, no hand-rolled overlays, no z-index hacks → light/dark + mobile work for free.In: persist in/out messages, 1:1 conversations, list/thread/composer (text + 1 image + saved replies), search/filter/unread, delivery status, SSE realtime.
Out (→ v1.2+): groups, multi-agent assignment, internal notes, AI replies, multi-instance scaling, edit/delete.
(Full list of 8 in §12 of the doc.)
🤖 Generated with Claude Code
Originally posted by: Waqasahmedwaseer
Revised per maintainer review (2026-06-04) — now ready for review.
All 5 decisions + 5 hardening additions applied:
sessionDeletedAt) · CwhatsappName/savedNameresolution · D SSE limits (10/ws, 3/user, idle+sweep) · E composer offline disabled state (durable send-queue → v1.2)One new low-stakes question (§12): new-message sound — per-user toggle vs global mute (safe default proposed). Otherwise ready to start Commit 1 (data model + migration) on approval.