Vessel classes, components avoid direct dependencies on each other, improving modularity and testability.composer install) make it easy to prototype. The package’s simplicity reduces risk for small-to-medium integrations.init() run (e.g., per request, per component mount)? Can it be async?composer require epessine/vessel
BaseVessel subclasses for each shared state domain (e.g., FilterVessel, UIConfigVessel).AppServiceProvider or via Livewire’s boot():
$this->app->singleton(FilterVessel::class, fn() => new FilterVessel());
public properties.public FilterVessel $filterVessel;
public function updatedFilterVesselSelectedUserType() {
// React to changes
}
Vessels/ directory).Route::get('/debug/vessels', function() {
return collect(app()->tagged('vessel'))->toArray();
});
$this->filterVessel->selectedUserType = 'admin';
\Log::debug('FilterVessel updated', ['type' => $this->filterVessel->selectedUserType]);
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Vessel not initialized | Components fail or show stale data | Use null checks or lazy initialization. |
| Concurrent write conflicts | Race conditions or lost updates | Implement locking (e.g., syncOnWrite pattern). |
| Memory leaks from unbounded growth | High memory usage, crashes | Set max size limits or use cache eviction. |
| Livewire reactivity bugs | UI not updating after vessel change | Ensure properties are public and reactive. |
| Session persistence issues | State lost on refresh | Explicitly persist critical state to session. |
*Vessel suffix).How can I help you explore Laravel packages today?