Skip to main content

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.


SectionDescription
nFusion → TenantsManage nFusion API tenants (Retail, Dealers)
nFusion → Sync TargetsConfigure sync destination per tenant (WooCommerce, Algolia, HTTP)
nFusion → Sync LogsView history and status of every sync run
ProductsBrowse the local product/SKU database synced from WooCommerce
Shipping DashboardReal-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:

FieldDescription
nameHuman-readable label
aliasSubdomain used to build the nFusion API base URL ({alias}.nfusioncatalog.com)
api_tokenName of the .env var that holds the actual API token
sales_channelnFusion sales channel identifier
currencyISO currency code (e.g., USD)
tier_pricing_sourceretail_tiers or wholesale_tiers
supports_markup_sale_pricesEnables sale-price overlay from the local products table
last_synced_atTimestamp of the most recent successful sync attempt
healthcheck_urlOptional URL pinged after each successful sync (e.g., Healthchecks.io)

Actions

  • Sync Prices (header action) — triggers SyncNFusionTenantPricesAction immediately via a queued job
  • View Sync Logs — links to the filtered NFusionSyncLogs list 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.

FieldDescription
nameLabel for this target
typeWooCommerce, Algolia, or HTTP
is_activeWhen false, this target is skipped during sync
is_dry_runWhen true, the sync runs but no data is written to the destination
debug_enabledEnables verbose logging for this target
settingsJSON 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.

ColumnDescription
statusrunning / success / partial / error
started_atWhen the sync job started
completed_atWhen it finished
attemptedNumber of SKUs attempted
processedNumber of SKUs successfully updated
messageHuman-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.