Architecture

The Web App Template is a Laravel 12 application whose interface is a single Filament 4 panel. Filament auto-discovers resources and pages, authorization is permission-based through Spatie Permissions and model policies, and operational concerns such as audit logging, email logging, health checks, and backups are configured out of the box. The only public web route redirects to the panel.

Overview

  • Filament Panel — The app panel is defined in AppPanelProvider at path app, with login, registration, and a custom profile page. Resources, pages, and widgets are discovered from app/Filament.
  • Permission-Driven Authorization — Policies delegate to <Model>.<ability> permissions, and Super Admin bypasses checks through Gate::before.
  • Audit Trail — The User model uses LogsActivity, logging dirty name and email changes.
  • Communication Logs — A mail-sent listener stores every outgoing email, and SMS messages are sent by a queued job and logged.
  • Operations — Spatie Health checks, Spatie Backup schedules, and Sentry are configured by default. A Horizon health check is registered, but laravel/horizon is not a dependency of the template.
  • Optional Demo Mode — A Demo support class and two Artisan commands turn the app into a resettable public demo.

Modules

Models

app/Models/

User (Billable, HasRoles, LogsActivity), Role, Permission, Activity, Email, Sms.

Filament Resources

app/Filament/Resources/

UserResource, RoleResource, ActivityResource, EmailResource, SmsResource, each split into Pages, Schemas, and Tables classes.

Filament Pages

app/Filament/Pages/ and app/Filament/Auth/

HealthCheckResults, ViewLog, and the EditProfile page that extends Filament's profile page.

Policies

app/Policies/

AbstractPolicy plus one policy per model: User, Role, Permission, Activity, Email, Sms.

Providers

app/Providers/

AppServiceProvider (registers health checks), AuthServiceProvider (Super Admin gate), EmailMessageServiceProvider (email logging), and the panel provider.

Jobs & Listeners

app/Jobs/ and app/Listeners/

SendSmsJob sends SMS through Vonage and logs to an sms-api channel. FilamentEmailLogger stores outgoing emails and their attachments.

Commands

app/Console/Commands/

app:add-permissions-to-new-modules, demo:seed, and demo:reset.

Support

app/Support/ and app/helpers.php

Demo and DemoSchedule (demo mode). Helpers getModels() and authUserIsSuperAdmin().

Database

database/

Migrations for users, cache, jobs, email and SMS logs, health, activity log, permissions, and Cashier tables. Seeders: PermissionSeeder, RoleSeeder, RoleHasPermissionSeeder, UserSeeder, plus EmailSeeder, SmsSeeder, and DemoSeeder.

Views

resources/views/

The default welcome view, an HTML preview view used by the Email resource, and the demo banner component.

Public

  • Name
    /
    Type
    Redirect
    Description

    Redirects to the panel dashboard (filament.app.pages.dashboard).

  • Name
    /app/login
    Type
    Login
    Description

    Filament login page.

  • Name
    /app/register
    Type
    Registration
    Description

    Filament registration page.

Panel

  • Name
    /app
    Type
    Dashboard
    Description

    Filament dashboard with the account widget.

  • Name
    /app/profile
    Type
    Profile
    Description

    Edit name, email, and password for the signed-in user.

Navigation Groups

  • Name
    Social
    Type
    Group
    Description

    Users (sort 1).

  • Name
    Settings
    Type
    Group
    Description

    Roles (3), Activity Log (4), View Log (5), and Health Check Results.

  • Name
    Communication
    Type
    Group
    Description

    Emails (6) and SMS (7).

Scheduled Tasks

  • Name
    backup:clean
    Type
    Weekly
    Description

    Fridays at 03:00.

  • Name
    backup:run
    Type
    Weekly
    Description

    Fridays at 03:30.

  • Name
    Health heartbeat
    Type
    Every minute
    Description

    Spatie ScheduleCheckHeartbeatCommand, used by the schedule health check.

  • Name
    demo:reset
    Type
    Daily
    Description

    Registered at 03:00 only when demo mode is on and the host allows reset.

Was this page helpful?