Engineering Case Study: The "Source of Truth" Architecture

Project: Charles Marlow & Bros | Stack: Next.js, NestJS, Airtable, PostgreSQL Reading Time: 7 mins

The Executive Summary

In the premium real estate market, “off-the-shelf” software fails because it cannot handle the duality of the business: Sales (high-touch, slow-moving, private assets) vs. Rentals (high-velocity, availability-dependent, public assets).

For Charles Marlow, a premier agency in Mallorca and Ibiza, we didn’t just build a website. We built a Headless Operating System that decouples the “Data Entry” experience (for agents) from the “User Experience” (for clients).

Here is the technical breakdown of how we built a system that manages millions of euros in assets and automated 80% of manual operations.


1. The Architecture: “Hub and Spoke”

We utilized a Headless Architecture to ensure the frontend performance was never bottled-necked by the complex backend logic.

  • The Frontend (The Face): Built on Next.js (React) and hosted on Vercel. This delivers a static-site-generation (SSG) experience for listing pages, ensuring near-instant load times (95+ Google PageSpeed Score) which is critical for SEO and retaining high-net-worth mobile users.
  • The Middleware (The Brain): A custom NestJS application acts as the traffic controller. It handles validation, sanitization, and business logic before data ever touches the frontend.
  • The Data Layer (The Source):
    • Input: We use Airtable as the Headless CMS. Why? Because real estate agents are accustomed to spreadsheets. It offers zero learning curve for the team while providing a structured API for our engineers.
    • Storage: While Airtable captures the data, a PostgreSQL database serves it. Our middleware syncs changes from Airtable to Postgres in real-time, ensuring we don’t hit API rate limits during high-traffic spikes.

 

2. Solving the “Private Listing” Problem

A unique challenge in luxury real estate is the “Pocket Listing”—properties that are for sale but cannot be publicly advertised due to privacy concerns.

The Solution: Dynamic Unbranded Rendering We built a feature that allows agents to generate a “Private Dossier” for any property with one click.

  1. Agent Action: Clicks “Generate Unbranded Link” in the internal dashboard.
  2. System Action: The Next.js renderer grabs the property data but strips all Charles Marlow branding, navigation, and footer links.
  3. Result: A neutral, high-fidelity URL that can be shared with external brokers or privacy-conscious buyers without “leaking” the lead source.

 

3. The Availability Engine (The “Tetris” Logic)

Rental availability is often a mess of conflicting data sources (Airbnb, VRBO, Owner’s personal calendar). We built a custom Availability Aggregator.

  • Ingest: The system pulls iCal feeds from major OTAs (Airbnb/VRBO) every 15 minutes.
  • Merge: It overlays these external bookings with a “Master Block” calendar managed by Charles Marlow staff.
  • Rule: Staff Block > Owner Block > External OTA.
  • Outcome: The frontend only shows dates that are truly free, eliminating the embarrassment of double-booking a €20k/week villa.

 

4. The “Hybrid” Schema: Unifying Sales & Rentals

Most agencies use two different CRMs for Sales and Rentals. We unified them into a single schema to reduce technical debt.

  • Sales Objects: Defined by “Private Status” (hidden/public), “Price on Application” toggles, and high-resolution asset galleries.
  • Rental Objects: Defined by “Seasonal Rate Cards” (e.g., High Season vs. Low Season pricing matrices) and “Minimum Stay” logic.
  • Unified Search: Because they share a core schema in PostgreSQL, users can filter by “Buy” or “Rent” in the same interface without page reloads or switching subdomains.

 

5. Technical Impact By The Numbers

  • 80% Reduction in manual data entry for the operations team.
  • Sub-1 Second page loads for property listings (up from 4s+ on the legacy WP site).
  • Zero Downtime deployment pipeline via Vercel.

Why OpenMind?

We respect the code that pays the bills. Our architecture allows mature businesses to innovate on the frontend today, while safely maintaining the backend systems that have worked for a decade.