← Back to Projects
Multi-Tenant Architecture Progressive Web App Headless CMS

TownTour

A decoupled multi-tenant tourism platform combining a public marketing website (towntour.uk), a high-performance hardware-accelerated walking tour Progressive Web App, and a Headless CMS publishing static RFC 7946 GeoJSON directly to the global edge.

Visit Marketing Portal (towntour.uk) Launch Live Tour (Pontefract) View All Projects

The Three Architectural Pillars

1. Commercial Marketing Portal
towntour.uk

The commercial front-of-house aimed at local councils, Business Improvement Districts (BIDs), heritage trusts, and tourism boards. Showcases commercial propositions, accessible walking trail curation, bespoke branding tiers, onboarding models, and tourist engagement analytics.

2. Multi-Tenant Walking Tour PWA
*.towntour.uk

A single TypeScript and Vite Progressive Web App serving distinct towns via wildcard subdomains (pontefract.towntour.uk, york.towntour.uk). Delivers GPU-accelerated vector maps, real-time GPS proximity sorting, compass orientation cones, and 100% offline trail caching.

3. Headless CMS & Static Publisher
Multisite CMS + Plugin

Containerised CMS authoring backend with a custom tour-publisher PHP plugin. Town administrators curate Places, Tours, and Tags via Custom Post Types, compiling directly into static RFC 7946 GeoJSON datasets. Completely decouples visitor traffic from database queries.

Visitor Experience & Frontend Innovations

The visitor-facing PWA is engineered for effortless field navigation in real-world conditions — from dense historic town centres to cellular dead zones.

  • Hardware-Accelerated Dual Map Engines:

    The primary map utilizes MapLibre GL JS with OpenFreeMap vector styles, featuring GPU camera pitch and bearing rotation (setBearing) that keeps street labels and POI names dynamically upright during movement. Automatically falls back to a lightweight Leaflet raster tile engine when WebGL is unavailable or disabled.

  • Live Proximity Sorting & Compass Cone:

    Real-time Haversine distance calculations let visitors toggle between 📍 Nearest (ordering attractions closest-first based on device geolocation) and alphabetical A–Z ordering. Directional SVG markers feature a live compass field-of-view cone driven by the device orientation sensor API.

  • GPS Record & Replay Simulation Engine:

    A built-in development and QA simulation suite allows tour curators and developers to replay recorded walking routes at variable speeds (1x to 10x). Simulates realistic GPS coordinates, automatic map panning, proximity arrivals, and route boundary alerts from the comfort of a desk.

  • Tenant-Scoped Cache & Offline PWA:

    The PWA service worker precaches all town GeoJSON payloads, imagery, and vector tile style descriptors into isolated tenant caches. Visitors can walk complete heritage trails offline without losing map functionality or media guides.

  • Telemetry with Google Consent Mode v2:

    Granular, privacy-first analytics capture POI arrivals, tour starts, and audio guide engagement tagged with tenant-specific dimensions, supported by GDPR/PECR compliance dialogs and offline event queueing.

Zero-Database Edge Architecture

Traditional tourism sites struggle under peak event traffic or require costly server hosting. TownTour eliminates server bottlenecking entirely through a decoupled content delivery pipeline:

Authoring (CMS) → CPTs (Places, Tours, Tags) & Coordinates
  ↳ Custom Tour Publisher → Serializes & validates RFC 7946 GeoJSON FeatureCollections
    ↳ Edge Deployment → Writes static JSON & media to Cloudflare Edge CDN
      ↳ Zero Database Load → 100% edge-cached delivery to tourists (0ms PHP/SQL delay)

Because public visitors never execute PHP or query MariaDB, the client application can handle millions of requests with instant response times, zero database licensing costs, and complete protection against CMS exploitation.

Technical Architecture & Stack

  • TypeScript & Vite
  • MapLibre GL JS (WebGL)
  • OpenFreeMap Vector Tiles
  • Leaflet Fallback
  • RFC 7946 GeoJSON
  • Headless Multisite CMS
  • PHP 8.2 & MariaDB (Docker)
  • Progressive Web App (PWA)
  • Cloudflare Pages & Edge CDN
  • Vitest (Unit Tests)
  • Playwright (E2E Tests)
  • PHPUnit (CMS Tests)
  • Google Consent Mode v2
Launch towntour.uk Explore Pontefract Tour Demo View All Projects