Skip to main content
Laravel Chorus Hero Light

Welcome to Laravel Chorus

Laravel Chorus is a real-time synchronization engine that seamlessly syncs subsets of your database to your users’ devices, enabling lightning-fast user interfaces and robust offline capabilities.

Why Choose Chorus?

Instant User Experience

Users see immediate feedback for all actions, eliminating loading states and creating native app-like experiences.

Offline-First Architecture

Full functionality even without internet connection. Changes sync automatically when back online.

Real-Time Synchronization

Changes broadcast instantly to all connected clients using Laravel Reverb WebSockets.

Secure by Design

Built-in data filtering, multi-tenant isolation, and server-side validation for all operations.

Quick Start

Get up and running with Laravel Chorus in under 5 minutes:
1

Install the Package

composer require pixelsprout/laravel-chorus
php artisan chorus:install
2

Add the Trait

class Message extends Model
{
    use Harmonics;
    
    protected $syncFields = [
        'id', 'body', 'user_id', 'created_at'
    ];
}
3

Use in Frontend

const { data: messages, create } = useTable('messages');

// Instant UI updates with real-time sync
await create(optimisticData, serverData);

Key Features

Choose exactly which models and fields to sync. Apply custom filters to control data scope per user.
UI updates immediately before server confirmation, providing instant user feedback with automatic rollback on errors.
Built-in tenant isolation with channel prefixes ensures complete data separation between organizations.
Server-side validation and business logic with support for offline writes and conflict resolution.
Powerful React hooks for effortless real-time data binding with TypeScript support.

How Chorus Works

  1. User performs an action (create, update, delete)
  2. UI updates instantly using optimistic updates
  3. Request processed by server-side Write Actions
  4. Change broadcasted as a “harmonic” to all connected clients
  5. All clients sync the change to their local IndexedDB

Use Cases

Chorus is perfect for applications requiring instant user feedback and real-time collaboration:
  • Messaging and chat applications
  • Collaborative editing tools
  • Personal Apps
  • Real-time analytics interfaces
  • Social media feeds
  • E-commerce with live inventory

Next Steps


Ready to transform your application’s user experience? Get started with Laravel Chorus today!