DEV Community

Cover image for Built a Laravel Realtime Framework Without Livewire, Echo, Pusher, or Reverb
Vishnu
Vishnu

Posted on

Built a Laravel Realtime Framework Without Livewire, Echo, Pusher, or Reverb

I've been working on a project called KAAL Realtime, and I'd love some feedback from the Laravel community.

The idea started with a simple question:

«Why do we need events, channels, Echo, frontend listeners, and a lot of wiring just to update a small section of a Blade page?»

I wanted something that felt native to Laravel.

So I built a package where you wrap a Blade block with a directive:

@realtime([Product::class])
@foreach($products as $product)

{{ $product->name }}
@endforeach
@endrealtime

Then on the model:

use HasRealtime;

class Product extends Model
{
use HasRealtime;
}

Whenever a Product changes, every connected browser automatically refreshes only that Blade fragment.

No page reload.

No polling.

No Laravel Echo.

No Pusher.

No Reverb.

No Livewire.

Some features:

  • Automatic model-driven updates
  • Native WebSocket gateway
  • Signed fragment refreshes
  • Authentication preserved during refreshes
  • Pagination support
  • Eager loading support
  • Multiple model dependencies
  • "@preserve" directive to keep input focus and typed values
  • "@ignore" directive for Alpine components and rich editors
  • AJAX forms with Laravel validation handling

Example:

@preserve('chat-input')

@endpreserve

The current architecture looks like:

Model Updated

HasRealtime Trait

KAAL Gateway

WebSocket Broadcast

Browser Refreshes Fragment

The package currently supports Laravel 11+.

I'm interested in honest feedback from Laravel developers:

  • Is this something you'd actually use?
  • What concerns would you have before deploying it?
  • How does this compare to your current Livewire/Reverb setup?
  • What features would be missing for production use?

Documentation:
https://docs.kaalrealtime.com

GitHub:
https://github.com/esagono-teq/kaal-realtime

Top comments (0)