/admin and /admin/{tenant} using SPA mode, backed by AdminPanelProvider. It registers the Tenant model for tenancy (allowing an admin to navigate into a specific tenant’s context) but disables tenant switching — the relationship is always 1:1 between a super admin session and a tenant when impersonating.
Access and authentication
| Attribute | Value |
|---|---|
| Panel ID | admin |
| Path | /admin |
| Auth guard | web |
| Required role | super_admin |
| Tenant model | App\Models\Tenant (resolved by slug) |
| Tenant menu | Disabled (1:1 architecture) |
AdminPanelProvider::boot() via a Filament::serving() hook that runs on every request to the admin panel:
config/auth.super_admins allows specific email addresses to bypass the role check. Any user without super_admin role receives a 403.
Dashboard widgets
The admin dashboard renders a financial KPI stack sourced fromapp/Filament/Widgets/:
| Widget | Purpose |
|---|---|
AccountWidget | Authenticated admin identity card (built-in Filament) |
FinancialStatsOverview | MRR, gross revenue, conversion rate, pending payments count |
AcquisitionGrowthChart | Tenant acquisition trend over time |
PlanDistributionChart | PRO vs FREE tenant distribution chart |
PendingPaymentsWidget | Table of subscription payments awaiting manual review |
FinancialStatsOverview computes MRR as (active PRO tenants) × (pro_plan_price from GeneralSettings):
Navigation groups
The sidebar uses five deterministic groups defined inAdminPanelProvider:
Dashboard
Dashboard
The main landing page with the financial KPI widget stack and pending payments table.
Gerencia (Management)
Gerencia (Management)
High-level governance resources for managing tenants and users.
- Negocios —
TenantResource: full tenant directory with approval, suspension, force-upgrade, and impersonation actions - Usuarios —
UserResource: platform user directory with role assignment
Negocios (Business data)
Negocios (Business data)
Cross-tenant views of transactional data.
- Pedidos —
OrderResource: platform-wide order view - Productos —
ProductResource: platform-wide product view - Cupones —
CouponResource: platform-wide coupon view
Finanzas (Finance)
Finanzas (Finance)
Financial operations requiring manual review.
- Pagos —
PaymentResource: subscription payment records with approve/reject actions and proof-of-payment viewer
Configuración (Configuration)
Configuración (Configuration)
Platform-level settings, reference data, and observability. Collapsed by default.
- Architecture Health —
ArchitectureHealthpage: domain event compliance metrics - Billing —
Billingpage: platform billing configuration - Configuración General —
ManageGeneralSettingspage: prices, bank instructions, limits - Bitácora de Actividad —
ActivityLogResource: Spatie Activitylog viewer - Categorías —
CategoryResource: business category reference data - Ciudades —
CityResource: city reference data used in tenant registration
Resources reference
TenantResource
The most feature-rich resource in the admin panel. Lists all registered businesses with health status (based on last activity), plan badge, approval status, and product count. Provides approve, reject, suspend/reactivate (kill switch), force-upgrade to PRO, and impersonation (shadow login) actions.
UserResource
Platform user directory. Supports role assignment (
super_admin, panel_user, etc.) and search by name or email.PaymentResource
Subscription payment records. Admins can approve or reject manual bank-transfer payments. Approval updates the tenant’s
is_pro flag and sets plan_expires_at. Each record stores a proof-of-payment image path for audit.ActivityLogResource
Read-only viewer for
spatie/laravel-activitylog records. Filterable by event type (created, updated, deleted), entity type, causer user, and date range. Shows today’s event count as a navigation badge. No create, edit, or delete actions are registered.OrderResource
Platform-wide order list spanning all tenants. Useful for support and reconciliation.
CategoryResource / CityResource
Reference data management. Categories and cities are shared across all tenants and drive discovery, SEO landing pages, and tenant registration forms.
Impersonation (shadow login)
Super admins can log in as any tenant’s owner directly from theTenantResource table using the Acceder como Cliente row action. This is the platform’s support and debugging tool.
security log name. The admin’s original session data is stored so the front-end can display a “return to admin” banner.
To leave an impersonation session, navigate to /impersonate/leave.
Kill switch (tenant suspension)
TenantResource provides a SUSPENDER / REACTIVAR toggle action that immediately sets is_active = false on the tenant record:
is_active = false, the tenant’s public microsite returns a 403 and their panel is inaccessible. The action requires confirmation and shows a destructive warning modal.
Force-upgrade to PRO
Admins can activate the PRO plan for a tenant without a payment record using Forzar PRO:Architecture health page
ArchitectureHealth (app/Filament/Pages/ArchitectureHealth.php) surfaces domain event compliance metrics from EventArchitectureMetricsService. It is restricted to users where $user->isSuperAdmin() returns true:
- Summary counters: total events, compliant events, violations
- Per-event compliance breakdown
- Violation details for events that fail ADR-002 structural rules
Activity log viewer
ActivityLogResource wraps the Spatie\Activitylog\Models\Activity model. It is read-only — create, edit, and delete are all disabled:
General settings page
ManageGeneralSettings is a Filament settings page (Spatie Laravel Settings) that controls platform-wide configuration:
pro_plan_price— monthly PRO subscription price (used byFinancialStatsOverviewto compute MRR and byManageBillingto display the payment amount to tenants)bank_transfer_instructions— HTML instructions shown in the tenant billing wizardsupport_whatsapp_number— support contact numberfree_plan_product_limit— maximum products for free-plan tenants (used byProductResource::canCreate())
RBAC enforcement
Role-based access is managed by Spatie Laravel Permission. TheUserRole enum defines platform-level roles:
| Role | Access |
|---|---|
super_admin | Full admin panel access |
panel_user | Tenant panel only |
auditor | ActivityLogResource read-only access |
ventas | Sales support access |
soporte | Support access |
$user->role === UserRole::SUPER_ADMIN) rather than Spatie Permission’s hasRole(), with the email whitelist in config/auth.super_admins as an additional bypass layer.
Visual design
| Attribute | Value |
|---|---|
| Primary colour | Zinc (Color::Zinc) |
| Gray scale | Slate (Color::Slate) |
| Font | Outfit (Google Fonts) |
| Dark mode | Enabled |
| Sidebar | Collapsible on desktop, navigation groups not collapsible |
| SPA mode | Enabled |
| Max content width | Full |