Skip to content

Products Admin Panel

Products are managed through two Filament resources in the admin panel under “Product Management”.

Path: Admin > Product Management > Product Templates

Source: backend/app/Filament/Resources/ProductTemplates/ProductTemplateResource.php

The form uses a wizard with three steps:

  1. General Data

    • AI Trip Parser (paste raw trip info)
    • Core info: title, subtitle, SKU (auto-generated), source locale
    • Descriptive content: descriptions, highlights, requirements
    • Hero image upload
  2. Itinerary & Logistics

    • Trip itinerary repeater with POI selector (supports cities, attractions, landmarks)
    • Each stop: POI selection, nights, title, details, image
    • Optional activities and free time
    • Accessibility options
    • Duration (auto-calculated), accommodation, meal plans
  3. SEO

    • Meta title and description

Trip Parser: Paste raw trip info like:

Asia India 9 nights - 2 Delhi - 1 Jodhpur - 2 Udaipur - 2 Jaipur - 1 Agra - 1 Delhi

AI generates all fields including itinerary with titles and descriptions.

Title-based Generation: Enter a title, click sparkle icon to generate all content.

  • Hero image
  • Title, subtitle, SKU
  • Markets count (shows lock icon if > 0)
  • Short description
  • Created date

Templates with market products show a lock badge - these cannot have their core structure modified.

Path: Admin > Product Management > Products by Market

Source: backend/app/Filament/Resources/ProductsByMarket/ProductByMarketResource.php

The creation form uses a 4-step wizard for guided data entry:

Step 1: Product & Market

  • Select product template (ordered by most recent)
  • Select market (auto-fills locale, airports, search dates)
  • Select language from market’s supported locales
  • Set status and sort order

Step 2: Flight Configuration

  • Departure airports (multi-select from market’s active airports)
  • Route type: Multi-City or Separate Flights
  • Search period (start/end dates)
  • Excluded dates repeater

Step 3: Description and Itinerary

  • “Translate from Product” button for AI translation (in section header)
  • Core Translation: title, subtitle, descriptions, categories, highlights, destination info
  • Itinerary: per-day translations (auto-populated from template when entering this step)
  • Optional activities, free time

Step 4: Details & SEO

  • Logistics & Practical Details: accommodation, meal plans, not included, special requirements
  • SEO & URL: meta title, URL slug, meta description

Each step validates before allowing progression to the next. The wizard enforces sequential completion (no skipping steps).

Source: backend/app/Filament/Resources/ProductsByMarket/Pages/CreateProductByMarket.php

The edit form uses collapsible sections (not wizard) for quick access to any field:

  1. Product & Market Selection
  2. Flight Configurations
  3. Core Translation
  4. Itinerary & Activities
  5. Logistics & Practical Details
  6. SEO & URL

When selecting a market:

  • Locale defaults to market’s default locale
  • Departure airports auto-filled with all active market airports
  • Search dates default to 3 months out + 60 days

When entering Step 3 (Description and Itinerary):

  • Itinerary auto-populates from product template (city, nights per stop)
  • User only needs to add translated titles and details per day

Click “Translate from Product” to:

  1. Load ProductTemplate content
  2. Call OpenRouter API for translation
  3. Populate all translation fields

Configuration: OPENROUTER_API_KEY, OPENROUTER_API_URL, OPENROUTER_MODEL

Source: backend/app/Services/ProductByMarketTranslationService.php

  • Product template title
  • Market code
  • Locale
  • Status badge
  • SKU
  • Search date range
  • Created date

The view page provides several action buttons in the header:

ButtonVisibilityBehavior
Preview on FrontendActive productsDirect link to frontend product page
Preview DraftDraft/Inactive productsSigned URL with 60-minute expiration
Prepare Flight SearchesAlwaysCreates routes and cache entries for flight configs
View Cached FlightsWhen matching routes existLinks to DynamicFlightCaches filtered by product routes

View Cached Flights navigates to the flight cache browser pre-filtered to show only routes matching this product’s flight configurations. Supports products with multiple departure airports and domestic flights.

Source: backend/app/Filament/Resources/ProductsByMarket/Pages/ViewProductByMarket.php

Both resources appear under “Product Management” navigation group:

ResourceIconSort Order
Product Templatesrectangle-stackdefault
Products by Marketglobe-alt20

Resources use HasResourcePermissions trait for RBAC integration.

Source: backend/app/Filament/Traits/HasResourcePermissions.php