Realtime & mobile apps
Sync live queries, presence and files across web and mobile.
Hand server-rendered data to live React hooks, share cursors and presence on any record and upload media straight from React, React Native and Flutter.
Read the Next.js guide- Replaces
- Pusher / Ably pub-sub servers
- Liveblocks presence infra
- Custom WebSocket fan-out
- Separate media upload backend
SSR to live patches
Server-rendered screens stay live in the browser.
Render initial rows in a Next.js Server Component and pass the session bookmark to generated React hooks. Subsequent commits stream row diffs to the browser without a loading flash or missed write.
Next.js and React'use client'import { useListBoardCards } from '@/napalm/hooks'import type { RowOf } from '@/napalm/live' export function BoardClient({ initialRows,}: { initialRows: readonly RowOf<'listBoardCards'>[]}) { const { rows } = useListBoardCards() return <KanbanColumns cards={rows ?? initialRows} />}Collaborative presence
Share cursors and room rosters on any record.
usePresence joins a record’s room on the live stream and broadcasts cursors and peer state in memory. useWatchedRooms tracks viewer counts across a list of records.
import { usePresence } from 'napalm-client/react' export function CardPresence({ cardId }: { cardId: string }) { const { people, update } = usePresence(cardId, { state: { status: 'viewing' }, }) return <AvatarStack people={people} onMove={(xy) => update({ xy })} />}Fractional ordering
Drag-and-drop moves touch one row.
Store a float64 sort key on cards or tasks. Dragging a card between columns updates one row and sends a single diff to open tabs and phones.
# Reorder or move a Kanban card without rewriting sibling rowsupdate BoardCardfilter .id = <uuid>$cardset { column_key := <str>$column_key, sort_key := <float64>$sort_key,}Web and mobile SDKs
Generate typed SDKs for TypeScript, React Native and Flutter.
One query folder generates TypeScript hooks for Next.js and Expo and typed Dart streams for Flutter. Web and mobile clients stay in sync as the schema evolves.
Flutter and mobilenapalm queries push studionapalm generate studio --deployed --lang ts -o src/napalmnapalm generate studio --deployed --lang dart -o lib/napalmNative sign-in
Store passkey and OAuth sessions in Keychain and Keystore.
Users sign in through native passkeys, magic-link codes or browser OAuth PKCE. NapalmClient renews tokens from device storage and reconnects live streams when the app returns to the foreground.
final signIn = SignIn(address, store: KeychainStore(secureStorage));final napalm = NapalmClient(address, signIn: signIn); await signIn.withPasskey(email);Direct media uploads
Upload camera media directly and serve files from the edge.
Phones upload multipart photos and videos straight to object storage and report byte progress. Napalm verifies the file format and serves downloads from the edge. Every month includes 500 GB of downloads.
$0.04 / GBedge media delivery to web and mobile clients