We build Flutter apps against InsForge tenant backends using the pure-Dart insforge
package (deliberately chosen over insforge_flutter so we can control session storage
ourselves via the injectable SessionStorage interface). The backend's realtime
feature is already provisioned server-side for our tenants (channel patterns such as
authz_user:% with realtime.publish triggers, RLS-governed channel access).
Gap
- The TypeScript SDK (
@insforge/sdk) and the Kotlin SDK both expose a realtime
module: connect, subscribe, publish, on, disconnect, plus presence.
- The pure-Dart package (0.1.0) has no realtime module at all.
Use case (concrete)
Postgres-changes-style authorization watch: after sign-in, a Flutter app must react
immediately when an admin changes the user's role/status (e.g., suspension) so the
session can be force-refreshed. The backend publishes those events on the per-user
channel authz_user:{userId}. Without an SDK realtime module, clients are forced to
poll the public.t_get_authz_snapshot RPC on an interval — adding latency (up to one
poll interval before a suspended user is locked out) and consuming egress budget,
which the SDK docs themselves discourage ("never poll unbounded on an interval").
Request
A realtime module in the pure-Dart package mirroring the JS/Kotlin surface:
connect/disconnect lifecycle with channel subscribe/unsubscribe.
- Event callbacks (
on) for channel messages.
- Presence snapshots and join/leave deltas, if the backend contract matches the JS SDK.
- Transparent reuse of the authenticated session (access token / refresh via the
existing AuthClient + SessionStorage wiring), so realtime works both for
anonymous and authenticated channels.
- Keep it consistent with the existing package style (dio-based HTTP client,
injectable seams), so it remains usable without insforge_flutter.
Alternatives (non-preferred)
- Raw WebSocket integration per app duplicates SDK responsibilities (auth headers,
reconnect/backoff, channel protocol) and drifts from the platform contract as it
evolves.
We build Flutter apps against InsForge tenant backends using the pure-Dart
insforgepackage (deliberately chosen over
insforge_flutterso we can control session storageourselves via the injectable
SessionStorageinterface). The backend's realtimefeature is already provisioned server-side for our tenants (channel patterns such as
authz_user:%withrealtime.publishtriggers, RLS-governed channel access).Gap
@insforge/sdk) and the Kotlin SDK both expose a realtimemodule:
connect,subscribe,publish,on,disconnect, plus presence.Use case (concrete)
Postgres-changes-style authorization watch: after sign-in, a Flutter app must react
immediately when an admin changes the user's role/status (e.g., suspension) so the
session can be force-refreshed. The backend publishes those events on the per-user
channel
authz_user:{userId}. Without an SDK realtime module, clients are forced topoll the
public.t_get_authz_snapshotRPC on an interval — adding latency (up to onepoll interval before a suspended user is locked out) and consuming egress budget,
which the SDK docs themselves discourage ("never poll unbounded on an interval").
Request
A realtime module in the pure-Dart package mirroring the JS/Kotlin surface:
connect/disconnectlifecycle with channelsubscribe/unsubscribe.on) for channel messages.existing
AuthClient+SessionStoragewiring), so realtime works both foranonymous and authenticated channels.
injectable seams), so it remains usable without
insforge_flutter.Alternatives (non-preferred)
reconnect/backoff, channel protocol) and drifts from the platform contract as it
evolves.