This app is built using Lamx: every piece of UI is an
HtmxComponent that holds its state, its actions and its validation, and htmx 4 does the
transport.
app/View/Components— the page (Todos), the form (TodoForm::save), the list, the counter and a single todo (Todo::toggle,Todo::remove).resources/views/components— their Blade views, using$this->action('...')for the htmx URLs.app/Support/TodoStore.php— the todos live in the session.routes/web.php— a single route:Route::get('/', Todos::class).
Requires PHP 8.3+ (Laravel 13).
composer setup # install, .env, app key
php artisan serve
php artisan testThe xlited/lamx package is installed from a Composer path repository pointing at ../lamx,
so clone https://github.com/xlited/lamx next to this repository.
