Filament Admin Panel
The Middleware Platform uses Filament v3 as its admin panel. The panel is accessible at /admin and provides full management of tenants, sync targets, sync logs, and product data.
Navigation Structure
| Section | Description |
|---|---|
| nFusion → Tenants | Manage nFusion API tenants (Retail, Dealers) |
| nFusion → Sync Targets | Configure sync destination per tenant (WooCommerce, Algolia, HTTP) |
| nFusion → Sync Logs | View history and status of every sync run |
| Products | Browse the local product/SKU database synced from WooCommerce |
| Shipping Dashboard | Real-time shipping performance metrics |
Tenants Resource
File: app/Filament/Resources/NFusionTenantResource.php
Manages NFusionTenant model records. Each tenant corresponds to one nFusion account (e.g., Retail, Dealers).
Key fields:
| Field | Description |
|---|---|
name | Human-readable label |
alias | Subdomain used to build the nFusion API base URL ({alias}.nfusioncatalog.com) |
api_token | Name of the .env var that holds the actual API token |
sales_channel | nFusion sales channel identifier |
currency | ISO currency code (e.g., USD) |
tier_pricing_source | retail_tiers or wholesale_tiers |
supports_markup_sale_prices | Enables sale-price overlay from the local products table |
last_synced_at | Timestamp of the most recent successful sync attempt |
healthcheck_url | Optional URL pinged after each successful sync (e.g., Healthchecks.io) |
Actions
- Sync Prices (header action) — triggers
SyncNFusionTenantPricesActionimmediately via a queued job - View Sync Logs — links to the filtered
NFusionSyncLogslist for this tenant
Sync Targets Resource
File: app/Filament/Resources/NFusionSyncTargetResource.php
Each sync target belongs to a tenant and specifies where prices should be pushed.
| Field | Description |
|---|---|
name | Label for this target |
type | WooCommerce, Algolia, or HTTP |
is_active | When false, this target is skipped during sync |
is_dry_run | When true, the sync runs but no data is written to the destination |
debug_enabled | Enables verbose logging for this target |
settings | JSON blob with provider-specific configuration |
The settings schema is dynamically rendered in the Filament form by the provider's settingsSchema() method.
Sync Logs Resource
File: app/Filament/Resources/NFusionSyncLogResource.php
Read-only view of all sync run history.
| Column | Description |
|---|---|
status | running / success / partial / error |
started_at | When the sync job started |
completed_at | When it finished |
attempted | Number of SKUs attempted |
processed | Number of SKUs successfully updated |
message | Human-readable summary or error message |
Products Resource
File: app/Filament/Resources/ProductResource.php
Displays the local products table, which is populated by the WooCommerce product-update webhook. This table drives the sale-price overlay feature — when a product has a markup_sale_price set with valid sale_starts_at / sale_ends_at dates, NFusionService calculates a discounted ask price.
Shipping Dashboard
File: app/Filament/Pages/ShippingDashboard.php
A custom Filament page (not a resource) that renders shipping KPIs using data from the shipstation_orders, shipstation_order_items, and shipstation_shipments tables.
Key metrics displayed:
- Average Shipping Time — average days from order creation to shipment, with 30-day trend comparison
- Order Complexity — average items per order with trend
- On-Time Delivery Rate — percentage of orders shipped within the committed window
The page compares the current 30-day window against the previous 30-day window and labels each metric as improving (green) or degrading (red).
See Shipping Dashboard → for full details.
Actions
SyncNFusionTenantPricesAction
File: app/Filament/Actions/SyncNFusionTenantPricesAction.php
A Filament Action that dispatches NFusionSyncTenantPricesJob for a single tenant. Available on both the tenant list (header action) and the tenant detail page.