Smart Travel Aggregator: FastAPI Backend (Live Demo) by Mojtaba KarimiabdarSmart Travel Aggregator: FastAPI Backend (Live Demo) by Mojtaba Karimiabdar

Smart Travel Aggregator: FastAPI Backend (Live Demo)

Mojtaba Karimiabdar

Mojtaba Karimiabdar

The live interactive API docs, generated from the code: 19 endpoints you can try yourself right now.
The live interactive API docs, generated from the code: 19 endpoints you can try yourself right now.

The challenge

Travel apps depend on many providers, and each one has its own format, limits and bad days.

The solution

Smart Travel Aggregator is a FastAPI backend I built that combines flights, hotels, weather and currency behind one secure, resilient API. The table on the cover is a real hotel search on the live demo: 10 hotels from 2 providers, merged, ranked by score and returned in one clean format.

Try it yourself

The interactive API docs are generated from the code and list all 19 endpoints: sign-up with e-mail verification, login, refresh and logout, flight and hotel search, weather, currency conversion and price alerts.
It runs on a free server, so the first load can take about 40 seconds.
How it works: access checks, validation, parallel calls to providers, circuit breakers and a cache, then one ranked answer.
How it works: access checks, validation, parallel calls to providers, circuit breakers and a cache, then one ranked answer.

How it works

Every search follows five steps:
Check access: JWT login, roles and per-client rate limits.
Validate: typed parameters reject bad input at the edge.
Fan out: all providers are called at the same time, with timeouts.
Protect: retries, a circuit breaker per provider and a Redis cache.
Merge and rank: results are de-duplicated, scored and flagged if a provider failed.
If a provider fails, it is dropped and the response says so instead of crashing.

Real responses from the live demo: a clear 422 error and strict security headers, backed by 124 tests at 92% coverage.
Real responses from the live demo: a clear 422 error and strict security headers, backed by 124 tests at 92% coverage.

Security and quality

Clear errors: bad input gets a standard problem+json response that names each invalid field, with a trace ID.
Strict headers: Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy on every response.
Accounts: Argon2id passwords, e-mail verification and password reset.
Sessions: short-lived access tokens with refresh, real logout through token revocation, and roles for admin endpoints.
Audit: an append-only audit log and structured JSON logs.
124 automated tests at 92% coverage run on every change, together with CodeQL and security scans.
Tech stack: Python, FastAPI, PostgreSQL, Redis and Docker.
Need several APIs combined into one reliable backend? Send me a message with the services you want to connect.

Like this project

Posted Oct 12, 2026

One secure, resilient FastAPI backend that combines flights, hotels, weather and currency from several providers. Try the live demo.