Menu

How We Built a Multi-Currency Pricing Engine for 633 Static Pages
πŸ“°

How We Built a Multi-Currency Pricing Engine for 633 Static Pages

DEV Community: astroΒ·Marrakech TransportΒ·about 18 hours ago
#GHfkFLBm
#devtoastro#devto#dev#price#const
Reading 0:00
15s threshold

When you run a transfer service that publishes fixed prices across 633 static pages in 8 languages, pricing changes are not a database update β€” they are a build.

The Problem

Our site navetteforyou.com serves Marrakech airport transfers and day trips. Every route has a price in MAD (Moroccan Dirhams) that appears on multiple pages across 8 language variants. Change one price, and it propagates to dozens of pages.

We needed:

A single source of truth for all prices

Automatic propagation to every language/page combo

A validation gate that catches any price anomaly before deploy

No price under our 600 MAD floor appearing anywhere

The Architecture

// src/content/pricing.ts β€” single source of truth export const ROUTES = { 'marrakech-airport' : { mad : 300 , category : 'airport' } , 'marrakech-essaouira' : { mad : 1800 , category : 'day-trip' } , 'marrakech-fes' : { mad : 3500 , category : 'intercity' } , // ...…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.