集成 Livewire 与 Mary UI 组件库,搭配 Tailwind CSS 和 DaisyUI 构建界面
mary-ui-starter-kit — Laravel 启动器模板
作者 lauroguedes
基于 Laravel 的 Mary UI 启动器,集成 Livewire、Mary UI 组件与完整认证、用户管理、角色权限及演示模式。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
内置完整认证流程:登录、注册、密码重置、邮箱验证与密码确认
提供用户管理仪表盘,支持 CRUD、状态管理、搜索筛选与头像上传裁剪
通过 Spatie Laravel Permission 实现角色与权限系统及中间件检查
集成 Laravel Socialite 的 Google OAuth 登录,支持账号关联与自动创建用户
内置演示模式,支持定时重置数据、轮换公开密码与访客级沙箱隔离
模板详细介绍
这是一个 Laravel 启动器项目,前端使用 Livewire 与 Mary UI 组件库,样式基于 Tailwind CSS 和 DaisyUI,图标使用 Blade Heroicons 与 Font Awesome。项目内置完整的认证系统,包括登录、注册、密码重置、邮箱验证与密码确认,并提供用户资料管理和头像上传(支持 Cropper.js 裁剪)。
用户管理部分提供后台仪表盘,支持用户的增删改查、状态管理(Active、Inactive、Suspended)、搜索与筛选,以及头像自动清理。权限方面集成 Spatie Laravel Permission,实现角色与权限的分配和中间件检查。社交登录通过 Laravel Socialite 接入 Google OAuth,支持账号关联与自动创建用户,并预留了扩展其他 OAuth 提供者的结构。
项目还包含一个演示模式,由 lauroguedes/laravel-demo-mode 提供,支持按 cron 表达式或预设周期重置数据、轮换公开的管理员密码、限制公开账号被编辑、禁止超级管理员登录,并提供 demo:doctor 命令检查配置。在 scoped 沙箱模式下,用户表通过 BelongsToSandbox trait 和 demo_sandbox_id 列实现访客隔离,每位访客只能看到种子账号和自己创建的账号。
开发环境默认使用 SQLite,测试基于 Pest,包含并行运行、Test Impact Analysis 和分片配置。代码质量工具包括 Pint 和 Rector,调试工具包括 LaraDumps 和 Laravel Pail,开发服务器通过 Concurrently 同时启动多个进程。项目采用 MIT 许可,仓库中提供了演示站点。
适合你的项目吗?
适用场景
- 需要快速搭建带认证与用户管理后台的 Laravel 项目
- 希望使用 Livewire 与 Mary UI 组件库构建交互式界面的场景
- 需要角色权限控制与 Google 社交登录的 Web 应用
- 需要对外提供可公开访问的演示环境,并希望自动重置数据
适合人群
- 熟悉 Laravel 与 Livewire 的开发者
- 需要现成认证与用户管理基础的后台项目
- 希望以 MIT 许可自由修改和商用的团队
- 需要演示模式来展示产品功能的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
环境要求 PHP 8.4+、Node.js 22+、Composer 与 SQLite
- 2
可通过 laravel new 或 composer create-project 安装,也可克隆仓库后执行 composer install
- 3
复制 .env.example 为 .env 并生成应用密钥,运行迁移与种子数据
- 4
前端依赖使用 npm 或 yarn 安装,开发时运行 php artisan serve 与 npm run dev
- 5
启用演示模式前需运行 php artisan demo:doctor 检查配置,并注意 DEMO_MODE 会允许重置数据库
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用 Google 社交登录需自行在 Google 开发者平台创建 OAuth 应用并配置客户端 ID 与密钥,属于外部服务依赖,需遵守 Google 的相关条款。
- 演示模式依赖第三方包 lauroguedes/laravel-demo-mode,该包为独立项目,其许可与维护状态需单独确认。
- 启用 DEMO_MODE 后 demo:reset 会清空数据库,仅可用于可丢弃数据的演示环境,切勿在保存重要数据的安装上开启。
- 演示模式下超级管理员无法登录且没有权限绕过,正式使用前需关闭演示模式。
- 演示模式中公开账号不可编辑,无法修改其资料或密码。
- 演示模式会轮换并公开管理员账号密码,该账号凭据对访问者可见。
- 使用 Pest 的 Test Impact Analysis 需安装 pcov 或 Xdebug 覆盖率驱动,否则会退化为运行完整测试套件。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
**Google OAuth integration** for social login
README 原文
**Demo Mode** Powered by [lauroguedes/laravel-demo-mode](https://github.com/lauroguedes/laravel-demo-mode).
README 原文
`DEMO_MODE=true` allows `demo:reset` to drop the database.
README 原文
**Super-admin cannot sign in** and gets no gate bypass
README 原文
**The published account cannot be edited**, so one visitor cannot lock out the next
README 原文
**Rotating published password** for the admin account, filled into the login form
README 原文
https://github.com/lauroguedes/mary-ui-starter-kit/blob/main/LICENSEhttps://github.com/lauroguedes/mary-ui-starter-kit/blob/main/README.md**Tia** (`--tia`) needs a coverage driver (`pcov` or Xdebug). Without one Pest prints a notice and runs the full suite instead.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 79 / 100
- 技术栈
- Laravel
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-26
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Laravel。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 6e67c5fe98d1cad3639489a1d4671c3f9d6a2711c88730f2be4f0a493c69b2da
2026-10-02T14:53:09.417Z
来源文件 / 仓库# Mary UI Starter Kit 🚀 <div align="center"> A **modern, production-ready Laravel starter kit** featuring **Livewire 4** and **Mary UI**. Build beautiful web applications with a complete authentication system, user management, and developer-friendly tooling. [](https://laravel.com) [](https://php.net) [](https://livewire.laravel.com) [](https://mary-ui.com) [](https://pestphp.com) [](LICENSE) --- [](https://packagist.org/packages/lauroguedes/mary-ui-starter-kit) [](https://packagist.org/packages/lauroguedes/mary-ui-starter-kit) [](https://forge.laravel.com/lauro-guedes-q58/graceful-silence-fzg/3022898) </br>  </div> ## ✨ Features ### 🎨 **Frontend Stack** - **Livewire 4.x** for reactive components with improved performance - **Mary UI 2.x** - Beautiful, accessible UI components - **Tailwind CSS 4.x** + **DaisyUI v5** for styling - **Blade Heroicons and Font Awesome 7** icons integration - **Vite 8** for lightning-fast asset bundling - **Live version badges** on the welcome page, read from the running app and `composer.lock` ### 🔐 **Authentication & User Management** - Complete authentication system (login, registration, password reset) - Email verification with resend functionality - Password confirmation for sensitive operations - User profile management with avatar uploads - **User management dashboard** with full CRUD operations - **User status management** (Active, Inactive, Suspended) - **Advanced filtering and search** capabilities - **Avatar management** with automatic cleanup - **Google OAuth integration** for social login - **Roles & Permissions system** powered by Spatie Laravel Permission - **Role-based access control** with granular permission management - **User role assignment** and permission checking middleware ### 🔗 **OAuth Socialite Integration** - **Laravel Socialite** integration with extensible provider system - **Google OAuth** authentication out of the box - **Social account linking** to existing user accounts - **Automatic user creation** for new social logins - **Extensible architecture** for adding new OAuth providers - **Secure token handling** and user data synchronization ### 🎭 **Demo Mode** Powered by [lauroguedes/laravel-demo-mode](https://github.com/lauroguedes/laravel-demo-mode). - **Scheduled data reset** on any cron expression, or `hourly`/`daily`/`weekly`/`monthly` - **Rotating published password** for the admin account, filled into the login form - **The published account cannot be edited**, so one visitor cannot lock out the next - **Super-admin cannot sign in** and gets no gate bypass - **`demo:doctor`** audits the configuration and exits non-zero on anything that would destroy data or publish a secret - **Visual indicator** that counts down from the schedule the scheduler actually runs - **Per-visitor isolation** on the Users screen — each visitor sees the seeded accounts plus the ones they made, and a button that clears only their own ### 🏗️ **Architecture & Developer Experience** - **Laravel 13.x** with PHP 8.4+ support - **SQLite** database by default (easy local setup) - **Pest 5 testing framework** with 230+ comprehensive tests, running in parallel - **Code quality tools**: Pint (formatting), Rector (refactoring) - **Debugging tools**: LaraDumps, Laravel Pail - **Development workflow** with Concurrently for multi-process dev server - **OAuth Socialite Integration** with extensible architecture for new oauth providers ### 🧪 **Testing Coverage** - Complete test coverage for authentication flows - User management CRUD operations testing - Roles and Permissions management CRUD operations testing - Demo mode functionality testing - File upload and avatar management testing - Form validation and error handling - Database cleanup and file storage testing ### 📁 **File Management** - Avatar upload with cropping support (Cropper.js) - Automatic file cleanup on user deletion - File validation (type, size) - Storage testing with fake disks ## 🚀 Quick Start ### Prerequisites - **PHP 8.4+** (Laravel 13 needs 8.3+, Pest 5 raises the floor to 8.4) - **Node.js 22+** - **Composer** - **SQLite** (included with PHP) ### Installation ```bash # Install via Laravel Installer laravel new my-app --using=lauroguedes/mary-ui-starter-kit # or Composer composer create-project lauroguedes/mary-ui-starter-kit my-app # (Optional) Generate fake data for testing php artisan db:seed # Default user user: [email protected] pw: secret ``` Clone the repository manually: ```bash # Clone the repository git clone https://github.com/lauroguedes/mary-ui-starter-kit cd mary-ui-starter-kit # Install PHP dependencies composer install # Copy environment file and generate app key cp .env.example .env php artisan key:generate # Set up the database php artisan migrate --seed # Install frontend dependencies npm install # or if you use Yarn yarn # Run the development server php artisan serve # In a separate terminal npm run dev # or yarn dev ``` ### Development Workflow For an enhanced development experience with hot reloading: ```bash # Start all development services (server, queue, logs, vite) composer dev ``` Visit [http://localhost:8000](http://localhost:8000) to view your application. This runs: - Laravel development server - Queue worker - Log monitoring (Pail) - Vite dev server with hot reload ## 🧪 Testing The suite runs on **Pest 5** and is parallel-safe, which takes a full run from ~40s down to ~9s. ```bash # Run the whole suite in parallel (the default) composer test # Rerun only what recent changes touched (Test Impact Analysis) composer test:tia # Enforce the 80% coverage gate composer test:coverage # Refresh the time-balanced shard timings after adding or removing tests composer test:shards ``` Or call Pest directly: ```bash ./vendor/bin/pest --parallel ./vendor/bin/pest --shard=1/2 --parallel ``` ### Notes on the Pest 5 features - **Parallel** is the default. Anything that writes to shared state outside the database must stay process-local — that is why `phpunit.xml` sets `APP_MAINTENANCE_DRIVER=array`, so `demo:reset` calling `artisan down` cannot put *other* test processes into maintenance mode. - **Tia** (`--tia`) needs a coverage driver (`pcov` or Xdebug). Without one Pest prints a notice and runs the full suite instead. - **Time-balanced sharding** reads `tests/.pest/shards.json`, which is committed so CI shards stay stable. CI runs two shards per PHP version. ## 🔧 Customization Key environment variables for customization: ```env # Appearance settings APP_LAYOUT=sidebar # Options: sidebar, header LOGIN_LAYOUT=card # Options: card, simple, split # Demo mode settings — see config/demo.php for every key, documented inline DEMO_MODE=false # Turn this installation into a public demonstration DEMO_RESET_SCHEDULE=hourly # A cron expression, or hourly/daily/weekly/monthly [email protected] # The account whose password is published and rotated DEMO_CREDENTIALS_STORE=file # Where that password is kept: file, cache or null DEMO_SANDBOX=scoped # shared | scoped — see "Per-visitor isolation" below ``` > [!WARNING] > `DEMO_MODE=true` allows `demo:reset` to drop the database. Run > `php artisan demo:doctor` before the first scheduled reset, and never turn it on > for an installation holding anything you want to keep. #### Per-visitor isolation With `DEMO_SANDBOX=scoped`, each visitor gets the fifty-three seeded accounts plus whatever they create. The Users screen is a list everybody adds to, which is the one case where a shared demo falls apart — the first visitor's test accounts are the second visitor's clutter — so `App\Models\User` carries the package's `BelongsToSandbox` trait and a nullable `demo_sandbox_id` column. The identifier lives in the session. Rows the seeder made carry none, so they belong to everybody, which is what keeps the demo populated. The bar's reset button then reads **Clear what you created** and deletes only that visitor's rows; the scheduled reset still rebuilds the whole thing. Roles and permissions stay shared on purpose: they are part of what the kit demonstrates, not something a visitor should fork. Two other things follow from sandboxing the authentication model — `unique:users,email` is query-builder validation and sees every sandbox, so two visitors cannot register the same address, and logging out does not end a sandbox (the reset button is how a visitor gets a clean slate). Set `DEMO_SANDBOX=shared` to turn all of it off; the trait and the column then do nothing at all. `demo:doctor` warns if the models stay marked while the driver does not agree. ## 🤝 Contributing We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details. ### Development Setup 1. Fork the repository 2. Create a feature branch: `git checkout -b feature/amazing-feature` 3. Make your changes and add tests 4. Run the test suite: `composer test` 5. Commit your changes: `git commit -m 'Add amazing feature'` 6. Push to the branch: `git push origin feature/amazing-feature` 7. Open a Pull Request ### Code Quality We maintain high code quality standards: ```bash # Format code ./vendor/bin/pint # Refactor code ./vendor/bin/rector # Run tests composer test ``` ## 📋 Roadmap - [x] **Role-based permissions system** ✅ - [x] **Demo mode for showcasing** ✅ - [ ] **Advanced Log and Audit** - [ ] **Multi-tenant support** - [ ] **Advanced notification system** - [ ] **Dashboard analytics** - [ ] **API integration with Laravel Sanctum** ## 🆘 Support - **Documentation**: [Mary UI Docs](https://mary-ui.com) - **Issues**: [GitHub Issues](https://github.com/lauroguedes/mary-ui-starter-kit/issues) ## 📝 License This project is open-sourced software licensed under the [MIT license](LICENSE). --- <div align="center"> **Built with ❤️ by [Lauro Guedes](https://lauroguedes.dev)** **⭐ Star this repository if it helped you!** </div>
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

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 · 启动器
