{"id":49427,"library":"stelar-time-real","title":"stelar-time-real","description":"A lightweight, dependency-free WebSocket library for real-time communication in TypeScript/JavaScript. Version 2.0.4 provides namespaces, ACKs, binary data support, and heartbeat detection with zero dependencies (only native WebSocket). Features a server and client API similar to socket.io but much smaller (~13MB heap). Designed for use with Express, Fastify, or native HTTP servers.","status":"active","version":"2.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/foxytp/stelar-time-real","tags":["javascript","websocket","real-time","socket"," realtime","stelar","chat","webserver","typescript"],"install":[{"cmd":"npm install stelar-time-real","lang":"bash","label":"npm"},{"cmd":"yarn add stelar-time-real","lang":"bash","label":"yarn"},{"cmd":"pnpm add stelar-time-real","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Native WebSocket implementation used by both server and client (Web API in browsers, ws in Node.js)","package":"ws","optional":true}],"imports":[{"note":"Named export, not default. TypeScript types included.","wrong":"import StelarServer from 'stelar-time-real';","symbol":"StelarServer","correct":"import { StelarServer } from 'stelar-time-real';"},{"note":"ESM-only. CommonJS require will work but may cause issues with named exports.","wrong":"const { StelarClient } = require('stelar-time-real');","symbol":"StelarClient","correct":"import { StelarClient } from 'stelar-time-real';"},{"note":"No default export; all symbols named.","wrong":"import Stelar from 'stelar-time-real';","symbol":"default import","correct":"import { StelarServer, StelarClient } from 'stelar-time-real';"}],"quickstart":{"code":"import express from 'express';\nimport { StelarServer, StelarClient } from 'stelar-time-real';\n\nconst app = express();\nconst server = app.listen(3000);\n\nconst stelar = new StelarServer({ server });\n\nstelar.onConnection((client) => {\n  console.log('New client:', client.id);\n  client.emit('welcome', 'Hello! Welcome to stelar-time-real');\n});\n\nstelar.on('message', (ctx) => {\n  ctx.broadcast('message', ctx.data);\n});\n\nstelar.start();\n\n// Client side\nconst client = new StelarClient('localhost:3000');\nclient.connect();\nclient.on('welcome', (msg) => console.log(msg));","lang":"typescript","description":"Shows basic server setup with Express and client connection. Express is optional; StelarServer works with any HTTP server or standalone."},"warnings":[{"fix":"Change require() to import statements.","message":"Version 2.x drops CommonJS support. Use ESM imports.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'new StelarServer({ server: yourServer })'","message":"Constructor expects options object; passing server directly will not work.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Replace stelar.getPort() with stelar.server.address().port","message":"Method 'getPort()' marked as deprecated in v2.0.0. Use 'server.address().port' instead.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'13mb':48 '2.0.4':20 'ack':23 'api':41 'binari':24 'chat':68 'client':40 'communic':16 'data':25 'depend':8,32 'dependency-fre':7 'design':50 'detect':29 'express':54 'fastifi':55 'featur':36 'free':9 'heap':49 'heartbeat':28 'http':58 'javascript':60 'librari':11 'lightweight':6 'much':46 'namespac':22 'nativ':34,57 'provid':21 'real':4,14,63 'real-tim':13,62 'realtim':66 'server':38,59 'similar':42 'smaller':47 'socket':65 'socket.io':44 'stelar':2,67 'stelar-time-r':1 'support':26 'time':3,15,64 'typescript':70 'typescript/javascript':18 'use':52 'version':19 'webserv':69 'websocket':10,35,61 'zero':31","created_at":"2026-06-07T17:01:43.388347+00:00","updated_at":"2026-06-07T17:01:43.388347+00:00","problems":[{"fix":"Use '{ StelarServer }' in import statement.","cause":"Importing default export instead of named export.","error":"StelarServer is not a constructor"},{"fix":"Run 'npm install stelar-time-real'","cause":"Package not installed or incorrect path.","error":"Cannot find module 'stelar-time-real'"},{"fix":"Ensure emit occurs after 'connect' event.","cause":"Client not connected yet when calling emit.","error":"TypeError: Cannot read properties of undefined (reading 'emit')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/foxytp/stelar-time-real#readme","github":"https://github.com/foxytp/stelar-time-real","docs":null,"changelog":null,"pypi":null,"npm":"stelar-time-real","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}