ADR 003 — The Filament panel is the only UI

Context

The application had two back-office interfaces:

/web was no longer used or updated, but it still cost something:

A few things existed only there:

Decision

  1. /web is removed. That covers its routes, controllers, form requests, Livewire components, Blade views, front-end bundle and tests. The Filament panel at /admin is the application’s only UI.
  2. / redirects to /admin. /login redirects to the panel’s login page, because Laravel’s guest redirects (the authentication exception handler, and the permission and role middleware) go to the route named login.
  3. Fortify stays, without routes. The panel’s authentication is built on it:
    • its pages and the profile page call Fortify’s actions (CreateNewUser, UpdateUserPassword, UpdateUserProfileInformation, and the two-factor actions);
    • the two-factor challenge and the mobile API’s two-factor step use its TwoFactorAuthenticationProvider;
    • User uses its TwoFactorAuthenticatable trait.

    Fortify serves no route (Fortify::ignoreRoutes()), and its features list keeps only two-factor authentication. laravel/fortify is required directly, since composer.json used to get it only through Jetstream.

  4. Jetstream goes. Once its pages were gone it provided only the profile-photo trait, a delete-user action and its service provider. The panel’s profile page replaces all three.
  5. What only /web offered moves into the panel:
    • Registration: a Filament page, open only while the self_registration_enabled setting is on. It doesn’t sign the new user in.
    • E-mail verification: a route at /admin/email-verification/verify/{id}/{hash}, outside the panel’s authentication. A self-registered user verifies before an administrator approves them, and User::canAccessPanel() turns away anyone unverified or unapproved. The signature and the hash of the address prove the link. Every verification message points there.
    • The login page tells the owner of an unverified account (sending a new link) or of an account awaiting approval what is missing.
    • API tokens: an API Tokens page, reached from the profile, creates, lists and revokes personal access tokens.
    • The self-registration setting opens to manage settings as well as manage users, matching both interfaces’ former gates.

Consequences

References