LaravelReact启动器

evolayer-base-starter — Laravel 启动器模板

作者 xuple

基于 Laravel 与 React 的 AI 应用启动器模板,通过 Composer create-project 安装,内置结构化输出流式示例、本体驱动事件与可开关的示例界面。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

通过 composer create-project 安装,post-create 钩子自动完成密钥生成、SQLite 建库、迁移、种子与缓存编译

02

结构化输出流式基于 laravel/ai SDK,默认 Gemini,SDK 支持 OpenAI、Anthropic、DeepSeek、Groq、xAI、Mistral、Ollama

03

ThreadStudio 运行时仅批准 Gemini 与 OpenAI 作为可选提供方,Anthropic 结构化流式路径未获运行时批准

04

每个示例界面由 EVOLAYER_BASE_EXAMPLE_* 环境变量独立开关,关闭后移除对应路由与侧边栏条目

05

ontology.yaml 本体模型编译为带类型的 SSE 事件与投影,为实时 UI 提供 schema

06

附带 laravel/ai 结构化流式补丁,经 composer-patches 在安装时自动应用,可用 evolayer:doctor 校验

模板详细介绍

EvoLayer Base Starter 是一个面向 Laravel 的 AI 应用启动器,由宿主外壳(本仓库)与上游包 xuple/evolayer-base 两部分组成。宿主部分提供 Laravel 应用外壳,包括 Inertia 与认证接线、宿主迁移、React 组件、Tailwind 样式、种子数据与测试,并基于官方 laravel/react-starter-kit 构建。上游包负责示例、区块、代理、本体(ontology)、evolayer:* 命令以及 evolayer.base.* 配置结构,默认不注册路由;本启动器则把示例功能全部打开,形成“全量示例”的初始状态。

安装方式为 composer create-project xuple/evolayer-base-starter my-app,post-create 钩子会自动生成应用密钥、创建 SQLite 数据库、执行迁移与种子、编译 Wayfinder 与本体缓存,并写入生成应用的身份说明。直接克隆仓库时改用 composer setup。默认演示账号为 [email protected] / password。

功能层面,模板通过 laravel/ai SDK 实现结构化输出流式传输,默认使用 Gemini,SDK 层面还支持 OpenAI、Anthropic、DeepSeek、Groq、xAI、Mistral 与 Ollama;但 ThreadStudio 运行时仅批准 Gemini 与 OpenAI 作为 AI_THREAD_STUDIO_PROVIDER,Anthropic 的结构化流式路径当前返回零个 TextDelta 事件与空最终负载,属于可诊断但未获运行时批准。每个示例界面由 EVOLAYER_BASE_EXAMPLE_* 环境变量独立开关,关闭后对应路由与侧边栏条目消失;底层特性使用 EVOLAYER_BASE_FEATURE_* 前缀。

模板附带 patches/laravel-ai-structured-streaming.patch,通过 cweagans/composer-patches 在 composer install 时自动应用,用于在上游 laravel/ai 修复前启用结构化输出流式。前端桩文件已提交到仓库,可用 composer evolayer:resync 拉取上游更新,该命令会保留宿主修改并跳过已 eject 的界面。

限制方面:项目处于开发者预览阶段,包版本为 0.x(starter v0.1.19 搭配 xuple/evolayer-base v0.1.9),框架在 0.x 期间为精确锁定版本。不应编辑 vendor/xuple/evolayer-base 下的文件,包内部问题需在上游仓库修复后再 composer update 与 resync。代码采用 MIT 许可,但演示图片、字体、图标等第三方素材需单独核对许可,域名、托管、数据库、支付与 AI 等外部服务可能另行收费。

LaravelReact启动器

适合你的项目吗?

适用场景

  • 从零搭建一个带认证、Inertia 与 React 前端的 Laravel AI 应用骨架
  • 在已有 Laravel 项目中通过 composer require xuple/evolayer-base 与 evolayer:install 增量引入 AI 与本体能力
  • 以 ThreadStudio、PRD Studio、联系表单 AI 分诊等示例界面为起点改造自有业务界面
  • 需要结构化输出流式与本体驱动实时事件,并希望按环境变量裁剪示例功能的项目

