Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MessageNexus Monorepo

A unified, type-safe cross-context message communication library supporting multiple transport protocols.

Monorepo Structure

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.

Quick Start

Install Dependencies

pnpm install

Development

Start the Vue3 example application:

pnpm dev

Start the WebSocket test server:

pnpm dev:ws

Build

Build all packages:

pnpm build

Build only core libraries (message-nexus & task-scheduler):

pnpm build:deps

Test

Run message-nexus tests (watch mode):

pnpm test

Run message-nexus tests (single run):

pnpm test:run

Run task-scheduler tests:

pnpm test:task-scheduler

Maintenance

# Type check core library
pnpm type-check

# Format code across all packages
pnpm lint

# Clean all build artifacts and node_modules
pnpm clean

Features

message-nexus

  • 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.

task-scheduler

  • 3D Optimization: Designed specifically for Three.js frame-budget management.
  • Smart Scheduling: Prioritize and throttle tasks to maintain high FPS.

Publish Process

We use Changesets for versioning and publishing.

1. Generate Changeset

pnpm changeset

Follow prompts to select packages and set the version bump level.

2. Update Versions

pnpm version-packages

3. Build & Publish

pnpm release

License

MIT

About

A unified, type-safe cross-context message communication library supporting multiple transport protocols.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages