Skip to content

DiffyneServer-Driven UI for PHP

Blazing-fast, reactive components powered by Virtual DOM

Diffyne

Quick Start

Build your first component in 5 minutes:

bash
composer require diffyne/diffyne
php artisan make:diffyne Counter
php
<?php

namespace App\Diffyne;

use Diffyne\Attributes\Invokable;
use Diffyne\Component;

class Counter extends Component
{
    public int $count = 0;

    #[Invokable]
    public function increment()
    {
        $this->count++;
    }
}
blade
<div>
    <h2>Count: {{ $count }}</h2>
    <button diff:click="increment">+</button>
</div>

That's it! Your component is reactive and ready to use.

Why Diffyne?

Traditional server-side rendering sends full HTML on every interaction. Diffyne uses a Virtual DOM diff engine to send only the changes, making your applications faster and more responsive.

Before (Traditional):

  • User clicks button
  • Server sends 5KB HTML response
  • Browser replaces entire component

With Diffyne:

  • User clicks button
  • Server sends 50 bytes patch
  • Browser updates only changed text node

Result: 70-95% smaller payloads, faster updates, better UX.

What You Can Build

  • Forms with real-time validation
  • Dashboards with live data updates
  • Search with instant results
  • Interactive UIs without writing JavaScript
  • Real-time apps with WebSocket support

Ready to get started? Read the guide →

Released under the MIT License.