Flowcy displays Mobile notification in its existing send dialog. The API channel is rxcode. A recipient is an account-owned device UUID, never a raw push token. Delivery uses the RxCode iOS APNs topic or Android Firebase project. Email behavior and the shared notification quota remain in place.
These routes require an account session or RxAuth OIDC bearer token (repository API tokens cannot register or list devices):
GET /api/v1/notifications/devices: returns { id, name, provider, environment, updatedAt }[] (with updatedAt as an ISO timestamp) for the caller, without push tokens.PUT /api/v1/notifications/devices: registers or refreshes { id, name, provider, token, environment }. id is a stable UUID; provider is apns or fcm; environment is sandbox or production (default). APNs tokens must be hexadecimal. Clients must send the environment matching the app's signing entitlement. A different account cannot replace the device ID or reuse its token.DELETE /api/v1/notifications/devices: body { "id": "<UUID>" }; deletes only a device owned by the caller. Returns 204, including when absent.Send using POST /api/v1/notifications:
{
"channel": "rxcode",
"recipient": "11111111-1111-4111-8111-111111111111",
"subject": "Build completed",
"body": "Your build passed.",
"format": "text"
}Push supports plain text with no attachments. Banners use at most 200 title characters and 500 body characters; full content remains in Flowcy's notification history. Provider acceptance records sent; it does not prove that the OS displayed a banner. Rejections record failed and release quota through the existing service.
scripts/configure-rxcode-push.mjs /path/to/RxCode/relay-server/.env copies only seven push variables into ignored .env.local, prefixed with RXCODE_, and sets production/preview in Vercel's rxlab/github-pm project via stdin. Private keys are Vercel Secrets. It does not deploy.
Variables: RXCODE_APNS_KEY_B64, RXCODE_APNS_KEY_ID, RXCODE_APNS_TEAM_ID, RXCODE_APNS_TOPIC, RXCODE_APNS_PRODUCTION, RXCODE_FCM_PROJECT_ID, RXCODE_FCM_SERVICE_ACCOUNT_B64. The compatibility APNS_PRODUCTION setting is copied for parity; delivery selects the environment stored on each device instead.
Apply migration 0042_amusing_ronan.sql with the project's migration process before deploying this code. Environment updates apply to subsequent deployments. Neither the database migration nor application deployment was performed by this change.
iOS integration is implemented locally in RxCode. FlowcyPushRegistration serializes account registration, token rotation, DELETE-before-sign-out, explicit disconnect/enable, and recoverable errors. AppDelegate preserves token delivery to paired desktops and separately registers the account APNs token. A settings connection sheet exposes the connection controls.
Normal iOS sign-out blocks if DELETE fails so the user can retry disconnecting. Forced session expiry clears the session while retaining a pending registration marker. Another account cannot overwrite that marker until the old account disconnects.
These are standard Flowcy notification payloads (source: "flowcy"), distinct from RxCode's encrypted paired-desktop alerts. APNs sends a standard alert without mutable-content. On iOS, tapping a Flowcy notification opens the inbox; optional project/task/story IDs are accepted only after authorization. The current Flowcy sender supplies no such routing IDs.
Android client integration is still pending, including account registration, token refresh, and sign-out/disconnect cleanup. Flowcy sends an FCM notification payload; RxCode Android must handle RemoteMessage.notification while foregrounded, as its current handler only accepts encrypted enc data. Background FCM display uses the Firebase SDK.
Live push and real-device delivery remain unverified. Local iOS implementation does not establish deployed or end-to-end delivery; the migration and deployment requirements above still apply.
postman simulation run postman/simulations/rxcode-push.sim.yaml --port 4917 --output ndjson
RXCODE_FCM_TEST_URL=http://127.0.0.1:4917/fcm bunx vitest run lib/services/notification-channels/rxcode-push.test.tsTest endpoint overrides are ignored outside NODE_ENV=test. No live push is sent by the tests.
Open Notifications → Mobile devices to view account-owned registrations, their provider/platform, environment, device ID, and last registration update. The schema stores no first-registration timestamp. Refresh reloads registrations after the mobile app signs in or rotates its token. Disconnect requires a confirmation dialog and removes only the current account's registration; the app may register again on sign-in or a token update. Action progress and results use top-right overlays.
The send dialog shares the device list and lets the user select a device by name, provider, and environment. Push tokens are never returned to the browser. The iOS integration registers with PUT after account sign-in/token updates and deletes its UUID before sign-out. Plain source: "flowcy" notifications open the mobile Notifications root; no project/task/story routing fields are added here.