Prerequisites
Before installing kSync v0.2, make sure you have:Node.js 18+
kSync v0.2 requires Node.js 18 or higher for modern JavaScript features
TypeScript (Recommended)
TypeScript provides excellent IntelliSense with 50+ configuration options
Package Installation
- npm
- yarn
- pnpm
- bun
No dependencies required! kSync v0.2 works out of the box with smart defaults. Zod is optional for advanced schema validation.
Quick Start (30 seconds)
Get running instantly with factory functions:TypeScript Configuration
For the best experience with TypeScript, add these settings to yourtsconfig.json:
tsconfig.json
Environment Setup
Browser Environment
For browser applications, kSync v0.2 automatically configures optimal settings:- IndexedDB for local storage with memory fallback
- Web Locks API for tab coordination
- WebSocket for real-time sync
- Smart batching for performance
Node.js Environment
For server-side or Node.js applications:Bun Environment
kSync v0.2 is optimized for Bun and works perfectly:Factory Functions
kSync v0.2 provides optimized presets for common use cases:Development Server Setup
Option 1: Use Built-in Server
kSync v0.2 includes a production-ready WebSocket server:Option 2: Custom Server
Create your own high-performance WebSocket server:Performance Optimization
kSync v0.2 is production-ready with enterprise performance:Benchmark Results:
- π― 600k+ ops/sec with 500 concurrent clients
- π§ 2MB memory for 1000 clients + 10k events
- π Network resilient - handles 10-200ms latency
- β‘ Sub-5ms event processing with optimized batching
Production Configuration
Whatβs Next?
Quick Start Guide
Build your first real-time app in 2 minutes
Factory Functions
Learn about optimized presets for different use cases
Performance Benchmarks
See detailed performance metrics and optimization tips
API Reference
Explore all 50+ configuration options and methods
kSync v0.2: Enterprise performance with developer-friendly APIs.

