Case study 04 / 37
DataUdaan
One travel platform for international and domestic flights, hotels and buses behind a single supplier layer, with B2C, agent and admin portals.
- Status
- In development
- Domain
- Web · Cloud
- Source of claims
- Private repository README (reviewed). Source and deployment are not public.
A FastAPI modular monolith with three Next.js apps: a mobile-first consumer portal, a white-label agent portal per company subdomain, and a superadmin console. A provider abstraction and routing engine decide which supplier serves each search; every booking belongs to an order and moves through an explicit state machine.
01/The problem
Selling flights, hotels and buses to both travellers and agencies means talking to many suppliers with different APIs, failure modes and pricing. Agents also need wallets, credit and their own branding, and every booking must survive timeouts, fare changes and retries without double-charging anyone.
02/The system
A FastAPI modular monolith with three Next.js apps: a mobile-first consumer portal, a white-label agent portal per company subdomain, and a superadmin console. A provider abstraction and routing engine decide which supplier serves each search; every booking belongs to an order and moves through an explicit state machine.
- B2C portal to FastAPI monolith
- Agent portal to FastAPI monolith
- Superadmin to FastAPI monolith
- FastAPI monolith to Pricing pipeline
- FastAPI monolith to Routing engine
- FastAPI monolith to Booking FSM
- Routing engine to Supplier adapters
- Pricing pipeline to PostgreSQL
- Booking FSM to ARQ worker
03/Scope
- 01A FlightProvider interface with adapters for Amadeus, Duffel, Sabre and Travelport, plus domestic Nepal and India flight, hotel and bus adapters. Each is enabled only once its credentials are stored, Fernet-encrypted.
- 02A configurable routing engine: Nepal-domestic to the domestic API, India-domestic to the India portal, international to GDS/NDC suppliers.
- 03Concurrent supplier search with timeouts and a circuit breaker; partial results, deduplication and ranking.
- 04A pricing pipeline (FX → fees → markups → commission → discount) that stores its full breakdown with the fare.
- 05A booking state machine with idempotency and retry rules; every booking belongs to an order so combined trips can follow.
- 06B2B wallets and credit, refunds and reissues, webhooks, deposits, manual approvals, feature flags, maintenance mode and reconciliation.
- 07140 OpenAPI routes; mock suppliers that time out or change price on revalidation so every flow runs end to end without credentials.
04/Engineering
Refuse to pretend
Operations a supplier cannot perform raise an explicit unsupported-operation error instead of faking success, and the settings validator refuses the mock payment gateway outside development.
Failure is a test case
Mock suppliers deliberately time out and change fares on revalidation, so partial results, fare-change handling and retries are exercised on every run.
Pricing you can audit
Every fare carries a JSON breakdown of each pricing step, so an agent's markup or a currency conversion can be explained after the fact.
A pipeline that guards itself
CI runs lint, types, Bandit, tests, a migration up/down/up round trip against Postgres, Docker builds and a Trivy scan before deploying.
05/Interface
Interface screenshots of this commercial product are not public. The visual above is an abstract representation of its modules — not the product itself.
06/Tech stack
- Python 3.13
- FastAPI
- Next.js
- TypeScript
- PostgreSQL
- Redis
- ARQ
- Alembic
- Docker
- Vercel
- Stripe
07/Result
Verified outcomes
- 92 backend tests, including end-to-end flows over the API: card lifecycle to e-ticket PDF, B2B wallet and credit, cancel → refund, reissue, tenant isolation and idempotency.
- Typecheck, lint and build pass across all three frontend apps.
Known limitations
- GDS/NDC adapters are implemented but disabled until supplier credentials exist.
- Domestic flight, hotel and bus adapters are contract-level and not yet verified against live accounts.
08/Links
Private commercial codebase — no public links.
Related work
Multi-tenant jewellery ERP · SaaS
DataJewellers →
Jewellery ERP, billing and Nepal tax compliance as multi-tenant SaaS: one deployment serves many businesses, each in its own Postgres schema.
Commercial · private
B2B airline ticketing platform
TimeTravel →
Multi-tenant B2B airline ticketing: agent booking portal, admin dashboard, agency wallets with credit lines, and a pluggable flight-provider layer.
Commercial · private
Multi-vendor marketplace
Kinamna →
A multi-vendor marketplace for Nepal: storefront, seller portal and superadmin console on one 183-endpoint API, with tamper-proof Khalti, eSewa and Fonepay payments.
Private · Deployed
Next case study
Geoland →