sammy-boy/realtime-core

Reusable realtime broadcasting infrastructure for Laravel microservices
1,116
Install
composer require sammy-boy/realtime-core
Latest Version:v1.0.2
PHP:^8.4
Laravel:11 · 12 · 13
License:MIT
Last Updated:Jul 3, 2026
Links: GitHub  ·  Packagist
Maintainer: sammy-boy

README — sammy-boy/realtime-core

Repository:
https://github.com/sammy-boy/realtime-core


# SammyBoy Realtime Core

Lightweight real-time broadcasting infrastructure for Laravel microservices.

Uses Redis Pub/Sub to communicate with WebSocket servers.

Designed to integrate seamlessly with SammyBoy EventBus Core.

---

## Features

- Redis-based broadcasting
- Microservice-safe channel namespacing
- Minimal dependencies
- Compatible with Laravel Echo
- Production-ready logging
- Failure-safe publishing

---

## Installation

```bash
composer require sammy-boy/realtime-core

Broadcasting Events

use SammyBoy\Realtime\WebSocketBroadcaster;

$broadcaster->broadcast(
    eventName: 'tenant.registration.completed',
    data: [
        'auth_user_id' => 12,
        'status' => 'success',
    ],
    channel: 'job.1234'
);

Published to Redis channel:

laravel_database_job.1234

Expected WebSocket Setup

Your WebSocket server should:

  • Listen to Redis channels
  • Forward payloads to connected clients
  • Support channel-based subscription

Example payload:

{
  "event": "tenant.registration.completed",
  "data": {
    "auth_user_id": 12,
    "status": "success"
  }
}

Architecture Philosophy

Simple. Focused. Infrastructure-only.

No opinion about:

  • Frontend framework
  • WebSocket server implementation
  • Channel naming convention

Only provides:

  • Safe publishing
  • Structured payload
  • Logging

License

MIT


Author

Sammy Orondo https://github.com/sammy-boy

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
v1.0.2 ^8.4 ^11.0|^12.0|^13.0 MIT
v1.0.1 ^8.4 ^11.0|^12.0 MIT
v1.0.0 ^8.4 ^11.0|^12.0 MIT