lattice-php / starter-kit
A Laravel + Inertia + React starter kit powered by Lattice server-driven UI.
Requires
- php: ^8.4
- inertiajs/inertia-laravel: ^3.1
- laravel/chisel: ^0.1.1
- laravel/fortify: ^1.37.2
- laravel/framework: ^13.16.1
- laravel/reverb: ^1.10.2
- laravel/tinker: ^3.0.2
- laravel/wayfinder: ^0.1.20
- lattice-php/lattice: ^0.10.0
Requires (Dev)
- barryvdh/laravel-ide-helper: ^3.7
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.10
- laravel/boost: ^2.4.10
- laravel/pail: ^1.2.7
- laravel/pao: ^1.1.1
- laravel/pint: ^1.29.3
- laravel/sail: ^1.62
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.9.4
- pestphp/pest: ^4.7.3
- pestphp/pest-plugin-browser: ^4.3.1
- pestphp/pest-plugin-laravel: ^4.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-12 01:13:35 UTC
README
A Laravel starter kit for building server-driven React applications with Lattice. Pages, forms, tables, and layouts are defined in PHP and rendered as React components over Inertia — you get a single-page-app feel without hand-writing the client.
Features
- Server-driven UI — pages, forms, tables, and layouts declared in PHP with Lattice.
- Authentication — login, registration, password reset, and email verification via Laravel Fortify, plus two-factor authentication and passkeys.
- Teams — memberships, roles, and email invitations.
- Account settings — profile, password, and security management.
- Realtime notifications — live in-app toasts powered by Laravel Reverb and Echo. Invite a teammate who already has an account and they are notified instantly, wherever they are in the app.
- Modern frontend — React 19, Inertia 3, Tailwind CSS v4, and TypeScript.
Requirements
- PHP 8.4+
- Composer
- Node.js 22+
Getting started
Create a new project:
composer create-project lattice-php/starter-kit my-app
cd my-app
Then run the one-shot setup (install dependencies, create .env, generate the app key, migrate, and
build assets):
composer setup
Start the development environment — the app server, queue worker, Reverb websocket server, log viewer, and Vite all run together:
composer dev
The app is now available at the URL printed by php artisan serve.
Realtime
Realtime notifications run over Laravel Reverb. composer dev
starts the Reverb server for you; in production run it with php artisan reverb:start.
The broadcast connection and credentials are configured through the REVERB_* and VITE_REVERB_*
variables in .env (reverb:install generates them). The client connects in
resources/js/app.tsx via configureEcho, and pages declare their listeners in PHP — see
app/Pages/Concerns/ListensForUserNotifications.php for the team-invitation example.
Project layout
There are no page components to write. A screen is a PHP class:
| Directory | What lives there |
|---|---|
app/Pages/ |
#[AsPage] classes — each registers its own route |
app/Layouts/ |
#[AsLayout] classes — the app and auth chrome |
app/Forms/ |
#[AsForm] classes — fields, validation, and submit handling |
app/Tables/ |
#[AsTable] classes — columns, sources, and row actions |
app/Actions/ |
#[AsAction] classes — server-side effects (toast, redirect, reload) |
app/Components/ |
custom wire components, plus the PageHeader factory pages open with |
resources/js/components/ |
the handful of custom React components, registered in app.tsx |
Records reach a definition through Lattice's context registry rather than through route parameters —
the keys are registered in AppServiceProvider::registerLatticeContext().
Testing and verification
composer test # Pint + the Unit and Feature suites, in parallel composer test:browser # the Pest browser suite (needs `npm run build` first) composer ci:check # everything CI runs: frontend checks, PHPStan, Rector, tests
Git hooks enforce the gate locally: composer install points core.hooksPath at .githooks, where
pre-commit formats staged files and pre-push runs PHPStan, the test suite, and the build,
scoped to what the push touches. Run composer hooks:install if the hooks are not active.
Working with an AI agent
The kit ships agent instructions: .ai/guidelines/ holds the project-wide guidance and .ai/rules/
holds path-scoped conventions (.ai/rules/index.md maps globs to rule files).
Laravel Boost compiles them into CLAUDE.md / AGENTS.md with
php artisan boost:update — both are git-ignored and regenerated locally.
License
MIT.