@bhoomash/syncraft-server
v0.1.0
Published
WebSocket synchronization relay server and room manager for Syncraft
Maintainers
Readme
@bhoomash/syncraft-server
WebSocket synchronization relay server and room manager for Syncraft.
Installation
npm install @bhoomash/syncraft-serverFeatures
- 🚪 Multi-Room Relay: Isolated peer synchronization rooms.
- ⚡ Zero-Conflict Server: Server operates as an authenticated ordered relay, forwarding immutable CRDT operations.
- 🛡️ Schema Validation: Validates all incoming packets and CRDT operation structures.
- 📜 Historical Sync Replay: Synchronizes room history to newly joined and reconnected peers.
- 💓 Heartbeat Health Checks: Cleans up disconnected zombie sockets automatically.
Quick Start
import { createSyncServer } from '@bhoomash/syncraft-server';
const server = createSyncServer({
port: 8080,
heartbeatInterval: 30000,
});
console.log(`Sync server listening on ws://localhost:${server.getPort()}`);
// Programmatic shutdown
// await server.close();License
MIT © Bhoomash