适合人群

  • 使用 Laravel 与 React 技术栈、需要 AI 应用起始骨架的开发者
  • 希望示例界面开箱可用、之后再按需关闭或 eject 的团队
  • 接受 0.x 开发者预览版本、愿意跟随上游包更新的项目
  • 需要为 Claude Code、Codex、OpenCode、Cursor 等代理工具预置 Laravel Boost 配置的开发者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    执行 composer create-project xuple/evolayer-base-starter my-app,随后 npm install && npm run build 并 php artisan serve

  2. 2

    直接克隆仓库时改用 composer setup;Nginx 托管场景参考 docs/local-dev-hosting.md

  3. 3

    在 .env 中设置所选提供方的 API 密钥(如 GEMINI_API_KEY、OPENAI_API_KEY),并用 php artisan evolayer:ai:stream-check gemini 验证结构化流式

  4. 4

    默认演示账号为 [email protected] / password;安装异常时运行 php artisan evolayer:doctor 检查补丁标记与安装状态

  5. 5

    不要编辑 vendor/xuple/evolayer-base 下的文件,更新上游后执行 composer evolayer:resync(可用 --dry-run 预览、--force 覆盖本地修改)

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 启用 AI 功能需在 .env 中配置所选提供方的 API 密钥(如 GEMINI_API_KEY、OPENAI_API_KEY 等),即依赖第三方 AI 服务账号与密钥。
  • ThreadStudio 运行时仅批准 Gemini 与 OpenAI 作为可选提供方,其他提供方(如 Anthropic)未获运行时批准,不能作为 AI_THREAD_STUDIO_PROVIDER 选择。
  • Anthropic 的结构化流式路径当前返回零个 TextDelta 事件与空最终负载,仅可用于诊断,被阻止用于 ThreadStudio 运行时,需等待重新验证。
  • 不得编辑 vendor/xuple/evolayer-base 下的文件;包内部问题需在上游仓库修复后再 composer update 与 resync。
  • Laravel Boost 为 require-dev 依赖,MCP 层仅在安装开发依赖时可用。
  • 项目处于 pre-1.0 开发者预览阶段,版本为 0.x,框架在 0.x 期间精确锁定版本,可能存在不稳定性。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

To enable AI features, set your provider's API key in `.env` (`GEMINI_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.)

README 原文

ThreadStudio's runtime-approved (directly-verified) providers are > **Gemini** (default) and **OpenAI**

README 原文

Anthropic's structured-streaming path currently returns > zero `TextDelta` events and an empty final payload, so it is > **diagnostic-eligible but blocked for ThreadStudio runtime / pending > re-verification**

README 原文

**Do not edit files under `vendor/xuple/evolayer-base`.**

README 原文

**Boost is a `require-dev` dependency**; the MCP layer is only available with dev dependencies installed.

README 原文

EvoLayer is pre-1.0.

README 原文
https://github.com/xuple/evolayer-base-starter/blob/main/LICENSEhttps://github.com/xuple/evolayer-base-starter/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 88 / 100
技术栈
Laravel · React
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-01
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Laravel。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 00913df7512694cfcb18fd7f9e9e0d330b048256384f3ccda7484c7ffdf0ade9

2026-10-02T14:39:13.345Z

来源文件 / 仓库
<p align="center">
  <img src="public/social/thread-studio-preview.png" alt="ThreadStudio — structured AI streaming in EvoLayer Base" width="700">
</p>



# EvoLayer Base

**A fully working AI application layer for the official Laravel AI SDK.**
Structured-output streaming, ontology-driven events, and production-ready React surfaces — delivered as a project template.

<p align="center">
  <a href="https://github.com/xuple/evolayer-base-starter/actions"><img src="https://img.shields.io/github/actions/workflow/status/xuple/evolayer-base-starter/tests.yml?branch=main&style=flat-square" alt="Tests"></a>
  <a href="https://packagist.org/packages/xuple/evolayer-base-starter"><img src="https://img.shields.io/packagist/v/xuple/evolayer-base-starter?style=flat-square" alt="Version"></a>
  <a href="https://packagist.org/packages/xuple/evolayer-base-starter"><img src="https://img.shields.io/packagist/php-v/xuple/evolayer-base-starter?style=flat-square" alt="PHP"></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License"></a>
</p>

<p align="center">
  <a href="https://evodevops.com/evolayer-base/docs">Documentation</a> ·
  <a href="#quick-start">Quick Start</a> ·
  <a href="https://github.com/xuple/evolayer-base">Package Repo</a> ·
  <a href="https://www.youtube.com/@EvoDevOps">YouTube</a> ·
  <a href="CHANGELOG.md">Changelog</a>
