A multi-tenant Online Travel Agency platform built primarily for Nepal's flight booking industry, OTA also allows for hotel and insurance booking. The system handles everything from dynamic flight booking and real-time seat availability to multi-currency bookings and white-label portals for partner agencies, all from a single Django codebase with per-tenant PostgreSQL schema isolation.
Flight booking companies in Nepal run in an isolated manner, relying heavily on manual processes. Building a platform that could replace this entirely, plus there was a lack of consolidated place to compare flight prices, booking hotels, travel insurances, and placing it as a white-label portal for other travel agencies, was the core design constraint.
- A multi-tenant Django system using PostgreSQL schemas for strict per-tenant data isolation.
- Type conversion from REST API to SOAP and SOAP to REST for the flight booking integrations.
- A local and international payment gateways with multi-currency support for international bookings.
- A a white-label system so partner agencies could run branded flight booking portals off the same backend.
- A real-time seat management engine, commission engine and tax engines with automated waitlist promotion ticket sales.
The Problem With Manual Bookings
Nepal's trekking industry runs on trust and reputation, but operationally, most companies manage bookings through a patchwork of WhatsApp messages, email threads, and Google Sheets. Every season, double-bookings happen, clients get lost in follow-ups, and revenue leaks through the cracks. The OTA Platform was built to fix that at scale.
The platform serves trek routes across the Himalayas from Everest Base Camp to Annapurna Circuit and beyond.
Multi-Tenant Architecture
Each agency gets its own isolated PostgreSQL schema shared infrastructure, completely private data. A Django middleware layer resolves the tenant from the subdomain on every request and injects the correct schema into every ORM query. Provisioning a new tenant takes under two minutes via a management command.
Multi-tenant dashboard and booking management isolated per agency, unified in architecture.
Itinerary Builder
The itinerary builder lets operators construct day-by-day trek schedules with accommodation options, altitude profiles, and guide assignments. Each itinerary is versioned changes don't affect active bookings. The builder outputs a structured JSON payload consumed by both the admin UI and the customer-facing booking pages.
REST API layer, dual payment gateway integration (Stripe + eSewa), and the schema isolation model.
Real-Time Availability Engine
Seat management for group treks is a genuinely hard problem simultaneous bookings, group reservations, and cancellation cascades all need to be handled gracefully. The availability engine combines database-level row locking with optimistic concurrency to prevent double-bookings under high load, and an automated waitlist promotion system fills vacancies as cancellations come in.
Group trek management and a white-label portal example two agencies, one backend.
Partner White-Label System
Partner agencies configure their booking portal logo, colors, domain from a self-service admin panel without writing code. Each portal inherits full booking, availability, and payment functionality from the core platform. Revenue-sharing reports are generated automatically and accessible per tenant.
The platform is active with active tenants. Booking conversion rates improved significantly over the previous email-based workflow. The system now manages national and international flight, alongside hotel and insurance bookings with real-time availability tracking.