在官方 Laravel React 启动器基础上扩展,保留其约定,Laravel 文档用法仍然适用
tachi-kit — Laravel 启动器模板
作者 monciego
Tachi Kit 是一个基于 Laravel、React 与 Inertia 的启动器,在官方 Laravel React 启动器基础上加入认证、角色权限、用户管理与活动日志,适合需要快速搭建后台管理型应用的场景。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
认证功能覆盖登录、注册、邮箱验证、密码重置、双因素认证与 passkey,并限制非活跃账号登录
角色权限基于 spatie/laravel-permission,内置 superadmin、admin、user 三种角色,支持自定义角色与策略保护
用户管理提供由服务端驱动的数据表格,支持搜索、分面筛选、排序、分页、批量删除与账号状态
活动日志记录用户、角色权限、密码变更与登录登出事件,默认仅 activity.view 权限角色可见,超 365 天记录每日清理
类型贯穿前后端,使用 Wayfinder 路由助手与由 PHP 枚举生成的 TypeScript 角色权限常量,并配置 PHPStan level 7 与 GitHub Actions 质量门禁
模板详细介绍
Tachi Kit 是 monciego 维护的 Laravel + React + Inertia 启动器,定位为「有主见的」起始套件,在官方 Laravel React starter kit 之上扩展了后台管理常用模块。它保留官方启动器的约定,因此 Laravel 文档中的用法仍然适用。
功能方面,它提供登录、注册、邮箱验证、密码重置、双因素认证与 passkey(基于 Laravel Fortify),并限制非活跃账号登录;角色与权限使用 spatie/laravel-permission,内置 superadmin、admin、user 三种角色,支持自定义角色,并通过策略保护 superadmin 不被编辑、停用或删除。用户管理提供由服务端驱动的数据表格,支持搜索、分面筛选、排序、分页、批量删除与账号状态。仪表盘包含统计卡片、月度注册图表与最近用户表格,以 deferred props 加载。活动日志基于 spatie/laravel-activitylog,记录用户、角色权限、密码变更以及登录、登出与失败登录,默认仅拥有 activity.view 权限的角色可见,超过 365 天的记录由调度器每日清理。个人资料设置涵盖姓名、邮箱、头像上传、密码、2FA、passkey 与外观(浅色/深色/跟随系统)。类型贯穿前后端,使用 Wayfinder 路由助手、由 PHP 枚举生成的 TypeScript 角色与权限常量,并以 PHPStan level 7 检查。质量门禁包括 Pest、Pint、PHPStan、oxlint、格式化与 tsc,均在 GitHub Actions 中运行。
技术栈为 Laravel、React、Inertia、Tailwind CSS、shadcn/ui 与 Pest。运行环境要求 PHP 8.4+ 与 Composer、Node.js 22+ 与 npm,数据库默认 SQLite,也可使用 MySQL。安装可通过 Laravel 安装器或 Composer 创建项目,随后安装前端依赖并运行 composer dev 启动应用与 Vite。生产环境播种仅创建角色与权限,不生成演示账号,需通过 php artisan tachi:superadmin 创建首个超级管理员。
配置项包括 ALLOWS_PUBLIC_REGISTRATION(默认 false,关闭时 /register 返回 404,由管理员在用户页创建账号)与 AVATAR_DISK(默认 public,生产可改用 s3 等公共云盘)。套件级设置位于 config/tachi.php。新增权限需在 app/Enums/Permission.php 添加枚举、运行 php artisan tachi:types 重新生成前端类型、播种并更新策略与前端调用;若生成文件过期,测试会失败,CI 可捕获遗漏步骤。
许可方面,该仓库采用 MIT 许可,允许免费使用、修改、商用与分发,分发时需保留版权与许可声明;演示图片、字体、图标等第三方素材需单独核对许可,域名、托管、数据库等外部服务可能另行收费。
适合你的项目吗?
适用场景
- 需要快速搭建带认证、角色权限与用户管理后台的 Laravel + React 项目
- 希望基于官方 Laravel React 启动器扩展,但不想从零实现用户管理与活动日志
- 需要为管理后台提供仪表盘统计、月度注册图表与最近用户表格
- 需要记录用户、角色权限、密码变更与登录登出等审计事件,并按权限控制可见范围
- 需要在前后端之间共享类型安全的角色与权限常量,并接入 CI 质量检查
适合人群
- 熟悉 Laravel 与 React、希望跳过后台管理样板代码的开发者
- 需要内置角色权限与用户管理的中后台项目
- 需要活动日志与审计追踪的管理系统
- 接受 SQLite 默认、也可切换 MySQL 的 Laravel 项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
环境要求 PHP 8.4+ 与 Composer、Node.js 22+ 与 npm,数据库默认 SQLite,也可使用 MySQL
- 2
可通过 laravel new my-app --using=monciego/tachi-kit 或 composer create-project monciego/tachi-kit my-app 创建项目
- 3
创建后需运行 npm install 安装前端依赖,再用 composer dev 同时启动应用与 Vite
- 4
生产环境播种仅创建角色与权限,不生成演示账号,需运行 php artisan tachi:superadmin 创建首个超级管理员
- 5
使用 MySQL 时需在迁移前修改 .env 中的 DB_CONNECTION、DB_HOST、DB_PORT、DB_DATABASE、DB_USERNAME 与 DB_PASSWORD
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 该项目基于官方 Laravel React starter kit 构建并沿用其约定,因此使用方式与限制需同时遵循上游启动器的约定。
- 运行环境要求 PHP 8.4 及以上版本与 Composer,低于该版本的环境无法使用。
- 前端构建要求 Node.js 22 及以上版本与 npm。
- 数据库仅支持默认的 SQLite 或 MySQL,其他数据库未获支持。
- 生产环境建议将头像存储切换为 s3 等公共云盘,可能涉及外部云存储服务及其费用。
- 生产环境播种不会创建演示账号,需另行运行 php artisan tachi:superadmin 创建首个超级管理员。
- 活动日志默认仅超级管理员可见,其他角色需手动授予 activity.view 权限。
- 活动日志中超过 365 天的记录会被调度器每日清理,无法长期保留。
- 默认关闭公开注册,此时注册页返回 404,账号只能由管理员在用户页创建。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
It is built on top of the official [Laravel React starter kit](https://github.com/laravel/react-starter-kit) and keeps its conventions
README 原文
PHP 8.4+ and Composer
README 原文
Node.js 22+ and npm
README 原文
SQLite (the default) or MySQL
README 原文
Use `s3` (or another public cloud disk) in production.
README 原文
In production, `php artisan db:seed --force` only seeds roles and permissions; no demo accounts are created.
README 原文
Only superadmins can view the activity log by default.
README 原文
entries older than 365 days are pruned daily by the scheduler.
README 原文
https://github.com/monciego/tachi-kit/blob/main/LICENSEhttps://github.com/monciego/tachi-kit/blob/main/README.mdWhen off, `/register` returns 404 and sign-up links are hidden; admins create accounts from the Users page.
README 原文
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: 81e138b068b1bd61b81166c8b5cfd9adbaf684390b087283764e978c2f2ede7d
2026-10-02T14:39:32.679Z
来源文件 / 仓库# Tachi Kit **Cut through boilerplate.** Tachi Kit is an opinionated Laravel + React + Inertia starter kit with authentication, role-based permissions, user management and more. Skip the boring stuff and focus on what makes your app unique. It is built on top of the official [Laravel React starter kit](https://github.com/laravel/react-starter-kit) and keeps its conventions, so everything in the Laravel docs still applies. 📖 **Documentation:** [tachi-kit-docs.vercel.app](https://tachi-kit-docs.vercel.app/docs/) ## What's included - **Authentication**: login, registration, email verification, password reset, two-factor authentication and passkeys (Laravel Fortify). Inactive accounts can't sign in. - **Roles & permissions**: [spatie/laravel-permission](https://spatie.be/docs/laravel-permission) with built-in `superadmin`, `admin` and `user` roles, custom roles, and policies that protect superadmins from being edited, deactivated or deleted. - **User management**: server-driven data tables with search, faceted filters, sorting, pagination, bulk delete and account status. - **Dashboard**: stat cards, a monthly sign-ups chart and a recent users table, loaded as deferred props. - **Activity log**: a searchable audit trail of user changes, role and permission changes, password changes, and sign-ins, sign-outs and failed sign-ins ([spatie/laravel-activitylog](https://spatie.be/docs/laravel-activitylog)). Visible to roles with the `activity.view` permission (superadmins by default); entries older than 365 days are pruned daily by the scheduler. - **Profile settings**: name, email, avatar upload, password, 2FA, passkeys and appearance (light/dark/system). - **Typed end to end**: [Wayfinder](https://github.com/laravel/wayfinder) route helpers, TypeScript role and permission constants generated from PHP enums, and PHPStan at level 7. - **Quality gates**: Pest, Pint, PHPStan, oxlint, formatting and `tsc`, all run in GitHub Actions. **Stack:** Laravel 13, React 19, Inertia 3, Tailwind CSS 4, shadcn/ui, Pest. ## Requirements - PHP 8.4+ and Composer - Node.js 22+ and npm - SQLite (the default) or MySQL ## Getting started **1. Create your app** with the Laravel installer: ```bash laravel new my-app --using=monciego/tachi-kit ``` Or with Composer: ```bash composer create-project monciego/tachi-kit my-app ``` Either one creates `.env`, a SQLite database, runs the migrations, seeds the roles and permissions, and links storage for avatars. **2. Install the frontend:** ```bash cd my-app && npm install ``` **3. Start the dev server** (the app and Vite together): ```bash composer dev ``` Open [http://localhost:8000](http://localhost:8000). To explore with demo accounts, seed them first: ```bash php artisan db:seed ``` Working from a clone of this repository instead? One command installs everything, creates `.env`, migrates, links storage and builds the assets: ```bash composer setup ``` See the [installation guide](https://tachi-kit-docs.vercel.app/docs/installation/) for details. ### Using MySQL SQLite works out of the box. To use MySQL, update `.env` before migrating: ```dotenv DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=tachikit DB_USERNAME=root DB_PASSWORD= ``` ### Demo accounts Outside production, seeding creates these accounts plus 50 members spread over the past year. The password for all of them is `password`. | Email | Role | | ---------------------------- | ---------- | | `[email protected]` | superadmin | | `[email protected]` | superadmin | | `[email protected]` | admin | | `[email protected]` | admin | ### Production In production, `php artisan db:seed --force` only seeds roles and permissions; no demo accounts are created. Create your first account with: ```bash php artisan tachi:superadmin ``` It asks for a name, email and password (or accepts `--name`, `--email` and `--password`). ## Configuration | Variable | Default | Description | | ---------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `ALLOWS_PUBLIC_REGISTRATION` | `false` | Allow anyone to sign up. When off, `/register` returns 404 and sign-up links are hidden; admins create accounts from the Users page. | | `AVATAR_DISK` | `public` | Filesystem disk for avatars. Use `s3` (or another public cloud disk) in production. The `public` disk needs `php artisan storage:link`. | Kit-level settings live in `config/tachi.php`. ## Roles & permissions | Role | Access | | ------------ | ----------------------------------------------------------------------------------------------------------------- | | `superadmin` | Everything. Hidden from non-superadmins, can't be deleted or deactivated, and can't be combined with other roles. | | `admin` | Manage users (view, create, edit, delete, change status). | | `user` | Default role for new sign-ups. No management access. | Only superadmins can view the activity log by default. Grant `activity.view` to another role from the Roles page to share it; superadmin activity stays hidden from non-superadmins. System roles can't be renamed or deleted. Custom roles can be created from the Roles page. ### Adding a permission 1. Add a case (and its label) to `app/Enums/Permission.php`, e.g. `case PostsPublish = 'posts.publish';`. 2. Regenerate the frontend types: `php artisan tachi:types`. 3. Seed it: `php artisan db:seed --class=RolePermissionSeeder` (grant it to `admin` there if needed). 4. Check it in a policy with `$user->checkPermissionTo(Permission::PostsPublish->value)`, and in React with `can(PERMISSIONS.POSTS_PUBLISH)` from `usePermissions()`. A test fails if the generated file is out of date, so CI catches a forgotten step 2. ## Commands | Command | Description | | -------------------------------------------- | -------------------------------------------------------------------- | | `composer dev` | Start the app and Vite together (`php artisan dev`). | | `composer test` | Pint, PHPStan and the Pest suite. | | `composer ci:check` | Everything CI runs (adds `npm run check` and `npm run types:check`). | | `php artisan test --filter="name"` | Run a single test. | | `npm run check:fix` | Fix lint and formatting issues in the frontend. | | `php artisan wayfinder:generate --with-form` | Regenerate route helpers (always pass `--with-form`). | | `php artisan tachi:types` | Regenerate role and permission constants for TypeScript. | | `php artisan tachi:superadmin` | Create a superadmin account. | ## License Tachi Kit is open-source software licensed under the MIT license.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

sage
WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and block editor support
Laravel · 启动器

wave
Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰
Laravel · SaaS

filament-starter
A beautiful starting point for your next TALL stack project using Filament. ⚡
Laravel · 启动器

electrik
Laravel SaaS starter kit: auth, teams, Stripe billing, and Slate 3 — Composer package for Laravel 12
Laravel · SaaS

php-saas
The everything-included starter kit for your next idea
Laravel · SaaS

filament-jetstream
A Laravel starter kit built with Filament inspired by Jetstream.
Laravel · 启动器
