内置认证流程,覆盖登录、注册和密码重置
rewire — Laravel 后台模板
作者 Recodex-ID
Rewire 是基于 Laravel 的可复用启动套件,内置认证、角色权限、博客与后台管理,适合作为内部或客户项目的基础起点。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
基于 Spatie Permission 的角色权限,新用户自动获得 staff 角色
可发布博客,支持特色图片与自动生成的缩略图转换
后台系统面板包含用户管理、媒体库、站点地图和站点设置
按角色分发的仪表盘组件,super-admin 可查看管理操作审计
内置上线检查项,如隐私与条款页面、Cookie 同意、站点地图和基础安全响应头
模板详细介绍
Rewire 是一个 Laravel 启动套件,定位为内部项目和客户项目的可复用基础。它把认证、角色权限、博客和后台管理预先搭好,让新项目从可运行的基础开始,而不是空白仓库。
功能上,认证覆盖登录、注册和密码重置;角色基于 Spatie Permission,新用户自动获得 staff 角色,admin 和 super-admin 可访问更多后台区域。博客是唯一无需重新部署即可编辑的公开内容,支持标题、摘要、正文、特色图片和发布开关,特色图片由 Spatie Media Library 管理并自动生成 thumb/card/hero 转换。系统面板面向 admin 和 super-admin,包含用户管理、站点地图查看、媒体库和站点设置;super-admin 额外拥有管理操作审计记录。每个角色有独立的仪表盘组件。
项目还内置了上线检查项,包括隐私政策与条款页面、Cookie 同意横幅、页面级 meta 与 Open Graph 标签、站点地图、动态 robots.txt、注册与忘记密码表单的蜜罐和限流、基础安全响应头以及生产环境 HTTPS 强制。测试方面使用 Pest 特性测试、Pint 格式化和 Larastan 静态分析,并接入 CI。
使用限制:角色和权限没有应用内管理界面,需要通过 tinker 或 seeder 创建;安全响应头不包含 Content-Security-Policy,因为 Livewire、Alpine 和分析脚本使用内联脚本;WebP 转换只对变更后上传的图片生效,旧图片需运行 media-library:regenerate。法律页面需要按实际业务重写,不能直接沿用。
适合你的项目吗?
适用场景
- 需要快速启动一个带认证和后台的 Laravel 内部项目
- 为客户项目搭建可复用的基础骨架,减少重复配置
- 需要博客作为可编辑公开内容,同时保留后台管理能力
- 希望项目自带测试、格式化和静态分析配置并接入 CI
适合人群
- 熟悉 Laravel 并希望以启动套件加速项目初始化的开发者
- 需要角色权限和后台管理但不想从零搭建的团队
- 接受通过 tinker 或 seeder 管理角色权限的维护者
- 计划在启动套件基础上替换品牌、法律页面和种子账号的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
默认使用 SQLite,无需先配置独立数据库服务器
- 2
可通过 laravel new 命令使用该套件,或克隆仓库后执行 composer install、npm install、迁移和填充
- 3
种子账号密码均为 password,上线前需替换
- 4
生产环境需设置 APP_ENV=production、APP_DEBUG=false,并按需配置 FORCE_HTTPS 和 TRUSTED_PROXIES
- 5
需将 schedule:run 加入 cron,以执行每日审计日志清理,保留 365 天
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 角色与权限没有应用内管理界面,必须通过 tinker 或 seeder 创建,无法在后台直接维护。
- 默认安全响应头不含 Content-Security-Policy;因 Livewire、Alpine 与分析脚本使用内联脚本,如需 CSP 须自行编写。
- WebP 转换仅对变更后上传的图片生效,旧图片需运行 media-library:regenerate 才能转换。
- 隐私政策与条款页面描述的是原部署方并点名 PT Reka Mitra Teknologi,必须按自身业务重写并请律师审阅,不能直接沿用。
- 种子账号(含默认密码 password)与落地页文案需替换后才能用于正式项目。
- Google Analytics 为可选外部服务,需在系统设置中填入 G-XXXXXXXXXX 测量 ID,且仅在访客接受 Cookie 横幅后才加载。
- 生产环境需配置 cron 执行 schedule:run,每日运行 activitylog:clean 以维持隐私政策承诺的 365 天审计日志保留期。
- 若在代理或负载均衡后部署,需配置 TRUSTED_PROXIES,否则无法识别原始协议、HTTPS 重定向会失效。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
new roles/permissions are created via tinker or a seeder, there's no in-app UI for it
README 原文
The security headers do not include a `Content-Security-Policy`, because Livewire, Alpine and the analytics snippet use inline scripts, so write one for your own deployment if you need it.
README 原文
the `WebP` conversions only apply to images uploaded after this change; run `php artisan media-library:regenerate` to convert older ones.
README 原文
**Rewrite the legal pages for your own business.**
README 原文
Replace the seeded accounts (`database/seeders/UserSeeder.php`) and the landing page copy
README 原文
Google Analytics | Optional. Enter a `G-XXXXXXXXXX` measurement ID in **System → Settings**.
README 原文
Add `* * * * * php /path/to/artisan schedule:run` to cron. It runs `activitylog:clean` daily, which enforces the 365 day audit-log retention the privacy policy promises.
README 原文
https://github.com/Recodex-ID/rewire/blob/main/LICENSEhttps://github.com/Recodex-ID/rewire/blob/main/README.mdSet to your load balancer's IPs (comma separated), or `*` if a proxy you control terminates TLS.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-08。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 88 / 100
- 技术栈
- Laravel
- 网站类型
- 后台 · 博客 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-20
- 截图检查日期
- 2026-10-08
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Laravel。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-08
查看当时使用的来源资料
SHA-256: 1908c3d3d47ecfe53c37493647c7d58e1bd20b2745cf9ef16d9e88b393c1da06
2026-10-08T05:53:33.591Z
来源文件 / 仓库# Rewire Starter Kit A reusable Laravel starter kit for internal and client projects — authentication, roles, a blog, and a back office ready to go, so every new engagement starts from a working foundation instead of a blank repo. ## Stack | | | |---|---| | PHP | 8.4 | | Laravel | 13 | | Auth | Fortify (login, registration, password reset — no 2FA/passkeys) | | Frontend | Livewire 4 + Flux UI | | Styling | Tailwind CSS v4 | | Roles | Spatie Permission | | Media | Spatie Media Library | | Quality | Pest 4, Pint, Larastan | ## Features - **Authentication** — login, registration, password reset out of the box; logging out always lands back on the login page. - **Roles & permissions** — every new user gets `staff` automatically; `admin` and `super-admin` unlock more of the back office. Built on `spatie/laravel-permission`; new roles/permissions are created via tinker or a seeder, there's no in-app UI for it. - **Blog** — the one piece of public content that's editable without a redeploy: title, excerpt, body, featured image, publish toggle, auto-generated slugs that never change on edit. The featured image runs on Spatie Media Library, with `thumb`/`card`/`hero` conversions generated automatically and a reusable `<x-media-upload>` component ready for other models. - **System panel** (`admin`/`super-admin`) — user management (list, create, change role, delete), a sitemap viewer, a media library (browse and delete any uploaded file across models), and site settings (SEO description, Google Analytics, social links, contact info). Super admins alone additionally get the audit trail of admin actions. - **Per-role dashboard** — a thin dashboard shell dispatches to a self-contained Livewire component per role (super-admin, admin, staff), each showing the stats relevant to that role. - **Branded system pages** — error pages (404, 500, ...) and transactional emails match the app's look, not the framework defaults. - **In-app docs** — a docs page inside the app with project-specific setup and architecture notes. - **Launch checklist built in** — Privacy Policy and Terms of Service pages (`/privacy`, `/terms`), a cookie consent banner that keeps Google Analytics off until the visitor accepts, per-page meta titles and descriptions with canonical URLs and Open Graph/X preview tags (a default 1200×630 preview image ships in `public/images/og-default.png`), a sitemap and a dynamic `robots.txt`, `noindex` on every signed-in and auth screen, honeypot plus rate limiting on the register and forgot-password forms, baseline security headers, and HTTPS enforcement in production. Chart.js loads only on the dashboards, and blog images are converted to WebP. - **Tests from day one** — Pest feature tests, Pint formatting, and Larastan static analysis wired into CI. ## Getting started Uses SQLite by default — no separate database server to set up first. Starting a brand new project, via the [Laravel installer](https://packagist.org/packages/recodex-id/rewire): ```bash laravel new my-app --using=recodex-id/rewire ``` Or clone it directly: ```bash git clone https://github.com/Recodex-ID/rewire.git cd rewire composer install npm install cp .env.example .env touch database/database.sqlite php artisan key:generate php artisan storage:link php artisan migrate --seed composer run dev ``` Visit `http://localhost:8000`. `composer run dev` runs the app server, queue listener, and Vite together. ### Default accounts Seeded by `database/seeders/DatabaseSeeder.php`, password `password` for all three: | Email | Role | |---|---| | `[email protected]` | super-admin | | `[email protected]` | admin | | `[email protected]` | staff | ## Quality checks ```bash php artisan test --compact vendor/bin/pint --dirty vendor/bin/phpstan analyse ``` Or `composer test`, which runs formatting, static analysis, and the full suite together — the same thing CI runs on every push. ## Reusing this for a new project 1. Update `APP_NAME` and other `.env` values for the new project. 2. Swap the brand palette in `resources/css/app.css` (`--color-brand-*`) and the logo mark in `public/images/logo.png` (256×256 is plenty; it is shown at 36 to 44 px). Regenerate `public/images/og-default.png` (1200×630) and the `public/favicon*` files to match. 3. Replace the seeded accounts (`database/seeders/UserSeeder.php`) and the landing page copy, which lives directly in `resources/views/pages/main/index.blade.php` and `resources/views/layouts/main.blade.php` (no separate landing components). 4. **Rewrite the legal pages for your own business.** `resources/views/pages/main/privacy.blade.php` and `terms.blade.php` describe this deployment, name PT Reka Mitra Teknologi as the responsible party, and carry the date they were last reviewed. Change the company details, check every statement against what your fork actually collects, and have a lawyer review them (add a governing-law clause if you need one). The footer credit line ("Built by Recodex ID") is in `layouts/main.blade.php`. 5. Update `composer.json`'s `name`/`description` if the repo is being renamed too. ### Going to production | Setting | What it does | |---|---| | `APP_ENV=production`, `APP_DEBUG=false` | Turns on HTTPS enforcement and keeps stack traces off the public site. | | `FORCE_HTTPS` | Defaults to `true` in production. Redirects http to https, generates https URLs, sends the HSTS header and marks the session cookie secure. The `/up` health check is exempt. | | `TRUSTED_PROXIES` | Set to your load balancer's IPs (comma separated), or `*` if a proxy you control terminates TLS. Without it, the redirect cannot see the original scheme behind a proxy. | | Scheduler | Add `* * * * * php /path/to/artisan schedule:run` to cron. It runs `activitylog:clean` daily, which enforces the 365 day audit-log retention the privacy policy promises. | | Contact details | Fill in the contact address, email and phone in **System → Settings**. Empty fields are hidden on the site instead of showing placeholders. | | Google Analytics | Optional. Enter a `G-XXXXXXXXXX` measurement ID in **System → Settings**. The script only loads after a visitor accepts the cookie banner. | Nothing sensitive reaches the browser: the only `VITE_` variable is the app name, and the GA measurement ID is public by design. The security headers do not include a `Content-Security-Policy`, because Livewire, Alpine and the analytics snippet use inline scripts, so write one for your own deployment if you need it. Also remember that the `WebP` conversions only apply to images uploaded after this change; run `php artisan media-library:regenerate` to convert older ones. More detail — architecture notes, where each feature lives, how to extend the landing page — is in the in-app docs at `/docs` once you're logged in. ## Contributing Commits to `main` must follow [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `chore:`, ...) — [release-please](https://github.com/googleapis/release-please) reads them to version and publish [GitHub Releases](https://github.com/Recodex-ID/rewire/releases) automatically, so every merge shows up in a changelog users can actually read. `feat:` bumps a minor version, `fix:` a patch, and `feat!:`/a `BREAKING CHANGE:` footer bumps major. ## License MIT.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

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

coreui-free-laravel-admin-template
CoreUI Free Laravel Bootstrap Admin Template
Laravel · 后台

sneat-bootstrap-html-laravel-admin-template-free
Most Powerful & Comprehensive Free Bootstrap 5 HTML Laravel Admin Dashboard Template built for developers!
Laravel · 后台

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
