liwebJS is a lightweight JavaScript library for building scalable real-time applications with clean and predictable patterns.
- Centralized socket configuration
- Simple room and event management
- Minimal abstraction over # ⚡ LiWebJS
LiWebJS is a protocol-first, room-based realtime framework for the web.
It provides a clean core for building realtime systems by separating:
- transport (protocol)
- connection lifecycle
- event orchestration
LiWebJS is designed to give developers full control over realtime connections, without being locked into a specific transport or framework.
Early Development (Core Stable)
Current focus:
- Core server
- Manual WebSocket upgrade handling
- Adapter-based protocol architecture
- Strict TypeScript safety
Higher-level features (rooms, state, presence) are coming next.
- Protocol-first architecture
- Manual connection control
- Adapter-based design
- Strict TypeScript
Server: npm install liwebjs
Client (coming soon): npm install liwebjs-client
HTTP Server | |-- upgrade (manual) | Protocol Adapter (ws) | LiWeb Core
- connection lifecycle
- event system
- metadata handling
import http from "http"; import { createLiWebServer } from "liwebjs";
const server = http.createServer(); const liweb = createLiWebServer(server);
liweb.on("connection", (ctx) => { console.log("Connected:", ctx.connection.id); });
liweb.on("disconnect", (ctx) => { console.log("Disconnected:", ctx.connection.id); });
server.listen(3000);
{ "event": "ping", "payload": { "msg": "hello" } }
Default:
- WebSocket (ws)
Future:
- uWebSockets
- custom polling
headers ip protocol
v0.1
- Core server
- WebSocket adapter
v0.2
- Event routing
- Rooms
v0.3
- State
- Presence
v0.4
- Client SDK
MIT © Sumeet Umbalkar
- No framework lock-in
🚧 Pre-alpha — API not stable yet.
- Core socket wrapper
- Core basic ws functionality(eastablish conn & basic events)
- Room utilities
- Event helpers
- Examples
- Documentation
MIT