TourSearch

One search across several tour operators, merged into a single list of hotels. Embeds on any travel agency website with two lines of HTML.

Egypt, 7 nights, 2 adults

One request goes to every operator at once

Operator A SAMO XML waiting
Operator B SAMO XML waiting
Operator C SOAP waiting
0
hotels in one list, duplicates merged

Results appear as each operator answers. A slow operator never holds up a fast one.

The problem

A travel agency's website relied on a third-party tour search module. The agency did not control the data, the look, or what happened when the module broke, and had nothing of its own to offer partner agencies.

The goal was to replace the module with an in-house search on the agency's own server, then turn it into a platform other agencies can sign up for.

What I built

Search across operators

Each search is sent to every connected operator in parallel. Offers stream into the page as they arrive, with filters, sorting and a price check against the operator before a booking request.

One hotel, one card

Operators name the same hotel differently. A matcher tuned on 900+ hand-checked pairs merges them automatically; doubtful pairs wait in a review queue with one-click merge and undo.

Price warmup

Popular destinations are searched in the background, within each operator's rate limit. When the index is fresh, the search answers from it instead of waiting for live APIs.

Embeddable widget

Two lines of HTML add the whole search to any site: form, results, tour card, gallery, favourites and booking request. Three languages, two currencies, full-screen on phones.

Platform for agencies

Self-service sign-up, domain verification, a cabinet with leads, notifications by email and Telegram, plans and invoices, identity checks, support tickets and 24-hour demo sandboxes.

Operations

Admin panel for operators, catalogue and queues; alerts to a team chat; daily backups. Continuous delivery: a merged pull request reaches production in about two minutes.

How it works

Architecture: tour operator APIs feed provider adapters, then normalisation and hotel matching into the catalogue and offers store; a background warmup queue refreshes prices; the search API serves the widget on agency sites and the agency cabinet. Tour operators Operator A SAMO XML API Operator B SAMO XML API Operator C SOAP service Provider adapters one contract, external IDs only Normaliser IDs to catalogue, hotel matching queue Catalogue and offers PostgreSQL, monthly partitions Price warmup Redis queues, within each operator's rate limit; a failing route pauses alone Search API streams results Widget Shadow DOM Cabinet and admin

Adapters know only the operator's own identifiers. Mapping to the shared catalogue happens in one place, and an architecture test stops adapters from touching the database. Adding an operator means writing an adapter, not changing search.

The hard parts

A 600 MB catalogue response

One operator's hotel endpoint repeats every hotel dozens of times; a single country came back at 602 MB. A streaming parser reads it from disk: 14,000 hotels in seven minutes at a 72 MB memory peak. The same API encodes every number as a float, so fixtures are built from raw XML.

Money is never a float

Prices are numeric(12,2) in the database and strings in PHP and JSON, compared with bccomp. Converting to a number anywhere loses cents silently, so the rule is enforced in review and tests.

No silent data loss

An unknown meal code never aborts an import. An offer for an unmatched hotel is kept and queued for matching. An empty response never wipes the catalogue. Early on I found seven losses that all looked like successful runs.

Failure stays local

If one destination keeps failing at one operator, only that pair pauses: 15 minutes, then an hour, then a block for one, three and seven days with a single probe after each. Everything else keeps running.

A widget that survives any host page

A host site set the root font size to 10px and shrank every rem-based element. The widget now renders in Shadow DOM, resets inherited styles, and the build converts rem to px. A browser test matrix runs it on different host pages.

Results that keep their place

Offers arrive in waves while the visitor scrolls. The client tells the server what it has already shown, so new offers append below instead of reshuffling what the visitor is reading.

How it was built

TourSearch was built with Claude Code, using spec-first, subagent-driven development (SDD). I set the direction and made the decisions; agents wrote most of the code inside a strict process.

Spec, plan, then code

Every feature starts as a spec and an implementation plan broken into small tasks: 22 specs, 42 plans and 104 tickets so far.

A subagent per task, a review per task

A fresh subagent implements one task; its result is reviewed against the spec and for code quality before the next task starts. The whole branch gets a final review before merge.

Decisions with their reasons

31 decision logs with 140+ numbered rulings record why something was done this way and what a mistake would cost, so later sessions don't reopen settled questions.

Rules that agents read every session

CLAUDE.md holds the rules that break the product silently: money as strings, no silent data loss, the conditions a query needs to hit the partial index.

Parallel work without collisions

Each task runs in its own git worktree and Docker project, so several sessions work at once without touching each other's code or databases.

Gates instead of trust

About 6,800 tests, static analysis, architecture tests, CI on every pull request and smoke checks after each automated deploy decide what reaches production.

In numbers

16,000+
hotels from three operators in one catalogue
48
destination countries
15–30 s
live search across all operators; faster from the warm index
0
server errors in a production load test, 30,000 requests in 11.5 minutes
6,800
automated tests: backend, frontend and real-browser
2 min
from merged pull request to production; 300 pull requests in six weeks

Stack

  • PHP 8.3
  • Laravel 12
  • PostgreSQL
  • Redis
  • Horizon
  • Filament
  • Vue 3
  • TypeScript
  • Vite
  • Pest
  • Larastan
  • Vitest
  • Playwright
  • Docker
  • GitHub Actions
  • nginx
  • Claude Code

My role

I was the only developer: product design, backend, frontend, infrastructure and the integrations with each operator, from reading their API documentation to live probes on production. I also designed the AI development process: how specs, plans, subagents, reviews and gates fit together.

Screens

Search form and a grid of hotel results for Egypt, sorted by lowest price, prices in US dollars
A live search: 463 hotels from all operators in one list, prices switched to dollars without a new search
Tour card with a photo gallery, tabs for tour, description and map, and a panel to change dates, nights, meals and room
Tour card: change dates, nights, meals and room without leaving it
The same results on a phone screen, one hotel per row
On a phone

Screenshots from production. Hotel and resort names come from operators as they send them.

Try it

The demo creates a private sandbox agency for 24 hours: the cabinet, the widget and live search with real operator data. It runs on the first client's production instance, so the interface opens in the client's language; the widget also speaks English.