Skip to main content
Shipnative includes ready-to-use hooks for common realtime patterns like chat, presence tracking, and live updates.

Backend Comparison


Quick Start


Chat with Supabase

useRealtimeMessages

Full-featured chat hook with typing indicators.

useRealtimePresence

Track online users with status indicators.

useRealtimeSubscription

Generic hook for subscribing to any table changes.

Chat with Convex

With Convex, queries are automatically reactive - no manual subscription setup needed.

Messages Query

Using in Components

Presence with Convex

The boilerplate includes ready-to-use presence functions in convex/realtime.ts:

Presence Functions

Custom Presence State

Store any data with your presence:

Broadcast with Convex

Send ephemeral messages to channel subscribers:

Broadcast Functions

Auto-Cleanup: Broadcast messages expire after 30 seconds and are automatically cleaned up by a cron job. This keeps your database lean for ephemeral data like cursor positions.

Database Setup

Messages Table

Enable Realtime

In Supabase Dashboard:
  1. Go to DatabaseReplication
  2. Under “Realtime”, enable for your tables
  3. Or run: ALTER PUBLICATION supabase_realtime ADD TABLE your_table;

Mock Mode

All realtime hooks work in mock mode for development without backend credentials:
  • Messages are stored locally and persist during the session
  • Presence shows the current user as online
  • Subscriptions simulate connected state
Testing Tip: Use mock mode to build and test your UI before connecting to a real backend.

TypeScript Types

Import types for your realtime data:
See apps/app/app/types/realtime.ts for all available types.