2.3 KiB
2.3 KiB
Backend Handoff Checklist: Member App Channel
This checklist defines backend requirements for app-native member communication.
Implementation status:
- Local reference implementation exists in
/Users/vsg/Documents/VSG Codex/web/backend/secretapi(sqlite-backed) for register/unregister/events/ack/support. - Production deployment + wallet-session auth hardening still required before launch.
Required Endpoints
POST /member/channel/device/registerPOST /member/channel/device/unregisterGET /member/channel/eventsPOST /member/channel/events/{event_id}/ackPOST /member/channel/support/ticket(owner-only)
Contract Source
docs/api/member-channel.openapi.yamldocs/api/examples/member-channel.examples.md
Deterministic Rules
- Wallet session is mandatory for all channel calls.
- Membership status must be active for event delivery.
- Event ids and dedupe keys are immutable once emitted.
- Event ordering is monotonic by server sequence.
ackis idempotent perevent_id+device_id.- Admin/support channel actions require principal role
org_root_owner.
Data Requirements
Persist at minimum:
- Device channel binding (
wallet,device_id,platform,push_provider,push_token) - Membership status snapshot at event emission time
- Event envelope (
event_id, class, title/body, payload, policy_hash, dedupe_key) - Delivery and ack timestamps
- Principal role snapshot used for channel eligibility
Security Requirements
- Rate limit register/events/ack paths.
- Validate wallet in request matches authenticated session wallet.
- Reject event polling for suspended/revoked memberships.
- Protect against cursor tampering and replay.
- Reject support ticket creation for non-owner roles with
contact_your_org_admin.
Observability Requirements
- Counter metrics per event class emitted.
- Counter metrics for successful/failed ack calls.
- Channel registration churn metrics by platform.
- Correlation id in all responses and logs.
Done Criteria
- App can register channel and poll events deterministically.
- Push loss does not lose events because inbox polling is canonical.
- Membership status changes immediately gate event visibility.
- API behavior matches OpenAPI contract and examples.
- Admin/support controls are never exposed to non-owner principals.