Skip to content

moe-charm/voidcore.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

345 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŸ VoidCore.js v14.0 - Pure Message System

ใ€Œใ™ในใฆใฎๅญ˜ๅœจใฏใ€ใƒกใƒƒใ‚ปใƒผใ‚ธใง็”Ÿใพใ‚Œใ€ใƒกใƒƒใ‚ปใƒผใ‚ธใง็ต‚ใ‚ใ‚‹ใ€
ใ‚ปใƒชใƒณใฎๅคงๆ”น้ฉๅฎŒไบ† - ๅŸบๅบ•ใ‚ฏใƒฉใ‚น็ถ™ๆ‰ฟๅฎŒๅ…จๆŽ’้™ค๏ผ

Latest: v14.0 - Pure Message System ๐Ÿš€

GitHub Pages JavaScript MIT License


๐ŸŽฏ What is VoidCore?

VoidCore is a pure message-based system that enables beautiful plugin communication without inheritance. Think of it as a "postal service" for your application:

  • ๐Ÿ›๏ธ VoidCore = Postal office that routes messages
  • ๐Ÿค– Plugins = Customers who send and receive mail
  • ๐Ÿ“ฎ Messages = Letters with specific types (Notice, Request, Response, Proposal)
  • ๐Ÿ“‹ Subscribe = Write on bulletin board "I want this type of mail"

๐Ÿ“ฎ Try It Now - Super Beginner Friendly!

New to VoidCore? Start with our interactive demo:

๐ŸŽฏ ๐Ÿ“ฎ Simple VoidCore Demo!

Watch plugins talk to each other in real-time! See exactly which functions are called and how messages flow through the system.


๐Ÿš€ Quick Start

Installation

git clone https://github.com/moe-charm/voidcore.js
cd voidcore-js
# Open examples/index.html in your browser - no build required!

Basic Usage (v14.0 Pure System)

import { voidCore, Message, createPlugin } from './src/index.js'

// Create a plugin (no inheritance!)
const myPlugin = createPlugin({
  pluginId: 'my-awesome-plugin',
  autoHealth: true
}, {
  async run() {
    await this.initialize();
    
    // Listen for messages
    this.on('Notice', 'user.login', (msg) => {
      console.log('User logged in:', msg.payload.userId);
    });
    
    // Send messages
    await this.notice('plugin.ready', {
      timestamp: Date.now()
    });
  }
});

// Start the plugin
await myPlugin.run();

๐ŸŒŸ Serin's Great Reform (v14.0)

โœ… What Changed

  • โŒ Base Class Inheritance โ†’ โœ… Pure Composition
  • โŒ Forced Lifecycle โ†’ โœ… Optional Methods
  • โŒ Type Constraints โ†’ โœ… Message-based Cooperation
  • โŒ Complex Code โ†’ โœ… "Pleasant from the Start" Code

๐ŸŽญ Before vs After

Before (Inheritance Hell):

class MyPlugin extends AutonomousPlugin {
  constructor() {
    super('my-plugin');  // Required base class
  }
  
  async _prepare() { /* Forced implementation */ }
  async _work() { /* Forced lifecycle */ }
}

After (Pure Beauty):

const myPlugin = createPlugin({
  pluginId: 'my-plugin'
}, {
  // Complete freedom - implement what you need
  async run() {
    await this.initialize();  // Optional
    // Your logic here
  }
});

๐Ÿ“ฌ Message Types

VoidCore uses four clear message types for all communication:

1. Notice - "Something happened" (1-to-many)

await plugin.notice('user.login', {
  userId: 123,
  timestamp: Date.now()
});

2. IntentRequest - "Please do X" (1-to-1)

const request = Message.intentRequest('file_manager', 'file.open', {
  path: '/documents/readme.txt'
});
await voidCore.publish(request);

3. IntentResponse - "X completed" (1-to-1)

const response = Message.intentResponse('file.open', {
  status: 'success',
  content: 'File content here...'
});

4. Proposal - "Shall we do X?" (1-to-1, non-forceful)

await plugin.propose('backup_manager', 'system.backup', {
  action: 'Create daily backup',
  estimatedTime: 30000
});

๐ŸŽฎ Live Demos

Experience VoidCore in action:

๐ŸŽฏ For Beginners

๐Ÿš€ Advanced Examples


๐Ÿค Gentleman's Agreement System

VoidCore v14.0 uses optional protocols instead of forced inheritance:

๐Ÿ’Š Health Check Protocol

// Plugins can optionally respond to health checks
registerHealthCheck('my-plugin', {
  customStatus: 'All systems operational'
});

// Send health check request
await voidCore.publish(Message.intentRequest('*', 'core.health.ping', {}));

๐Ÿง  Process Declaration

// Plugins can declare their process info
declareProcess('my-plugin', {
  name: 'My Awesome Plugin',
  version: '1.0.0'
});

๐Ÿ”Œ Transport Adapters (Heart Transplant)

Built-in Transports

DefaultTransport - Local memory (automatic)

// No setup needed - works out of the box

WebSocketTransport - Real-time networking

import { WebSocketTransport } from './src/transport.js'
await voidCore.setTransport(new WebSocketTransport('ws://server.com'))

BroadcastChannelTransport - Inter-tab communication

import { BroadcastChannelTransport } from './src/transport.js'
await voidCore.setTransport(new BroadcastChannelTransport('my-app'))

Custom Transport

export class MyTransport extends ITransport {
  async initialize() { /* Setup */ }
  async send(message, channel) { /* Send logic */ }
  subscribe(handler, channel) { /* Subscribe logic */ }
  getStats() { /* Statistics */ }
  async destroy() { /* Cleanup */ }
}

