Search by

mhstudio / filament-booking-engine

mhdeveloperYs

A correctness-focused, Filament-native booking & appointments engine — free core with a Pro tier.

Package info

github.com/mhdeveloperYs/filament-booking-engine

pkg:composer/mhstudio/filament-booking-engine

Statistics

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v0.1.0 2026-10-11 21:50 UTC

This package is auto-updated.

Last update: 2026-10-13 01:44:19 UTC


README

Latest Version on Packagist run-tests Total Downloads License

A correctness-focused, Filament-native booking & appointments engine for Laravel.

Manage services, providers and availability inside your Filament panel, and let customers book through a Livewire wizard — all backed by one tested availability engine.

Requirements

  • PHP 8.3+
  • Laravel 12+
  • Filament v5

Installation

composer require mhstudio/filament-booking-engine

Run the migrations:

php artisan migrate

Optionally publish the config:

php artisan vendor:publish --tag=filament-booking-engine-config

Register the plugin

use MHStudio\FilamentBookingEngine\BookingEnginePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(BookingEnginePlugin::make());
}

This adds three resources (Services, Providers, Appointments), the availability relation managers and a dashboard widget under the Bookings navigation group.

Public booking page

Enable the route:

// config/booking-engine.php
'public' => [
    'route_enabled' => true,
    'route_path' => 'book',
    'route_middleware' => ['web'],
],

or drop the component anywhere:

<livewire:booking-engine.booking-wizard />
<livewire:booking-engine.booking-wizard service="consultation" />

Publish the view to restyle it:

php artisan vendor:publish --tag=filament-booking-engine-views

Using the engine directly

use MHStudio\FilamentBookingEngine\Booking\BookingManager;
use MHStudio\FilamentBookingEngine\Booking\BookingRequest;
use MHStudio\FilamentBookingEngine\Data\AvailabilityContext;
use MHStudio\FilamentBookingEngine\Data\TimeRange;
use MHStudio\FilamentBookingEngine\Engine\AvailabilityEngine;

// Preview slots
$context = new AvailabilityContext(
    windows: [TimeRange::make('2026-10-12 09:00', '2026-10-12 12:00', 'Africa/Casablanca')],
    busy:    [TimeRange::make('2026-10-12 10:15', '2026-10-12 10:45', 'Africa/Casablanca')],
    durationMinutes: 60,
    slotIntervalMinutes: 30,
    bufferBeforeMinutes: 10,
    bufferAfterMinutes: 10,
);

$slots = (new AvailabilityEngine())->availableSlots($context);

// Book (validates availability, serializes, and is concurrency-safe)
$appointment = app(BookingManager::class)->create(new BookingRequest(
    service: $service,
    provider: $provider,
    start: $start,
    clientName: 'Sara',
    clientEmail: 'sara@example.test',
));

Testing

composer test       # Pest
composer phpstan    # Larastan (PHPStan level 6)
composer pint       # code style

Roadmap

The free core (services, availability, booking lifecycle, panel UI, public booking) is complete. A paid Pro tier is planned: payments, reminders, recurring bookings, calendar sync, multi-tenant, analytics and AI.

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE. The future Pro tier will be commercially licensed.