Type-Safe Bucket API
Generic BucketAPI<T> with full TypeScript typing. CRUD operations, queries, pagination, and aggregations — all with compile-time type safety.
Type-Safe Client SDK
Fully typed WebSocket client for noex-server with automatic reconnect, subscription recovery, reactive store queries, rules engine proxy, and zero runtime dependencies.
Everything you need for type-safe real-time communication with noex-server
Generic BucketAPI<T> with full TypeScript typing. CRUD operations, queries, pagination, and aggregations — all with compile-time type safety.
Exponential backoff with jitter, configurable parameters (maxRetries, delays, multiplier). Seamless reconnection without manual intervention.
After reconnect, all store and rules subscriptions are automatically restored and fresh data is delivered. No manual resubscription needed.
Real-time push notifications for store queries and rules events. Initial data delivered immediately after subscription, then live updates on every change.
ACID multi-bucket transactions over WebSocket. Atomic operations with optimistic locking, read-your-own-writes, and automatic rollback on conflict.
Emit events, manage facts (set/get/delete/query), and subscribe to pattern-based event streams — all through the same WebSocket connection.
Login, logout, and session management via token-based auth. Auto-login on connect and reconnect when auth token is provided.
No runtime dependencies. Works in browser natively and in Node.js with the ws package. Minimal bundle footprint.
Clean separation of concerns with four distinct layers
StoreAPI, RulesAPI, AuthAPI
Registry, push delivery, resubscribe
RequestManager + PushRouter
WebSocket, heartbeat, reconnect
Lifecycle events: connected, disconnected, reconnecting, reconnected, error, welcome
Request pipeline: API call → RequestManager (id correlation + timeout) → Transport (WebSocket send) → Response routing
Real code examples showing connection, CRUD, subscriptions, transactions, and rules
import { NoexClient } from '@hamicek/noex-client';
const client = new NoexClient('ws://localhost:8080', {
auth: { token: 'my-secret-token' },
reconnect: {
maxRetries: Infinity,
initialDelayMs: 1_000,
maxDelayMs: 30_000,
backoffMultiplier: 2,
jitterMs: 500,
},
requestTimeoutMs: 10_000,
connectTimeoutMs: 5_000,
heartbeat: true,
});
const info = await client.connect();
console.log(`Connected to v${info.version}`);
client.on('reconnecting', (attempt) => {
console.log(`Reconnecting... attempt ${attempt}`);
});
client.on('reconnected', () => {
console.log('Connection restored!');
});
// Graceful disconnect
await client.disconnect();Automatic reconnection with exponential backoff, jitter, and full subscription recovery
Maximum reconnect attempts
Base delay before first retry
Maximum delay cap
Exponential multiplier
Random jitter added to delay
Disable reconnect with reconnect: false
noex-client vs popular real-time client SDKs
| Feature | noex-client | Socket.IO Client | Supabase JS | Firebase JS | Ably Realtime |
|---|---|---|---|---|---|
| Type-Safe Generic API | BucketAPI<T> | — | Generated types | Untyped | — |
| Auto Subscription Recovery | ✓ | — | — | ✓ | ✓ |
| ACID Transactions | Multi-bucket over WS | — | Postgres transactions | — | — |
| Rules Engine Proxy | ✓ | — | — | — | — |
| Reconnect with Backoff | ✓ | ✓ | ✓ | ✓ | ✓ |
| Auto-login on Reconnect | ✓ | — | — | ✓ | — |
| Reactive Query Subscriptions | Convex-style push | Manual rooms | Postgres changes | Realtime sync | Pub/sub |
| Facts Management | Set/get/delete/query | — | — | — | — |
| Runtime Dependencies | Zero | engine.io-client + | Multiple | Multiple | Multiple |
| Browser + Node.js | ✓ | ✓ | ✓ | ✓ | ✓ |
| Status | Active | Active | Active | Active | Active |
BucketAPI<T> gives you compile-time type safety on every CRUD operation, query, and aggregation. No more runtime type mismatches.
On reconnect, all active store and rules subscriptions are automatically restored. Fresh data is delivered without any manual resubscription logic.
The only client SDK with built-in rules engine access. Emit events, manage facts, and subscribe to pattern-matched rule events over the same connection.
Multi-bucket atomic transactions with optimistic locking, sent as a single message. Read-your-own-writes and automatic rollback on conflict.
No transitive dependencies to audit or update. Works natively in browsers, and in Node.js with just the ws package as a peer dependency.
Add noex-client to your project in seconds
$ npm install @hamicek/noex-client Requires a running noex-server. In Node.js, install ws as a peer dependency.
Love noex? Help us keep building amazing tools