Skip to Content
Miniup Live
On this page

Miniup Live

Miniup Live adds rooms, presence, chat and shared pointers to a Miniup website. Multiplayer apps additionally connect their actual state to the Live SDK or an official component. Live is introduced through a controlled rollout; a published page is not proof that Live is enabled.

Enable and invite

An owner or administrator opens the site’s settings, enables Miniup Live, and saves. Open the published site, click Live, start a room and use Invite or Copy invitation. Guests can join when allowed. Passwords and site membership still apply to every participant.

Use Dashboard → Create interactive app for Chess, Whiteboard or Poll. Each template publishes ordinary static HTML using the same Miniup publishing system. After activation, Chess offers Play with friend. Invitations preserve the page path and identify an independent room.

SDK 1.0.0

The browser SDK needs no npm, build step, backend server or published credential. Import it from the published site’s own origin:

<pre id="room-state" aria-live="polite"></pre> <script type="module"> import { live, version } from '/api/live/v1/sdk.js'; const room = await live.connect({ nickname: 'Alex' }); const stop = room.on('state', snapshot => { document.getElementById('room-state').textContent = JSON.stringify(snapshot.state); }); room.on('participants', people => console.log('Participants', people)); room.on('connection', status => console.log('Connection', status)); room.on('error', error => console.error(error.message)); room.emit('app:highlight', { item: 'north' }); // Custom workspace mode only: await room.set('title', 'Shared plan'); await room.document('shape_1', { x: 0.5 }, 0); // stop(); room.disconnect(); </script>

live.connect({roomId?, nickname?, name?, spectator?, minutes?}) creates or joins a room. Omitting roomId uses the invitation in the URL. Explicit roomId: null creates a fresh room. minutes is 0, 5, 10 or 15 for Chess. live.current returns the shared client. live.version and the exported version identify SDK 1.0.0. The /api/live/v1/ path preserves the compatible v1 API; future incompatible SDKs require another major path.

on(event, callback) returns an unsubscribe function. State and participant subscriptions receive the latest available snapshot. presence remains a compatible alias for participants. invitation() returns a sharing URL. disconnect() cleans up the transport, lease renewal and browser listeners.

TypeScript declarations  and machine-readable capabilities  describe the actual implementation. On a published site, its own /api/live/capabilities reports rollout availability for that site. This discovery does not grant access.

Four different data paths

PathPurpose
emit('pointer', {x,y}) or emit('app:name', payload)Throttled transient notifications. Not stored or restored. Pointer coordinates are normalized to the viewport.
set(key, value)Bounded persistent custom workspace state. Stale updates are rejected.
document(key, value, expectedVersion, remove?)Version-checked structured object operations with deletion tombstones. Applications reconcile conflicts; this is not a rich-text CRDT.
action(name, payload)A supported trusted action, validated by the authoritative server. Browser-provided rules cannot run on the server.

state delivers the complete room snapshot, including state, documents, participants, chat, board, chess, poll, revision and serverTime. Avoid treating the whole snapshot as your custom application data.

The client reconnects with the same identity and restores the authoritative snapshot. Pending retries retain their action IDs. Handle revision_conflict by showing the restored state before retrying the user’s intent. An action timeout has an unknown outcome; inspect the restored state rather than blindly repeating the intent.

Official components

Select the matching component in Live settings, then use ordinary HTML:

<miniup-chess multiplayer></miniup-chess> <script type="module" src="/api/live/v1/components.js"></script>

Replace the element with <miniup-whiteboard></miniup-whiteboard> or <miniup-poll></miniup-poll> for those experiences. No backend URL or credential belongs in the markup.

  • Chess: authoritative chess.js rules, player seats, spectators, promotion selection, castling, en passant, checkmate/draw outcomes, resignation, optional server clocks, move history and mutual rematches. Refresh does not reset a clock. Casual play is supported; tournament arbitration and rare FIDE dead-position adjudication are outside this release.
  • Whiteboard: concurrent normalized stroke operations, transient drawing previews, colors, widths and refresh recovery. Only the host clears the board. A clear operation rejects late strokes from the old canvas epoch.
  • Poll: host-controlled questions, 2–8 choices, one vote per room identity and server-computed counts. Guest cookies are not strong identity verification against determined repeat voting.

Custom turn-based games need a trusted platform rules implementation. Selecting Turn-Based Game alone does not supply game rules. Ordinary universal rooms only synchronize presence, chat and pointers.

Safety and limits

Rooms belong to one site. Invitations cannot unlock a protected website. Hosts can rename or end rooms and remove participants. Removed game players cannot reconnect to that room. A second tab using the same identity replaces the first connection.

Initial limits include 5 active rooms/site, 8 participants by default (configurable up to 16), a 256 KiB room state cap, 30 inbound messages/participant/second, 500-character chat messages and 30-minute idle/24-hour maximum retention. No cursor movement is written to the database. The host or platform may disable Live.

SDK source, guest identity cookies and invitations contain no account, Function or dataset secrets. Short-lived connection grants are issued only through the site’s authorized platform endpoint.

Publish a site · Site access · Examples

Live · rooms · multiplayer · chess · whiteboard · poll · SDK