Replace hand-rolled auth with Laravel Breeze (Livewire stack)

Adds the auth Breeze scaffolds that were missing before: password
reset and email verification, plus a profile page (update name/email,
change password, delete account). User now implements MustVerifyEmail
so verification is actually enforced, not just scaffolded.

This does mean accepting Tailwind v3 (postcss/tailwind.config.js)
over the v4 CSS-first setup the app started with, and Livewire drops
from ^4.3 to ^3.6.4 — both forced by Breeze/Volt's current
compatibility requirements. Restored the Instrument Sans font Breeze's
installer dropped so styling stays close to what we had.

Reconciliation, since Breeze's installer assumes a blank-slate app:
- Deleted the hand-rolled Login/Register Livewire components/views/
  test — superseded by Breeze's Volt-based auth pages
  (resources/views/livewire/pages/auth/*), which also cover
  forgot-password, reset-password, verify-email, and confirm-password.
- Deleted Breeze's own default welcome/dashboard views and its
  separate app layout + nav component — kept our existing
  components/layouts/app.blade.php as the one real app layout, used
  Breeze's minimal layouts/guest.blade.php only for the auth pages.
- Rewrote routes/web.php merging our routes (home, sites, discover)
  with routes/auth.php; replaced every hardcoded route('dashboard')
  reference (5 Blade files plus, easy to miss, a plain PHP controller
  VerifyEmailController) with sites.index.
- Logout: Breeze's Actions\Logout::__invoke() returns void, so wired
  directly as a route it silently no-ops instead of redirecting;
  fixed with a thin closure that calls it then redirects.
- Fixed Breeze's own generated tests (Auth/AuthenticationTest,
  RegistrationTest, EmailVerificationTest, PasswordConfirmationTest)
  where they assumed the deleted dashboard route/nav component.

Verified: full suite (28 tests, including Breeze's Registration/
Authentication/PasswordReset/PasswordConfirmation/PasswordUpdate/
EmailVerification/Profile tests plus our own GuestPreviewTest) passes
against the huginn_testing MySQL database. Also smoke-tested for real:
all key pages return 200, /profile redirects guests to /login, guest
preview capping still works, and a real password-reset email was
generated and logged with correct branding and a working link.
This commit is contained in:
m105
2026-07-25 15:36:43 +03:00
parent f5c9129774
commit 6435bccb20
54 changed files with 2878 additions and 321 deletions
Generated
+139 -7
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "15d459f8e83fdae144d5144f811f3d68",
"content-hash": "9d0f5940f221f92d48c50f0f3d7cb3c9",
"packages": [
{
"name": "brick/math",
@@ -2034,16 +2034,16 @@
},
{
"name": "livewire/livewire",
"version": "v4.3.3",
"version": "v3.8.2",
"source": {
"type": "git",
"url": "https://github.com/livewire/livewire.git",
"reference": "8021f2561865c4c297a3bfca37212a99034377e7"
"reference": "e77fce60d0615d68dc6b8fafe98a6739d9752a24"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/livewire/zipball/8021f2561865c4c297a3bfca37212a99034377e7",
"reference": "8021f2561865c4c297a3bfca37212a99034377e7",
"url": "https://api.github.com/repos/livewire/livewire/zipball/e77fce60d0615d68dc6b8fafe98a6739d9752a24",
"reference": "e77fce60d0615d68dc6b8fafe98a6739d9752a24",
"shasum": ""
},
"require": {
@@ -2098,7 +2098,7 @@
"description": "A front-end framework for Laravel.",
"support": {
"issues": "https://github.com/livewire/livewire/issues",
"source": "https://github.com/livewire/livewire/tree/v4.3.3"
"source": "https://github.com/livewire/livewire/tree/v3.8.2"
},
"funding": [
{
@@ -2106,7 +2106,78 @@
"type": "github"
}
],
"time": "2026-06-27T03:16:11+00:00"
"time": "2026-06-27T03:14:20+00:00"
},
{
"name": "livewire/volt",
"version": "v1.11.1",
"source": {
"type": "git",
"url": "https://github.com/livewire/volt.git",
"reference": "c921edbc4ff2c90e2ca1e87a9e7358e253e33b29"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/volt/zipball/c921edbc4ff2c90e2ca1e87a9e7358e253e33b29",
"reference": "c921edbc4ff2c90e2ca1e87a9e7358e253e33b29",
"shasum": ""
},
"require": {
"laravel/framework": "^10.38.2|^11.0|^12.0|^13.0",
"livewire/livewire": "^3.6.1|^4.0",
"php": "^8.1"
},
"require-dev": {
"laravel/folio": "^1.1",
"orchestra/testbench": "^8.36|^9.15|^10.8|^11.0",
"pestphp/pest": "^2.9.5|^3.0|^4.0",
"phpstan/phpstan": "^1.10|^2.1"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Livewire\\Volt\\VoltServiceProvider"
]
},
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"files": [
"functions.php"
],
"psr-4": {
"Livewire\\Volt\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
},
{
"name": "Nuno Maduro",
"email": "nuno@laravel.com"
}
],
"description": "An elegantly crafted functional API for Laravel Livewire.",
"homepage": "https://github.com/livewire/volt",
"keywords": [
"laravel",
"livewire",
"volt"
],
"support": {
"issues": "https://github.com/livewire/volt/issues",
"source": "https://github.com/livewire/volt"
},
"time": "2026-07-22T03:45:31+00:00"
},
{
"name": "monolog/monolog",
@@ -6323,6 +6394,67 @@
},
"time": "2026-04-29T18:32:34+00:00"
},
{
"name": "laravel/breeze",
"version": "v2.4.2",
"source": {
"type": "git",
"url": "https://github.com/laravel/breeze.git",
"reference": "4f20e7b2cc8d25daa85d8647241a89c8e0930305"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/breeze/zipball/4f20e7b2cc8d25daa85d8647241a89c8e0930305",
"reference": "4f20e7b2cc8d25daa85d8647241a89c8e0930305",
"shasum": ""
},
"require": {
"illuminate/console": "^11.0|^12.0|^13.0",
"illuminate/filesystem": "^11.0|^12.0|^13.0",
"illuminate/support": "^11.0|^12.0|^13.0",
"illuminate/validation": "^11.0|^12.0|^13.0",
"php": "^8.2.0",
"symfony/console": "^7.0|^8.0"
},
"require-dev": {
"laravel/framework": "^11.0|^12.0|^13.0",
"orchestra/testbench-core": "^9.0|^10.0|^11.0",
"phpstan/phpstan": "^2.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Laravel\\Breeze\\BreezeServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Laravel\\Breeze\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"description": "Minimal Laravel authentication scaffolding with Blade and Tailwind.",
"keywords": [
"auth",
"laravel"
],
"support": {
"issues": "https://github.com/laravel/breeze/issues",
"source": "https://github.com/laravel/breeze"
},
"time": "2026-05-14T16:54:25+00:00"
},
{
"name": "laravel/pail",
"version": "v1.2.7",