A Laravel 12 application with Inertia.js (React) and the Laravel AI SDK. It includes Fortify authentication, a settings area, and a streaming AI chat sidebar powered by an agent.
- Laravel 12 backend with Fortify auth and Inertia.js v2 (React)
- Streaming AI chat widget (authenticated users) using Laravel AI SDK + @laravel/stream-react
- Wayfinder for typed route helpers in the frontend
- Tailwind CSS v4 UI with Radix UI and Headless UI components
- PHP 8.x, Laravel 12
- Inertia.js v2 + React 19
- Tailwind CSS v4 + Vite
- Laravel AI SDK
- Pest for tests
- PHP 8.2+ (project guidelines target 8.4)
- Composer
- Node.js + npm
- SQLite (default) or another supported database
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
npm run buildOr use the provided setup script:
composer run setupcomposer run devThis starts:
php artisan servephp artisan queue:listenphp artisan pailnpm run dev
If you prefer separate terminals:
php artisan serve
php artisan queue:listen --tries=1 --timeout=0
npm run devThe default AI providers are configured in config/ai.php. The customer support chat agent uses the Gemini provider, so you need at least:
GEMINI_API_KEY=your_key
You can also configure other providers (OpenAI, Anthropic, etc.) in .env.example and config/ai.php.
- Backend endpoint:
POST /chat/stream(requires authenticated + verified user) - UI: floating chat panel in the app layout
- Conversations are stored in
agent_conversationsandagent_conversation_messages
# Lint PHP
composer run lint
# Run tests (includes lint)
composer run test
# Typecheck frontend
npm run types
# Lint frontend
npm run lint
# Format frontend
npm run formatapp/Ai/Agents– AI agents (e.g., CustomerSupport)app/Http/Controllers– controllers, including chat streamingresources/js– Inertia React pages/componentsroutes– web routes + settings routesdatabase/migrations– schema, including AI conversation tables
- Default DB is SQLite (see
.env.example). - If frontend changes are not visible, run
npm run devornpm run build.