๐ŸŒŸ Evolution Timeline

Version Feature Philosophy
v14.0 ๐Ÿš€ Pure Message System "All existence is born from messages and ends with messages"
v13.0 ๐Ÿ’“ Transport Adapters Heart-swappable communication layers
v12.0 ๐Ÿš€ Multi-Channel Performance boost with message separation
v11.0 ๐Ÿค– Autonomous Core Plugin lifecycle and message routing

๐Ÿ—๏ธ Project Structure

voidcore-js/
โ”œโ”€โ”€ src/                         # Core library (v14.0)
โ”‚   โ”œโ”€โ”€ index.js                # New entry point
โ”‚   โ”œโ”€โ”€ pure_plugin_system.js   # Serin's Great Reform
โ”‚   โ”œโ”€โ”€ voidcore.js             # "The Vessel of Silence"
โ”‚   โ”œโ”€โ”€ message.js              # Message types
โ”‚   โ”œโ”€โ”€ transport.js            # Transport adapters
โ”‚   โ”œโ”€โ”€ channel-manager.js      # Channel management
โ”‚   โ””โ”€โ”€ legacy/                 # v13.0 compatibility
โ”œโ”€โ”€ examples/                    # v14.0 demos
โ”‚   โ”œโ”€โ”€ voidcore-demo-visual.html  # Beginner-friendly
โ”‚   โ”œโ”€โ”€ message-city-modern.html   # Pure system demo
โ”‚   โ””โ”€โ”€ legacy/                 # Previous examples
โ”œโ”€โ”€ challenge/                   # Interactive demos
โ”œโ”€โ”€ docs/                       # Documentation
โ””โ”€โ”€ VOIDCORE_V14_CPP_SPEC.md    # C++ implementation spec

๐Ÿค– AI-Powered Development

Get started in 3 simple steps:

  1. Clone: git clone https://github.com/moe-charm/voidcore.js
  2. Open: Load examples in your browser
  3. Build: Tell Claude Code to read the docs and "build [your app] with VoidCore"

๐Ÿ“š Documentation

v14.0 Pure System

Legacy Documentation


๐ŸŽฏ Core Philosophy

VoidCore embodies the principle of "้™ๅฏ‚ใฎๅ™จ" (The Vessel of Silence):

  1. ๐Ÿค Silent Routing - Core knows nothing about message content, only types
  2. ๐Ÿ•Š๏ธ Non-Invasive - No forced inheritance, pure composition
  3. ๐Ÿค Gentleman's Agreement - Optional protocols, maximum freedom
  4. ๐Ÿ’ซ Pure Beauty - "Pleasant from the start" code

The VoidCore Way

// โŒ Don't fight the system
class MyPlugin extends BaseClass {
  // Complex inheritance hierarchy
}

// โœ… Flow with the messages
const myPlugin = createPlugin(config, {
  // Pure, beautiful, simple
});

โœจ Key Features

  • ๐Ÿง  VoidIDE Genesis v2.0 - Complete IDE with real-time analytics & visualization (v14.0 Phase 2)
  • ๐ŸŒŠ Message Flow Visualization - Real-time message flow with animated particle effects
  • ๐Ÿ“Š Plugin Monitor Dashboard - Advanced plugin status monitoring & health checks
  • โšก Performance Metrics System - Comprehensive performance analysis & optimization
  • ๐ŸŒŸ VoidIDE Genesis - Self-creating IDE that runs on VoidCore itself (v14.0)
  • ๐Ÿš€ Pure Message System - No inheritance, pure composition (v14.0)
  • ๐Ÿงฉ CoreFusion v1.2 - Merge multiple VoidCore instances seamlessly (v14.0)
  • โšก SimpleMessagePool - 16-20x faster batch processing (v14.0)
  • ๐Ÿ’“ Heart Transplant - Swap transport layers at runtime (v13.0)
  • ๐Ÿš€ Multi-Channel Performance - 40% faster with dedicated channels (v12.0)
  • ๐Ÿ”„ Perfect Backward Compatibility - All versions work together
  • ๐ŸŒ Browser-Native - Pure JavaScript, no build tools
  • ๐Ÿ“ฆ Zero Dependencies - Lightweight and self-contained
  • ๐Ÿค Gentleman's Agreement - Optional protocols, maximum freedom

๐Ÿค Contributing

VoidCore thrives on community contributions:

  1. Fork the repository
  2. Try the ๐Ÿ“ฎ Simple VoidCore Demo first
  3. Create your feature branch
  4. Add tests and documentation
  5. Submit a pull request

๐ŸŒ Language Versions

  • ๐ŸŸข JavaScript - Current (v14.0 - Production Ready)
  • ๐Ÿšง C++ - In Development (Specification ready)

๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐Ÿ’– Philosophy in Action

"ๅ“ฒๅญฆ็š„ใซ่žใ“ใˆใ‚‹ใ‹ใ‚‚ใ—ใ‚Œใพใ›ใ‚“ใŒใ€ๅฎŸ็”จๆ€งใ‚’ๅพนๅบ•่ฟฝๆฑ‚ใ—ใŸ็ตๆžœใงใ™๏ผ"

Beautiful simplicity, infinite scalability, autonomous dignity.

The Journey

  • v11.0: Birth of autonomous plugins
  • v12.0: Performance breakthrough
  • v13.0: Heart transplant revolution
  • v14.0: Serin's Great Reform - Pure perfection achieved

๐ŸŽ‰ What's Next?

JavaScript Version: Stable and production-ready C++ Version: Next frontier for ultimate performance

โญ Star this repo if VoidCore sparked joy in your development workflow!


Ready to experience the beauty of pure message-based architecture?
๐Ÿš€ Start with the Simple Demo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages