🎉 Duo v0.1.0 - First Public Release
Pre-release
Pre-release
Duo v0.1.0 - Local-First Syncing for Laravel & Livewire
First public release of Duo - a local-first IndexedDB syncing package for Laravel and Livewire applications.
📦 Package Information
This release includes:
- Composer Package:
joshcirre/duo- Laravel service provider and traits - NPM Package:
@joshcirre/vite-plugin-duo- Vite plugin and client library
✨ Features
Core Functionality
- 🔄 Automatic IndexedDB Syncing - Transparent client-side caching of Eloquent models
- ⚡ Optimistic Updates - Instant UI updates with background server synchronization
- 📡 Offline Support - Automatic offline detection with sync queue that resumes when back online
- 🎯 Livewire Integration - Seamless integration with Livewire 3+ and Volt components
- 🚀 Zero Configuration - Add one trait and Duo handles the rest
Full Page Caching
- 💾 Offline Page Caching - Complete page caching with service workers
- 🔧 Dynamic Service Worker - No publishing needed, served automatically from package
- 🔒 CSRF Protection -
@duoMetadirective includes CSRF token automatically - 🖼️ Asset Caching - Caches HTML, CSS, JS, images, and fonts for true offline mode
Developer Experience
- 📊 Visual Sync Status - Built-in component showing online/offline/syncing states
- 📦 Type-Safe - Full TypeScript support with auto-generated types
- 🔌 Vite Plugin - Automatic manifest generation with file watching
- 🧪 Workbench Demo - Fully functional todo list demo included
📚 Installation
Composer
composer require joshcirre/duoNPM
npm install -D @joshcirre/vite-plugin-duo🚀 Quick Start
- Add the
Syncabletrait to your models:
use JoshCirre\Duo\Syncable;
class Todo extends Model
{
use Syncable;
}- Add the
WithDuotrait to your Livewire/Volt components:
use JoshCirre\Duo\WithDuo;
new class extends Component {
use WithDuo;
// ...
}- Add
@duoMetato your layout:
<head>
@vite(['resources/css/app.css', 'resources/js/app.js'])
@duoMeta
</head>- Configure Vite:
import duo from '@joshcirre/vite-plugin-duo';
export default defineConfig({
plugins: [duo()],
});That's it! Your app now has local-first syncing with offline support.
📖 Documentation
🙏 Acknowledgments
Built with:
- Laravel
- Livewire
- Dexie.js
- Vite
📄 License
MIT License - see LICENSE for details.
Note: This is a 0.x release, meaning the API may change before 1.0. Please report any issues on GitHub.