A unified, type-safe cross-context message communication library supporting multiple transport protocols.
This project uses pnpm workspaces and contains the following packages:
packages/message-nexus: Core communication library (the main npm package).packages/task-scheduler: Performance-optimized task scheduler for Three.js 3D scenes.packages/example: Vue3 application demonstrating and validating all transport drivers.packages/server: Node.js WebSocket server for testing network communication.
pnpm installStart the Vue3 example application:
pnpm devStart the WebSocket test server:
pnpm dev:wsBuild all packages:
pnpm buildBuild only core libraries (message-nexus & task-scheduler):
pnpm build:depsRun message-nexus tests (watch mode):
pnpm testRun message-nexus tests (single run):
pnpm test:runRun task-scheduler tests:
pnpm test:task-scheduler# Type check core library
pnpm type-check
# Format code across all packages
pnpm lint
# Clean all build artifacts and node_modules
pnpm clean- Multi-Protocol: Unified API for Mitt, PostMessage, BroadcastChannel, and WebSocket.
- JSON-RPC 2.0: Standardized communication protocol.
- Type Safety: End-to-end TypeScript support.
- Reliability: Auto-reconnect, message queuing, and retry mechanisms.
- Monitoring: Built-in metrics and structured logging.
- 3D Optimization: Designed specifically for Three.js frame-budget management.
- Smart Scheduling: Prioritize and throttle tasks to maintain high FPS.
We use Changesets for versioning and publishing.
pnpm changesetFollow prompts to select packages and set the version bump level.
pnpm version-packagespnpm releaseMIT