{"id":49824136,"url":"https://github.com/padosoft/laravel-ai-chat","last_synced_at":"2026-05-30T05:00:25.351Z","repository":{"id":355106515,"uuid":"1226747983","full_name":"padosoft/laravel-ai-chat","owner":"padosoft","description":"The fastest way to ship a ChatGPT-style demo on Laravel 13, the official laravel/ai SDK, and Italian sovereign AI infrastructure. React + @ai-sdk/react on the front, padosoft/laravel-ai-regolo as the default provider, five tool-driven artifact types (image · document · links · code · table) you can wire to your own data in minutes.","archived":false,"fork":false,"pushed_at":"2026-05-11T18:37:31.000Z","size":579,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T20:39:11.376Z","etag":null,"topics":["ai","ai-chat","ai-chatbot","ai-tools","chat-application","chatbot","laravel","laravel-ai","laravel-ai-sdk","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/padosoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T19:37:43.000Z","updated_at":"2026-05-11T18:37:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/padosoft/laravel-ai-chat","commit_stats":null,"previous_names":["padosoft/laravel-ai-chat"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/padosoft/laravel-ai-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padosoft%2Flaravel-ai-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padosoft%2Flaravel-ai-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padosoft%2Flaravel-ai-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padosoft%2Flaravel-ai-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/padosoft","download_url":"https://codeload.github.com/padosoft/laravel-ai-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/padosoft%2Flaravel-ai-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33680527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-chat","ai-chatbot","ai-tools","chat-application","chatbot","laravel","laravel-ai","laravel-ai-sdk","vercel-ai-sdk"],"created_at":"2026-05-13T14:07:54.554Z","updated_at":"2026-05-30T05:00:25.336Z","avatar_url":"https://github.com/padosoft.png","language":"PHP","funding_links":[],"categories":["Built with Regolo"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003elaravel-ai-chat\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThe fastest way to ship a ChatGPT-style demo on Laravel 13, the official \u003ca href=\"https://github.com/laravel/ai\"\u003elaravel/ai\u003c/a\u003e SDK, and Italian sovereign AI infrastructure.\u003c/strong\u003e\u003cbr/\u003e\n  React + \u003ca href=\"https://ai-sdk.dev\"\u003e\u003ccode\u003e@ai-sdk/react\u003c/code\u003e\u003c/a\u003e on the front, \u003ca href=\"https://github.com/padosoft/laravel-ai-regolo\"\u003e\u003ccode\u003epadosoft/laravel-ai-regolo\u003c/code\u003e\u003c/a\u003e as the default provider, five tool-driven artifact types (image · document · links · code · table) you can wire to your own data in minutes.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\n  \u003cimg alt=\"PHP\" src=\"https://img.shields.io/badge/php-8.3%2B-777BB4\"\u003e\n  \u003cimg alt=\"Laravel\" src=\"https://img.shields.io/badge/laravel-13-FF2D20\"\u003e\n  \u003cimg alt=\"Node\" src=\"https://img.shields.io/badge/node-20%2B-339933\"\u003e\n  \u003cimg alt=\"React\" src=\"https://img.shields.io/badge/react-18-61DAFB\"\u003e\n  \u003cimg alt=\"Vercel AI SDK\" src=\"https://img.shields.io/badge/ai--sdk-v6-black\"\u003e\n  \u003cimg alt=\"Tested\" src=\"https://img.shields.io/badge/tests-PHPUnit%20%7C%20Vitest%20%7C%20Playwright-success\"\u003e\n\u003c/p\u003e\n\n\u003e **Made with ☕ in Italy by [Padosoft](https://padosoft.com).** Sister projects: [`padosoft/laravel-ai-regolo`](https://github.com/padosoft/laravel-ai-regolo), [`padosoft/laravel-flow`](https://github.com/padosoft/laravel-flow), [`padosoft/eval-harness`](https://github.com/padosoft/eval-harness), [`padosoft/laravel-pii-redactor`](https://github.com/padosoft/laravel-pii-redactor), [`lopadova/AskMyDocs`](https://github.com/lopadova/AskMyDocs).\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"laravel-ai-chat — animated demo: streaming reply with image · doc · links · code · table artifacts rendering inline\" src=\"resources/screenshoots/Laravel-AI-Chat-Demo.gif\" width=\"900\"\u003e\n\u003c/p\u003e\n\n---\n\n## Table of contents\n\n1. [Why this demo](#why-this-demo)\n2. [What's in the box](#whats-in-the-box)\n3. [Architecture](#architecture)\n4. [Tech stack](#tech-stack)\n5. [Prerequisites](#prerequisites)\n6. [Quick start (5 minutes)](#quick-start-5-minutes)\n7. [Configuration reference](#configuration-reference)\n8. [Try the demo — 5 prompts to start with](#try-the-demo--5-prompts-to-start-with)\n9. [How the streaming works](#how-the-streaming-works)\n10. [Adding a sixth artifact in 30 lines](#adding-a-sixth-artifact-in-30-lines)\n11. [Switching to OpenAI / Anthropic / etc.](#switching-to-openai--anthropic--etc)\n12. [Testing](#testing)\n13. [Troubleshooting](#troubleshooting)\n14. [Repo layout](#repo-layout)\n15. [Roadmap](#roadmap)\n16. [Contributing](#contributing)\n17. [License \u0026 credits](#license--credits)\n\n---\n\n## Why this demo\n\nYou want a clean, opinionated reference for \"how do I ship a streaming chatbot UI on Laravel?\" without scrolling through fifteen blog posts. This repo answers it end-to-end, in the smallest amount of code that proves the wiring:\n\n- **Streaming token-by-token** to a React UI using the official Vercel AI SDK protocol — same envelope the rest of the JS ecosystem speaks.\n- **One-line provider swap** — Regolo is the default; flip an env var to talk to OpenAI, Anthropic, Mistral, Gemini, or Ollama with the same controller code.\n- **Tools as inline artifacts** — pre-canned prompts trigger 5 demo tools that render their output as image cards, document cards, link lists, code blocks, and tables. Replace the stub data with your own to ship a real assistant.\n- **Italian sovereign cloud out of the box** — `padosoft/laravel-ai-regolo` lets you keep prompts and customer data inside the EU (GDPR / EU AI Act friendly), in EUR-billed pay-as-you-go.\n- **Junior-proof setup** — clone, copy `.env`, paste your Regolo key, run three commands, you have a working chat. No Docker, no Redis, no auth complexity.\n\nIf you want the heavy enterprise version (RAG, embeddings, citations, refusal logic, auth, audit log), see the sister project [`AskMyDocs`](https://github.com/lopadova/AskMyDocs). This repo is **deliberately minimal** — the 5-minute starter you fork to build your own.\n\n## What's in the box\n\n- `Laravel 13` SPA with a single React entry point (`resources/js/app.tsx`).\n- Streaming controller `app/Http/Controllers/ChatStreamController.php` that calls `Agent::stream()-\u003eusingVercelDataProtocol()` and persists the assistant turn (with artifact metadata) on completion.\n- 5 demo tools under `app/Ai/Tools/` — every one is a deterministic stub you can replace with a real data source:\n  - `ShowImageTool` → image artifact (Picsum, seeded on the subject).\n  - `ShowDocTool` → document card artifact (title + page count + snippet).\n  - `ListLinksTool` → list of resource links (topic-specific demo set).\n  - `CodeSnippetTool` → syntax-tagged code block with copy button.\n  - `DataTableTool` → comparison/ranking table (default: top-5 Regolo models).\n- React UI under `resources/js/` — `ChatApp.tsx`, `MessageThread`, `MessageBubble`, `Composer`, `SuggestedPrompts`, plus 5 artifact renderers under `components/artifacts/`.\n- `useChatStream` hook in `resources/js/lib/use-chat-stream.ts` — wraps `@ai-sdk/react`'s `useChat()` with CSRF threading and the right request body shape.\n- Tests:\n  - `vendor/bin/phpunit` — 13 PHPUnit tests (controller validation, conversation persistence, tool stubs).\n  - `npm run test` — 8 Vitest tests (artifact renderers, suggested prompts).\n  - `npm run e2e` — 2 Playwright tests (smoke + intercepted streaming flow).\n- This README, [`docs/IMPLEMENTATION_PLAN.md`](docs/IMPLEMENTATION_PLAN.md), `LICENSE` (MIT), `.env.example`.\n\n## Architecture\n\n```mermaid\nflowchart LR\n    subgraph Browser\n        UI[\"React SPA\u003cbr/\u003e@ai-sdk/react useChat()\"]\n    end\n\n    subgraph Laravel[\"Laravel 13 (this repo)\"]\n        Route[\"POST /api/chat/stream\"]\n        Controller[\"ChatStreamController\"]\n        Agent[\"AnonymousAgent\u003cbr/\u003e+ 5 Tools\"]\n    end\n\n    subgraph SDK[\"laravel/ai SDK\"]\n        Stream[\"StreamableAgentResponse\u003cbr/\u003eusingVercelDataProtocol()\"]\n    end\n\n    subgraph Pkg[\"padosoft/laravel-ai-regolo\"]\n        Provider[\"RegoloProvider\"]\n    end\n\n    subgraph Cloud[\"Italian sovereign cloud\"]\n        Regolo[(\"api.regolo.ai/v1\")]\n    end\n\n    UI --\u003e|\"POST \u0026#123;content, conversation_id\u0026#125;\"| Route\n    Route --\u003e Controller\n    Controller --\u003e Agent\n    Agent --\u003e Stream\n    Stream --\u003e Provider\n    Provider --\u003e|\"chat/completions stream\"| Regolo\n    Regolo -.-\u003e|\"SSE tokens + tool calls\"| UI\n    Stream -.-\u003e|\"then() callback\"| Controller\n    Controller -.-\u003e|\"persist messages + artifacts\"| Controller\n```\n\nThe browser sends one POST with the user message; the controller persists the user turn, builds an `AnonymousAgent` with the 5 tools and the conversation history, and returns the streamable response. The Vercel UI Message Stream is consumed by `@ai-sdk/react` directly — when the model decides to call `ShowImageTool`, the JSON output flows back as a `tool-output-available` part, the React layer parses the artifact payload, and the matching renderer mounts inline in the assistant bubble. After the stream closes, the `then()` callback persists the assistant message + artifact metadata so a refresh repopulates the thread.\n\n## Tech stack\n\n| Layer | Tech | Version | Why |\n|------|------|---------|-----|\n| Backend | PHP | `^8.3` | required by `laravel/ai` and Laravel 13 |\n| Backend | Laravel | `^13.0` | LTS-class core, native session + CSRF |\n| Backend | `laravel/ai` | `^0.6` | official, multi-provider AI SDK |\n| Backend | `padosoft/laravel-ai-regolo` | `^0.2` | Regolo provider extension (default) |\n| Database | SQLite | bundled | zero setup; demo conversations only |\n| Frontend | React | `^18.3` | the lingua franca for AI chat UIs |\n| Frontend | TypeScript | `^5.6` | strict mode catches the dumb mistakes |\n| Frontend | `@ai-sdk/react` | `^3.0` | `useChat()` hook — Vercel AI SDK UI |\n| Frontend | `ai` | `^6.0` | message stream protocol + transport |\n| Frontend | Vite | `^7.0` | the Laravel default in 13 |\n| Frontend | Tailwind | `^4.0` | the Laravel default in 13 |\n| Test | PHPUnit | `^12` | feature + unit tests |\n| Test | Vitest | `^2.1` | React component tests |\n| Test | Playwright | `^1.49` | end-to-end smoke + streaming flow |\n\n## Prerequisites\n\nYou need these on your machine **before** the quick start:\n\n| Tool | Minimum | Where |\n|------|---------|-------|\n| **PHP** | `8.3` (CLI) | [windows/herd](https://herd.laravel.com) · [linux/mac/asdf](https://asdf-vm.com) · `apt install php8.3-cli` |\n| **Composer** | `2.7+` | \u003chttps://getcomposer.org/download/\u003e |\n| **Node.js** | `20+` LTS | \u003chttps://nodejs.org/\u003e · `nvm install 20` |\n| **npm** | `10+` (ships with Node 20) | — |\n| **A Regolo API key** | `rg_live_…` | \u003chttps://regolo.ai\u003e → sign up → dashboard → **API keys** |\n\n\u003e **Heads up — Windows users.** Herd or [Laragon](https://laragon.org) makes PHP/Composer/Node work out of the box on Windows. Without one of those you'll need to add PHP and Composer to your `PATH` manually. The commands below work in both **PowerShell** and **bash** unless explicitly noted.\n\n\u003e **Don't have a Regolo key yet?** Sign up at \u003chttps://regolo.ai\u003e — pay-as-you-go in EUR, free credit on signup, the demo runs with **less than €0.01** in usage.\n\n## Quick start (5 minutes)\n\n```bash\n# 1. Clone\ngit clone https://github.com/padosoft/laravel-ai-chat.git\ncd laravel-ai-chat\n\n# 2. Install backend deps\ncomposer install\n\n# 3. Install frontend deps\nnpm install\n\n# 4. Configure\ncp .env.example .env\nphp artisan key:generate\n# → open .env in your editor, set REGOLO_API_KEY=rg_live_...\n\n# 5. Migrate the SQLite DB\nphp artisan migrate\n\n# 6. Build the frontend (once, for production-style serving)\nnpm run build\n\n# 7. Serve\nphp artisan serve\n# → if `php artisan serve` says \"Failed to listen (reason: ?)\" on Windows/Herd,\n#   use the bundled fallback router instead:\n#       composer serve            # alias for the fallback below\n#   or\n#       php -S 127.0.0.1:8000 -t public public/_devserver.php\n```\n\nOpen \u003chttp://localhost:8000\u003e in your browser. You'll see the welcome screen with five suggested prompts. Click any of them — the chat streams Regolo's reply token-by-token and the matching artifact renders inline.\n\n\u003e **Iterating on the frontend?** Run `npm run dev` in a separate terminal instead of (or alongside) `npm run build`. Vite picks up your TSX changes with HMR; reload the browser to see them.\n\n\u003e **Don't want to type out the env vars by hand?** The `.env.example` already lists every key the demo reads — copy it as `.env` (step 4 above) and fill in only `REGOLO_API_KEY`. Everything else has sane defaults.\n\n## Configuration reference\n\n| Env key | Required | Default | Purpose |\n|---------|:--------:|---------|---------|\n| `APP_KEY` | ✅ | — (set by `php artisan key:generate`) | Session + cookie encryption. |\n| `REGOLO_API_KEY` | ✅ | _empty_ | Regolo bearer token. Get it at \u003chttps://regolo.ai\u003e. |\n| `REGOLO_BASE_URL` | ⛔ | `https://api.regolo.ai/v1` | Override for staging or self-hosted. |\n| `REGOLO_TEXT_MODEL` | ⛔ | `Llama-3.3-70B-Instruct` | Default chat model for streaming. Try `Llama-3.1-8B-Instruct` for cheaper / faster turns. |\n| `AI_DEFAULT_TEXT` | ⛔ | `regolo` | Provider used when the controller calls `Agent::stream()` without an explicit name. Flip to `openai`, `anthropic`, etc. once those are configured. |\n| `DB_CONNECTION` | ⛔ | `sqlite` | Demo uses SQLite; switch to `pgsql`/`mysql` for prod. |\n| `SESSION_DRIVER` | ⛔ | `database` | The demo binds conversations to a session id from the cookie. |\n\nEverything is also documented in `.env.example` — a junior dev should be able to copy it, fill the one required field, and run.\n\n## Try the demo — 5 prompts to start with\n\nThe home screen shows five clickable suggestions, each wired to one tool. You can paste any of these into the composer too:\n\n| Prompt | Triggers | Renders |\n|--------|----------|---------|\n| `Mostrami una foto del Colosseo al tramonto` | `ShowImageTool` | Inline image card (Picsum). |\n| `Dammi un documento di esempio con un NDA breve` | `ShowDocTool` | Document card (title + page count + snippet). |\n| `Linkami le risorse principali su Regolo.ai` | `ListLinksTool` | List of resource links with favicons. |\n| `Mostrami uno snippet PHP che usa laravel/ai con Regolo` | `CodeSnippetTool` | Code block with language tag + copy button. |\n| `Tabella dei top 5 modelli del catalogo Regolo` | `DataTableTool` | Sortable comparison table. |\n\nType your own questions and the model replies in plain text + Markdown — no tool call.\n\n## How the streaming works\n\n1. The user types a message; the React composer fires `chat.sendMessage({ text })` from `@ai-sdk/react`.\n2. `useChatStream` reshapes the SDK request to `{ content, conversation_id }`, threads the `X-XSRF-TOKEN` header from the cookie, and POSTs to `/api/chat/stream`.\n3. `ChatStreamController::store` validates, persists the user turn, builds an `AnonymousAgent` with the system prompt + history + 5 tools, and returns the streamable response from `Agent::stream()-\u003eusingVercelDataProtocol()-\u003ethen(...)`.\n4. The `usingVercelDataProtocol()` envelope — provided by `laravel/ai` itself, originally for Vercel AI SDK UI compat — emits `text-delta`, `tool-input-available`, `tool-output-available`, and `finish` events as the model streams tokens.\n5. `@ai-sdk/react` parses the protocol on the client into `UIMessage.parts[]`. `MessageBubble` walks the parts:\n   - `type === 'text'` → `\u003cReactMarkdown\u003e`.\n   - `type.startsWith('tool-')` and `state === 'output-available'` → JSON-parse `output`, dispatch via `__artifact` tag to the matching renderer in `components/artifacts/`.\n6. When the stream finishes, the `then()` callback on the server fires with a `StreamedAgentResponse`; we persist the full assistant text + artifact metadata in the `messages` table so a page refresh restores the thread.\n\nThe Vercel UI Message Stream wire format is documented at \u003chttps://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol\u003e — `laravel/ai` implements it natively, no glue required.\n\n## Adding a sixth artifact in 30 lines\n\nWant a `MapArtifact`? It's three files:\n\n1. **Backend tool** (`app/Ai/Tools/ShowMapTool.php`) — implement `Laravel\\Ai\\Contracts\\Tool`, return JSON `{ \"__artifact\": \"map\", \"lat\": 41.89, \"lng\": 12.49 }`. Register it in `ChatStreamController::store` next to the others.\n2. **React renderer** (`resources/js/components/artifacts/MapArtifact.tsx`) — embed an `\u003ciframe\u003e` to your favourite tile server.\n3. **Dispatcher** (`resources/js/components/artifacts/index.tsx`) — add `'map'` to `ArtifactPayload`, route the case in `renderArtifact`.\n\nUpdate the system prompt (`resources/views/prompts/system.blade.php`) so the model knows when to call the new tool, and you're done.\n\n## Switching to OpenAI / Anthropic / etc.\n\n`laravel/ai` ships with **15+ providers** built-in. To make the demo talk to OpenAI:\n\n```bash\n# .env\nAI_DEFAULT_TEXT=openai\nOPENAI_API_KEY=sk-...\n```\n\nThat's it. The controller code doesn't change — `Agent::stream()` resolves whatever the `AI_DEFAULT_TEXT` env var points at. Same for `anthropic`, `gemini`, `mistral`, `groq`, `cohere`, `deepseek`, `bedrock`, `azure`, `openrouter`, `ollama`, `xai`, `voyageai`, `jina`, `eleven`. See [`config/ai.php`](config/ai.php) for the full list.\n\n## Testing\n\n```bash\n# PHP — unit + feature\nvendor/bin/phpunit\n\n# Frontend — Vitest unit\nnpm run test\n\n# Frontend — Playwright e2e (requires a one-time browser install)\nnpx playwright install chromium\nnpm run e2e\n```\n\nThe Playwright e2e suite intercepts `/api/chat/stream` with a synthetic Vercel-AI-SDK-protocol response, so it runs offline without a real Regolo API key — perfect for CI.\n\n## Troubleshooting\n\n| Symptom | Why | Fix |\n|---------|-----|-----|\n| \"Regolo API key not configured\" / `401` from Regolo | `.env` value missing or didn't reload | set `REGOLO_API_KEY=rg_live_...` then `php artisan config:clear` |\n| `419 PAGE EXPIRED` on the first POST | Test client / direct curl skipped the GET that sets the XSRF cookie | open `/` in the browser first; if you're calling from curl, do a `GET /` and reuse the `XSRF-TOKEN` cookie + `X-XSRF-TOKEN` header |\n| `Class \"Laravel\\Ai\\Agent\" not found` | Composer install skipped or package conflict | `composer dump-autoload` then `composer install` |\n| Blank page at `localhost:8000` | Vite manifest missing | run `npm run build` (production) or `npm run dev` (dev) |\n| `SQLSTATE[HY000]: General error: 1 no such table: conversations` | Migrations didn't run | `php artisan migrate` |\n| `permission denied` writing to `storage/` (Linux/macOS) | Default `storage/` perms | `chmod -R 775 storage bootstrap/cache` and ensure your user owns it |\n| Frontend hot reload doesn't pick up `.tsx` changes | `npm run dev` not running | open a second terminal and run `npm run dev` alongside `php artisan serve` |\n| `npm run e2e` hangs at \"starting webServer\" | `php artisan serve` failed silently — usually a missing migration or APP_KEY | run `php artisan migrate:fresh \u0026\u0026 php artisan key:generate` then retry |\n| `php artisan serve` prints `Failed to listen on 127.0.0.1:XXXX (reason: ?)` | A known flake on some Herd / Windows setups where the artisan-spawned PHP server can't bind | use the bundled fallback: `composer serve` (or `php -S 127.0.0.1:8000 -t public public/_devserver.php`) |\n\nStill stuck? Open an issue at \u003chttps://github.com/padosoft/laravel-ai-chat/issues\u003e.\n\n## Repo layout\n\n```\nlaravel-ai-chat/\n├── app/\n│   ├── Ai/Tools/                      ← 5 demo tools (artifacts)\n│   ├── Http/Controllers/ChatStreamController.php\n│   └── Models/{Conversation,Message}.php\n├── config/ai.php                      ← regolo provider + defaults\n├── database/migrations/               ← conversations + messages\n├── docs/IMPLEMENTATION_PLAN.md        ← full design doc\n├── resources/\n│   ├── css/app.css\n│   ├── js/\n│   │   ├── ChatApp.tsx\n│   │   ├── app.tsx                    ← Vite entry\n│   │   ├── components/{Composer,Message*,SuggestedPrompts}.tsx\n│   │   ├── components/artifacts/      ← 5 artifact renderers\n│   │   └── lib/use-chat-stream.ts     ← @ai-sdk/react adapter hook\n│   └── views/{app,prompts/system}.blade.php\n├── routes/web.php\n├── tests/\n│   ├── Feature/ChatTest.php           ← PHPUnit feature tests\n│   ├── Unit/ToolsTest.php             ← PHPUnit tool stubs\n│   └── e2e/chat.spec.ts               ← Playwright smoke + streaming\n├── playwright.config.ts\n├── vitest.config.ts\n├── tsconfig.json\n├── tailwind.config.js (CSS-only in Tailwind v4 — see resources/css/app.css)\n├── vite.config.js\n├── package.json\n└── composer.json\n```\n\n## Roadmap\n\n| Version | Status | Highlights |\n|---------|--------|-----------|\n| `v0.1` (this) | shipped | streaming + 5 artifact tools + 13 PHPUnit + 8 Vitest + 2 Playwright tests |\n| `v0.2` | planned | conversation list sidebar, persisted thread navigation, dark mode |\n| `v0.3` | planned | optional auth (multi-user demo with Sanctum SPA) |\n| `v0.4` | exploring | RAG hookup using `lopadova/AskMyDocs` (sister project) |\n| `v1.0` | tracking | pinned `laravel/ai` ^1.0 GA |\n\n## Contributing\n\nContributions welcome — bug reports, new artifact tools, UI polish, docs improvements.\n\n1. Fork, branch off `main`.\n2. Run `vendor/bin/phpunit \u0026\u0026 npm run test \u0026\u0026 npm run typecheck` before pushing.\n3. Open a PR with a clear description and (where it makes sense) a screenshot.\n\n## License \u0026 credits\n\n[MIT](LICENSE).\n\nBuilt and maintained by **[Padosoft](https://padosoft.com)** as a runnable companion to [`padosoft/laravel-ai-regolo`](https://github.com/padosoft/laravel-ai-regolo) — the Regolo provider for the official `laravel/ai` SDK.\n\nSister packages in the Padosoft AI stack:\n\n- [`padosoft/laravel-ai-regolo`](https://github.com/padosoft/laravel-ai-regolo) — Regolo provider, the default of this demo.\n- [`padosoft/laravel-flow`](https://github.com/padosoft/laravel-flow) — saga / workflow orchestration.\n- [`padosoft/eval-harness`](https://github.com/padosoft/eval-harness) — RAG + agent evaluation harness.\n- [`padosoft/laravel-pii-redactor`](https://github.com/padosoft/laravel-pii-redactor) — PII redaction middleware for AI prompts.\n- [`lopadova/AskMyDocs`](https://github.com/lopadova/AskMyDocs) — full-blown RAG chat / knowledge base on Laravel, the enterprise sibling.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003eMade with ☕ in Italy by \u003ca href=\"https://padosoft.com\"\u003ePadosoft\u003c/a\u003e.\u003c/sub\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadosoft%2Flaravel-ai-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpadosoft%2Flaravel-ai-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpadosoft%2Flaravel-ai-chat/lists"}