Web Development April 2026 33 views

Egypt Tours

Egypt Tours — Global Experiences Platform Delivering high-conversion, SEO-first tour and travel experiences with enterprise-grade engineering for speed, reliability, and localization.

Egypt Tours

Egypt Tours — Global Experiences Platform

Delivering high-conversion, SEO-first tour and travel experiences with enterprise-grade engineering for speed, reliability, and localization.

This repository is a production-oriented Laravel application that powers a multi-language, multi-currency tourism platform. It solves the real-world problem of operating large inventories of heterogeneous travel products (day tours, packages, cruises) by providing:

  • A fast, filterable product catalog optimized for low-latency queries and faceted searches.
  • A flexible pricing and booking engine that supports date-ranged pricing, cabin/room variants, and child pricing policies.
  • Full localization (language + slug translation) and currency conversion for global audiences.

Core Value Proposition & Marketing Highlights

  • Performance & Scalability: The platform is built on Laravel 12 and optimized for scale with strategic denormalization (the product_filters table), Redis-friendly caching in services like CurrencyService, and Vite-powered frontend bundling. Heavy aggregation is precomputed at write-time which enables extremely fast read paths for filtering and listing.

  • UX / UI Excellence: Tailwind CSS v4 + Vite deliver a responsive, component-driven UI. Progressive enhancement and JSON endpoints (e.g., /api/tours-list) are included to support fast client-side experiences and autocomplete widgets.

  • Security & Reliability: Defaults follow Laravel best-practices—strict environment-driven config, CSRF-protected forms, rigorous validation through Form Requests, and a Filament admin for secure CRUD. The project includes Pest tests and code formatting via Pint for developer hygiene.

Technical Architecture & Stack

  • Backend / API

    • Framework: Laravel 12 (PHP ^8.2).
    • Pattern: MVC + Service layer. Key services include FilterService, PricingService, and CurrencyService (see app/Services).
    • Admin: Filament v5 for content management and safe admin UX.
    • Database: Relational (Postgres recommended). The schema includes denormalized product_filters to accelerate faceted queries.
  • Frontend

    • Tooling: Vite, Tailwind CSS v4.
    • Components: Reusable Blade components and JSON-first endpoints for asynchronous UI (search/autocomplete).
    • Third-party: Swiper for carousels.
  • DevOps & Infrastructure

    • Local developer scripts are provided in composer.json (setup, dev, test).
    • CI: Project uses Pest for tests and Pint for formatting; integrate into CI pipelines to enforce quality gates.
    • Cache: Uses Laravel Cache (Redis recommended) for currency lists and computed filters.
    • Containerization: Works inside Docker via Laravel Sail or your preferred PHP runtime.

Architecture diagram

graph LR
	A[User Browser] -->|HTTP/HTTPS| B[Laravel Frontend (Blade + Vite)]
	B --> C[Routes/Controllers]
	C --> D[Service Layer]
	D -->|writes| E[product_filters table]
	D -->|reads/writes| F[Products / Pricing / Departures]
	F --> G[Postgres]
	D --> H[CurrencyService Cache (Redis)]
	I[Filament Admin] --> F

Key Features & Deep Technical Deep Dives

  1. Product Filters (fast faceted search)
  • Feature: Precomputed product filters stored in product_filters to allow efficient faceted filtering across countries, destinations, taxonomies, price ranges, and duration.
  • The Challenge: Running ad-hoc joins or heavy aggregations across large product catalogs and translations causes slow page loads and complex queries.
  • Engineering Solution: FilterService::rebuildProductFilters() (see app/Services/FilterService.php) composes normalized rows at product save/update and inserts them into product_filters. The read path uses intersection logic (getProductIdsByFilters) to combine filter criteria efficiently—this turns many-to-many lookups into simple indexed queries and reduces runtime DB pressure.
  1. Pricing & Booking (date ranges, cabins, child policies)
  • Feature: Accurate quote calculation across pricing variants (per-person, per-cabin), departures, and date-range overrides.
  • The Challenge: Pricing rules vary by travel date, cabin, or room types and child discount policies, and the system must return consistent, auditable quotes.
  • Engineering Solution: PricingService::calculateQuote() (see app/Services/PricingService.php) resolves the correct base unit by checking departure-specific prices, cabin prices, dated pricing rows, and finally safe fallbacks. Child pricing uses childPolicyRules to compute per-age discounts; currency conversion is delegated to CurrencyService for a single source of truth. The implementation uses sensible ordering (range->fallback->created_at) to deterministically select the correct price row.
  1. Multi-language routing & SEO
  • Feature: Localized routes with translated slugs, canonical URLs, and language-aware filters.
  • The Challenge: Serving SEO-friendly localized content while avoiding routing conflicts with reserved slugs and preserving backwards compatibility.
  • Engineering Solution: Routes are grouped and guarded with SetLocale middleware and localized prefix groups in routes/web.php. Country-first and nested product routes use regex exclusions to avoid reserved slug collisions. Translations are stored in per-entity translation tables and translation-aware filter rows include language_id so UI filters only show relevant slugs for the selected locale.