roomful 0.1.0-alpha.10
roomful: ^0.1.0-alpha.10 copied to clipboard
Open-source, self-hostable realtime collaboration for Dart and Flutter apps — presence, live cursors, comments, locks, shared state, session replay, and AI agents.
roomful (Dart) — alpha #
Open-source, self-hostable realtime collaboration for Dart and Flutter apps — the pure-Dart
core client. The Flutter widgets/overlays layer is the separate roomful_flutter package.
Status:
v2.1-alpha(EP-11). Feature-complete — implements the Roomful Protocol v2 with capabilities, session negotiation, the versioned envelope, JSON and MessagePack codecs (validated against shared protocol fixtures), the relay control protocol, aRoomfulClientroom lifecycle (join, peer registry, message relay, WebSocket transport, opt-in auto-reconnect), and the room primitives — presence, cursors, events, last-write-wins shared state, and advisory locks. pub.flutter-io.cn publication pending.
What works today #
ProtocolCapabilities+negotiateSession(...)— the exact v1..v2 / json↔msgpack negotiation from@roomful/core.WireMessage,encodeJsonEnvelope,decodeJsonEnvelope— the legacy v1 and modern v2 JSON envelopes.- The relay control protocol —
buildRelayJoin/buildRelayTransport/parseRelayServerFrame. RoomfulClient— connect and join a relay room, track peers, and relay messages over an injected transport.WebSocketRelayTransport— aRoomfulTransportover a WebSocket relay (or the Cloudflare edge relay).EventEngine— fire-and-forget room events (emit/on).PresenceEngine— live presence, cleaned up when peers leave and re-announced to newcomers.SharedStateEngine— last-write-wins shared state that converges across peers.CursorsEngine— live multiplayer cursors, cleared when peers leave.LocksEngine— advisory distributed locks with deterministic earliest-claim resolution.
Run the example:
dart run example/roomful_example.dart
Conformance #
The protocol is validated against the shared cross-SDK vectors that the TypeScript
@roomful/core generates (protocol-fixtures/core-vectors.json), so the Dart and JS SDKs share one
contract (release gate G2):
dart test
The vectors cover negotiation, both envelope versions, and both the JSON and MessagePack codecs.
Roadmap #
See the Roomful roadmap and the
v2 → v3 backlog — EP-11 (this package) and EP-12
(roomful_flutter).