Start

Use the engine

Call createGozWire from @gozwire/core. Identities, conversations, send, history, and start.

@gozwire/core is the only npm package required to use the engine. The demo and moderation sidecar are repository applications.

import { createGozWire, defaultConfig } from "@gozwire/core";

const gozwire = await createGozWire({ config: defaultConfig() });
await gozwire.start();

await gozwire.identities.upsert({ id: "user-a", displayName: "Ada" });
await gozwire.identities.upsert({ id: "user-b", displayName: "Bob" });

const conversation = await gozwire.conversations.createDirect({
  creatorId: "user-a",
  userIds: ["user-a", "user-b"],
});

await gozwire.messages.send({
  conversationId: conversation.id,
  senderId: "user-a",
  clientMessageId: crypto.randomUUID(),
  type: "text",
  body: "Hello",
});

start() runs migrations and workers. stop() drains workers, including the push adapter so APNs HTTP/2 sessions close.

What you call

Typical surfaces on the engine object:

  • identities : upsert referenced users and profile-picture upload
  • conversations : createDirect, createGroup, createChannel, createForum, list, get, participants, retention policy
  • messages : send, history, thread, sync, edit, delete, receipts
  • reactions : add, remove, list
  • media : create upload sessions and download URLs
  • moderation : list, get, preview, resolve (when enabled)
  • push : installations, preferences, mutes (when you opt in)
  • health / metrics / config

Authorization is against participant records. Rate limits are engine primitives (per user, per conversation, per window, plus push register and heartbeat). They are not pricing tiers.

Hosting

Your process loads config from the environment, constructs the engine, and maps HTTP or RPC however you like. The demo uses Express only as a sample host. You can call the engine from any Node.js 20+ process.

For a UI walkthrough of the same APIs, run the local demo.