Skip to content

/laravel-reverb

Implement real-time WebSocket communication with Laravel Reverb. Use when adding live updates, chat, notifications, or presence features.

shell
$ npx -y skills add fusengine/agents --skill laravel-reverb --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/laravel-reverb
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Implement real-time WebSocket communication with Laravel Reverb. Use when adding live updates, chat, notifications, or presence features.

SKILL.md

laravel-reverb.SKILL.md
name: laravel-reverb
description: Implement real-time WebSocket communication with Laravel Reverb. Use when adding live updates, chat, notifications, or presence features.
versions:
  laravel: "13.0"
  reverb: "1.4"
  php: "8.3"
user-invocable: false
references: references/channels.md, references/client.md
related-skills: laravel-architecture, laravel-queues

<objective> Covers Laravel Reverb, the first-party WebSocket server, for real-time features: broadcasting events from server to client, public/private/presence channel types and authorization, the Echo client-side listener, ShouldBroadcast queued delivery, and production deployment behind a reverse proxy with SSL. Use for live notifications, chat/messaging, live dashboards, and collaborative-editing whisper events — not for background/async work (that's laravel-queues). </objective>

Laravel Reverb

Agent Workflow (MANDATORY)

Before ANY implementation, use `TeamCreate` to spawn 3 agents:

1. **fuse-ai-pilot:explore-codebase** - Analyze existing broadcasting patterns 2. **fuse-ai-pilot:research-expert** - Verify Reverb docs via Context7 3. **mcp__context7__query-docs** - Check WebSocket and event patterns

After implementation, run **fuse-ai-pilot:sniper** for validation.

---

Overview

| Component | Purpose | |-----------|---------| | **Reverb Server** | First-party WebSocket server for Laravel | | **Broadcasting** | Send events from server to client | | **Channels** | Public, private, presence scoping | | **Echo** | Client-side event listener |

---

Decision Guide

Need real-time?
├── Live notifications → Reverb + private channel
├── Chat / messaging → Reverb + presence channel
├── Live dashboard → Reverb + public channel
├── Collaborative editing → Reverb + whisper
└── Background tasks → NOT Reverb (use Queues)

---

Quick Setup

php artisan install:broadcasting
BROADCAST_CONNECTION=reverb
REVERB_APP_ID=my-app
REVERB_APP_KEY=my-key
REVERB_APP_SECRET=my-secret
REVERB_HOST=0.0.0.0
REVERB_PORT=8080

---

Critical Rules

1. **Use private channels** for authenticated data 2. **Authorize channels** in `routes/channels.php` 3. **Use ShouldBroadcast** for queued delivery (recommended) 4. **Run Reverb behind Nginx/Caddy** in production with SSL

---

Reference Guide

| Need | Reference | |------|-----------| | Channel types, authorization | [channels.md](references/channels.md) | | Echo setup, client listeners | [client.md](references/client.md) |

---

Best Practices

DO

  • Use `ShouldBroadcast` with queue for scalability
  • Authorize private and presence channels
  • Use presence channels for user awareness

DON'T

  • Broadcast sensitive data on public channels
  • Forget to configure CORS for cross-origin clients
  • Expose Reverb directly without a reverse proxy

---

Laravel 13 Notes

Reverb 1.4 est **compatible Laravel 13** sans changement. À noter :

  • La queue `broadcast` profite du nouveau `Queue::route()` (voir [[laravel-queues]])
  • `Context::add()` propagé automatiquement dans les broadcast events
  • PHP 8.3 minimum pour le serveur Reverb embarqué
Read more
Read it on GitHub ↗
Ships withfusengine-agents

A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.

Get the whole plugin, auto-invoked
Stats
22
Stars
0
Views
3
Forks
Active
Maintenance
CSS
Language
MIT
License
1d ago
Last commit
6mo ago
Created

Repo: fusengine/agents