</p>

> **Developer preview:** Both `xuple/evolayer-base` and `xuple/evolayer-base-starter` are public, MIT-licensed, pre-1.0 packages on GitHub and Packagist. The current public install line is starter `v0.1.19` with `xuple/evolayer-base` `v0.1.9`.

## The Promise

EvoLayer Base gives you the best of both worlds: a clean, manageable starting point with continuous upstream updates, and the freedom to take total control exactly when you need it. It is a **working AI application layer delivered through a project template**.

- **You own** your routes, models, config, branding, and any surface you [eject](https://evodevops.com/evolayer-base/docs/how-to/eject-a-surface).
- **The application layer manages** the complex AI runtime, ontology, commands, and example surfaces behind the scenes. It keeps them updated automatically via [`composer evolayer:resync`](https://evodevops.com/evolayer-base/docs/how-to/resync-the-frontend) so your codebase stays clean.
- **Ejecting empowers you.** Whenever you want to deeply customize a managed surface, simply run `php artisan evolayer:eject <surface>`. You take full ownership of the code, and we'll step out of the way.

> Read the full [Promise](PROMISE.md) and [Framework Contract](https://github.com/xuple/evolayer-base/blob/main/docs/contract.md).

## Quick Start

```bash
composer create-project xuple/evolayer-base-starter my-app
cd my-app
npm install && npm run build
php artisan serve
```

`composer create-project` runs the post-create hook automatically — generating your app key, creating an SQLite database, running migrations and seeders, compiling the Wayfinder and ontology caches, and adding generated-app identity notes for humans and agents. Log in with `[email protected]` / `password` to explore every surface immediately.

> Cloned the repo directly? Run `composer setup` instead. Hosting behind Nginx? See [`docs/local-dev-hosting.md`](docs/local-dev-hosting.md). For generated-app identity behavior, see [`docs/migration/generated-app-identity.md`](docs/migration/generated-app-identity.md).

## Why EvoLayer Base?

- **[Structured AI Streaming](https://evodevops.com/evolayer-base/docs/how-to/configure-ai-provider)** — Real-time structured-output streaming via the `laravel/ai` SDK. Defaults to Gemini; the SDK also supports OpenAI, Anthropic, DeepSeek, Groq, xAI, Mistral, and Ollama. (ThreadStudio runtime-approves Gemini + OpenAI today — see [AI providers](#ai-providers).)

- **[Working AI Surfaces, Not Stubs](https://evodevops.com/evolayer-base/docs/tutorial/first-install)** — ThreadStudio, PRD Studio, AI contact triage, voice input, and inline text assist ship functional — not as placeholder wireframes.

- **[Ontology-Driven Events](https://evodevops.com/evolayer-base/docs/reference/sse-vocabulary)** — An `ontology.yaml` model compiles to typed SSE events and projections, giving your real-time UI a schema instead of ad-hoc event strings.

- **[Feature Flags, Not Bloat](https://evodevops.com/evolayer-base/docs/reference/env-flags)** — Every example surface toggles independently via `EVOLAYER_BASE_EXAMPLE_*` env flags. Disable what you don't need; routes and sidebar entries disappear.

- **[Reproducible Installs](PROMISE.md)** — Committed `composer.lock`, exact-pinned framework while `0.x`, deterministic `create-project`. Two installs of the same version are identical.

- **[Agent-Ready Tooling](https://laravel.com/docs/boost)** — Pre-wired for Claude Code, Codex, OpenCode, and Cursor via Laravel Boost with MCP, skills, and `search-docs`.

## Choose Your Path

|                    | Command                                                              | Use when…                                                                  |
| ------------------ | ------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| 🚀 **New project** | `composer create-project xuple/evolayer-base-starter my-app`        | You want a fully configured app with every surface enabled from clone zero |
| 📦 **Existing app** | `composer require xuple/evolayer-base` then `php artisan evolayer:install` | You want to add AI and ontology to a Laravel app you already have           |

## How the pieces fit

|                                                                           | Owns                                                                                                              | Posture                                                         |
| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`xuple/evolayer-base`](https://github.com/xuple/evolayer-base) (package) | Examples, blocks, agents, ontology, `evolayer:*` commands, the `evolayer.base.*` config shape                     | Conservative — installs add no routes by default                |
| `xuple/evolayer-base-starter` (this repo)                                 | The Laravel host shell: Inertia/auth wiring, host migrations, `laravel/ai` patch, kitchen-sink `.env.example`, CI | Kitchen-sink — every example feature switched on out of the box |

It gives you a full Laravel application from day one — auth, host Inertia pages, React components, Tailwind styling, EvoLayer-published examples, config, seeders, and tests are all available to adapt. (Note: The starter is built on the foundation of the official `laravel/react-starter-kit`.)

> **Framework Contract**: For the strict definition of what the framework manages versus what you own, see the [EvoLayer Framework Contract](https://github.com/xuple/evolayer-base/blob/main/docs/contract.md) in the upstream package.

## Features

Each bundled example surface is gated by an `EVOLAYER_BASE_EXAMPLE_*` flag in `.env`; substrate features use the `EVOLAYER_BASE_FEATURE_*` prefix. Set a flag to `false` to drop that surface's routes and sidebar entry.

| Flag                                        | What it adds                                               |
| ------------------------------------------- | ---------------------------------------------------------- |
| `EVOLAYER_BASE_EXAMPLE_MARKETING_PAGES`     | Public `/about` explainer alias (authenticated `/home` is host-owned, always on) |
| `EVOLAYER_BASE_EXAMPLE_THREAD_STUDIO`       | ThreadStudio — streaming AI compose with structured output |
| `EVOLAYER_BASE_EXAMPLE_PRD_STUDIO`          | PRD Studio — turn notes into scoped requirements           |
| `EVOLAYER_BASE_EXAMPLE_ADMIN_INBOX`         | Admin inbox for contact-form submissions                   |
| `EVOLAYER_BASE_EXAMPLE_CONTACT_AI`          | AI-assisted contact form (triage, auto-tagging)            |
| `EVOLAYER_BASE_EXAMPLE_VOICE_INPUT`         | Voice-input block                                          |
| `EVOLAYER_BASE_EXAMPLE_AI_TEXT_FIELD`       | `<AiTextField>` block — inline streaming suggestions       |
| `EVOLAYER_BASE_FEATURE_CONTACT_ATTACHMENTS` | Contact-form attachment processing (uses medialibrary)     |

## AI providers

EvoLayer Base uses the `laravel/ai` SDK for structured-output streaming. It defaults to **Gemini**, but supports a vast ecosystem including OpenAI, Anthropic, DeepSeek, Groq, xAI, Mistral, and Ollama. To enable AI features, set your provider's API key in `.env` (`GEMINI_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.), then verify structured streaming works end to end:

```bash
php artisan evolayer:ai:stream-check gemini
```

> **Provider status:** ThreadStudio's runtime-approved (directly-verified) providers are
> **Gemini** (default) and **OpenAI** — both pass `evolayer:ai:stream-check` end to end
> with the committed `laravel/ai` patch, and only these two are selectable as
> `AI_THREAD_STUDIO_PROVIDER`. Anthropic's structured-streaming path currently returns
> zero `TextDelta` events and an empty final payload, so it is
> **diagnostic-eligible but blocked for ThreadStudio runtime / pending
> re-verification** — exercise it with `evolayer:ai:smoke-test anthropic` (the
> non-streaming path passes), but it is not runtime-approved for selection.
> NVIDIA / OpenCode / OpenRouter are likewise router-backed diagnostic-eligible
> probe candidates, not runtime-approved. See [`patches/README.md`](patches/README.md)
> for the verification matrix.

## The `laravel/ai` patch

The starter ships `patches/laravel-ai-structured-streaming.patch`, applied automatically via `cweagans/composer-patches` on `composer install`. It enables structured-output streaming until upstream `laravel/ai` ships the fix. See [`patches/README.md`](patches/README.md) for the rationale and upstream-PR tracking.

If streaming misbehaves, run `php artisan evolayer:doctor` — it verifies the patch marker along with the rest of the install.

## Re-syncing the package frontend

The EvoLayer React stubs are committed so the repo clones and builds without a publish step. To pull a newer `xuple/evolayer-base` release:

```bash
composer update xuple/evolayer-base
composer evolayer:resync
```

`evolayer:resync` is manifest-safe — it updates pristine stubs, keeps host-modified ones, and skips ejected surfaces (`--force` to overwrite local edits, `--dry-run` to preview). **Do not edit files under `vendor/xuple/evolayer-base`.** Fix package internals [upstream](https://github.com/xuple/evolayer-base), then `composer update` + `composer evolayer:resync` here.

To add Base to an existing app instead, use `php artisan evolayer:install` — you don't need that command in this starter, its work is already pre-applied.

## What's pre-applied

The package publishes most of its surface, but a few edits must live in host files. These are already applied:

- **Middleware** — shares the `evolayer.base.{examples,features,brand}` Inertia prop via `EvoLayerProps::base()`.
- **User model** — adds Spatie `HasRoles` for the admin gate.
- **Sidebar** — renders enabled example pages via `useExampleNavItems()`.
- **Types** — types the `evolayer` shared prop.
- **Seeders** — seeds the AI capability ledger and admin demo user.
- **Spatie migrations** — committed with ULID-compatible morph columns for EvoLayer models.

## Social previews

Public preview defaults live in `config/site.php`, controlled by `SITE_*` and `SOCIAL_*` variables in `.env`. Public pages use `PublicLayout` / `SiteHead` for title, canonical, robots, Open Graph, X/Twitter, and JSON-LD. See [`.env.example`](.env.example) for the full set.

Two opt-in knobs (blank by default, so output is unchanged until set):

- **Local-business structured data** — set `SITE_JSONLD_TYPE` (one or more schema.org types, comma-separated) with optional `SITE_JSONLD_TELEPHONE` / `_EMAIL` / `_AREA_SERVED` / `_PRICE_RANGE` / `_SAME_AS` to emit a server-rendered business node in the JSON-LD graph.
- **Asset cache-busting** — set `SITE_ASSET_VERSION` and wrap public asset paths with the `useVersionedAsset()` hook to append a global `?v=` token, so replaced images are picked up past a CDN.

## Tooling

- `composer dev` — run server, queue, logs, and Vite together.
- `php artisan evolayer:doctor` — health-check the install.
- `npm run types:check` / `npm run build` (client + SSR) / `composer lint` / `composer test`.
- [`docs/local-dev-hosting.md`](docs/local-dev-hosting.md) — Nginx/PHP-FPM hosted-dev checklist, `tempnam()` troubleshooting, and env-driven Vite port/origin HMR guidance.

The starter is pre-wired for AI coding agents (Claude Code, Codex, OpenCode, Cursor) via [Laravel Boost](https://laravel.com/docs/boost): `AGENTS.md` / `CLAUDE.md` carry the starter-specific boundaries followed by Boost's framework guidelines, and `.mcp.json` / `.codex/config.toml` / `opencode.json` register `php artisan boost:mcp`. Skills live under `.claude/skills/` and `.agents/skills/`. **Boost is a `require-dev` dependency**; the MCP layer is only available with dev dependencies installed.

The test runner is **Pest 4** (`php artisan test`), layered on PHPUnit 12. New tests use Pest's `it()` / `test()` style (`php artisan make:test --pest {name}`); existing PHPUnit `Tests\TestCase` classes still run under Pest, so migration is opportunistic.

## Where this sits in the EvoDevOps family

EvoLayer Base is the **AI / ontology / blocks substrate**: a Laravel + Inertia + React layer that turns the [`laravel/ai`](https://github.com/laravel/ai) SDK into a structured-output streaming surface, with an `ontology.yaml`-driven event/projection model and a small block library on top. This starter is the `composer create-project` entry point for Base. The package itself is [`xuple/evolayer-base`](https://github.com/xuple/evolayer-base) under the `evolayer.base.*` config and route namespace.

Sibling EvoDevOps layers (`evolayer.commerce.*`, `evolayer.saas.*`, `evolayer.rls.*`, …) are planned as separate packages with their own starter repos following the same pattern; they will not ship inside this Base starter. `evodevops.com` is the editorial / teaching home for the family; `evodevops.com/evolayer-base/docs` is the canonical Base documentation root.

## Project Status

EvoLayer is pre-1.0. Base and the starter are free/public MIT projects published on GitHub and Packagist. See [RELEASE.md](RELEASE.md) and [CHANGELOG.md](CHANGELOG.md).

---

<p align="center">
  Built on the <a href="https://laravel.com/docs/starter-kits">Laravel React Starter Kit</a> · Licensed under <a href="LICENSE">MIT</a>
</p>
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。