1.3 KiB
1.3 KiB
Realtime Messaging
Skinbase Nova messaging now uses Laravel Reverb, Laravel Broadcasting, Laravel Echo, and Redis-backed queues.
Local setup
- Set the Reverb and Redis values in
.env. - Run
php artisan migrate. - Run
npm installif dependencies are not installed. - Start the websocket server with
php artisan reverb:start --host=0.0.0.0 --port=8080. - Start queue workers with
php artisan queue:work redis --queue=broadcasts,default,notifications --tries=1. - Start the frontend with
npm run devor build assets withnpm run build.
Production notes
- Use
BROADCAST_CONNECTION=reverbandQUEUE_CONNECTION=redis. - Keep
MESSAGING_REALTIME=trueonly when Reverb is configured and reachable from the browser. - Terminate TLS in Nginx and proxy websocket traffic to the Reverb process.
- Run both
php artisan reverb:startandphp artisan queue:work redis --queue=broadcasts,default,notifications --tries=1under Supervisor or systemd. - The chat UI falls back to HTTP polling only when realtime is disabled in config.
Reconnect model
- The conversation view loads once via HTTP.
- Live message, read, and typing updates arrive over websocket channels.
- When the socket reconnects, the client requests message deltas with
after_idto merge missed messages idempotently.