stelar-time-real is a production-grade real-time communication library built entirely from scratch for Node.js. It implements its own WebSocket protocol (RFC 6455) and a custom binary TCP protocol using only Node.js built-in modules —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/foxytp/stelar-time-real/llms.txt
Use this file to discover all available pages before exploring further.
http, net, crypto, tls, and zlib. No ws package, no engine.io, no external dependencies of any kind. Every byte that travels across the network is controlled by the library, giving you total predictability, zero supply-chain risk, and no breaking changes from third-party updates.
Key Features
Zero Dependencies
dependencies: {}. No external packages — pure Node.js built-ins only. Instant installation, no vulnerability surface from third-party code.Dual Protocol
WebSocket (RFC 6455) for browsers and a custom binary TCP protocol for Node.js microservices run simultaneously on separate ports, sharing all server logic.
Rate Limiting
Token-bucket rate limiter per client, per event, or per IP address. Swap it out entirely with a custom
IRateLimiter (Redis, MongoDB, etc.).Rooms
Clients join named rooms and receive targeted broadcasts. Rooms are cleaned up automatically when the last member disconnects.
ACK System
Request-response over real-time with
onAck / client.request(). Configurable timeout, Promise-based, works on both WebSocket and TCP.TLS / SSL
Native
wss:// and TCP over TLS. Pass tls: { key, cert } to StelarServer — no extra setup needed.Health Check
Built-in
/health HTTP endpoint returns live stats (connections, messages, rooms, memory, uptime). Compatible with Kubernetes, Docker, and load balancers.TypeScript Support
Written in TypeScript with bundled
.d.ts declarations. No @types/* package required.Use Cases
stelar-time-real is designed for workloads where latency, predictability, and production reliability matter:- Real-time chat — messaging, notifications, typing indicators, presence
- Collaborative applications — shared editors, whiteboards, live documents
- Internal microservices — ultra-low-latency server-to-server communication via the binary TCP protocol
- Live dashboards — metrics, monitoring, trading feeds, analytics
- Multiplayer games — low-overhead binary frames, room-based fan-out
- IoT and connected devices — lightweight TCP binary protocol reduces overhead on constrained devices
- Social platforms — Discord-style channels, direct messages, broadcast notifications
Zero Runtime Dependencies
stelar-time-real has zero runtime dependencies. The
dependencies field in package.json is intentionally empty. This means no third-party vulnerabilities, no supply-chain attacks, no breaking changes from upstream packages, and a minimal footprint in node_modules. Installing the package takes milliseconds.Performance
Benchmarked under a stress test with 50 WebSocket + 20 TCP clients running simultaneously:| Metric | Value |
|---|---|
| Simultaneous connections | 70 |
| RAM per connected client | ~58 KB |
| Throughput | 3,425 msg/sec |
| Stable heap | ~10 MB |
| Memory leaks detected | None |
| MaxListeners warnings | 0 |
Ready to get started? Head to the Quickstart to have a working server and client running in minutes.
