@cariosan/client
v0.2.0
Published
Cariosan realtime chat SDK — client for browsers, Node, and React Native.
Readme
@cariosan/client
The TypeScript client SDK for Cariosan — free, self-hostable realtime chat infrastructure. Works in browsers, Node.js, and React Native.
Install
npm install @cariosan/client
# or pnpm add @cariosan/client
# or yarn add @cariosan/clientQuick start
import { Cariosan } from "@cariosan/client";
const client = new Cariosan({
apiUrl: "https://your-cariosan-host.com",
token: userJwt, // mint via your backend using @cariosan/cariosan-go
});
await client.connect();
const channel = client.channel("order_123");
channel.on("message", (msg) => console.log(msg));
await channel.sendMessage({ text: "Halo" });Features
- Realtime WebSocket transport with auto-reconnect
- Presence + typing indicators
- Message history with cursor pagination
- Read markers (per-channel last-read)
- Attachment uploads via S3 presigned URLs
- 3.0 KB gzipped, no runtime dependencies beyond a
WebSocketglobal
Documentation
Full integration guide, API reference, and self-host setup at docs.cariosan.com.
License
Cariosan License v1.0 — free for any commercial or non-commercial use. May not be redistributed, reverse-engineered, or used to operate a competing managed Cariosan service. See the LICENSE file shipped in this package for full terms.
