Full StackLive

Melincué Viajes: Digital Travel Quotation & Sales Platform

Production travel platform — 3-app TypeScript monorepo with four-layer SOLID architecture and TDD: live flight, hotel and package quotation, ops reporting, AI quotation agent over WhatsApp Business Cloud API, and unified admin backoffice.

Melincué Viajes: Digital Travel Quotation & Sales Platform - screenshot 1
1 / 7

Overview

Melincué Viajes is a production digital travel platform for an Argentine agency — live flight, hotel and package quotation, operational reporting, and a unified admin backoffice. Architected as a TypeScript monorepo with three separately deployed applications — an Express 5 API, a Next.js 16 admin dashboard, and a Next.js 16 public site — plus shared DTOs in a common types package and live inventory integrations as isolated npm packages. The API and admin dashboard follow a strict four-layer architecture (presentation, application, domain, infrastructure) guided by SOLID principles: thin HTTP/UI layers, business logic in application services, domain interfaces for dependency inversion, and bounded contexts per feature. All apps share a single MySQL schema via Prisma and provider sessions in Redis; production runs on a VPS with Docker Compose behind Cloudflare and Nginx Origin CA. The public site covers landing, FAQ and legal pages plus live flight, hotel and package search — IATA airport code autocomplete, filters, expandable itinerary detail, time-limited quote validity, WhatsApp inquiry templates with pre-filled trip details, and standalone transfer quotes outside the package builder. Package search composes live flight, hotel and transfer into a USD total, applying a configurable agency margin (percentage commission added on top of supplier rates) and live currency conversion when quotes mix currencies; hotel search adds multi-room occupancy, server-side filter facets, progressive pagination and deduplicated listings. The admin dashboard manages package destination hubs, home destination cards with AVIF uploads processed server-side via Sharp, transfer pricing, flight margin rules with route- and carrier-specific overrides, hotel margin rules with configurable net-on-cost or gross-on-sell percentage modes (net: commission on what the agency pays; gross: commission on the pre-margin sell price), plus members, customers and area-based RBAC. Cheap-flight and cheap-hotel scouting report modules support dashboard-configurable schedules, async job runners, rolling future date windows with non-stop and connecting (layover) fare snapshots, schedule/duration/baggage filters, multi-property hotel filters, Excel export via ExcelJS, in-app notifications and audit trails — behind JWT auth with refresh token rotation. Completed scheduled reports sync to Google Drive as Sheets via OAuth and googleapis: master workbooks per vertical, dedicated tabs per schedule, and Drive folder access from the UI. Cross-report package sales messages auto-match flight and hotel scouting rows by route, airport, passengers and travel dates for agent outreach. On top of the same live quotation and margin domain, an AI quotation agent on WhatsApp Business Cloud API turns inbound agent messages into flight, hotel and transfer quotes for a date range: webhooks deliver messages from the business number into a conversational agent that reuses existing inventory search and configurable quotation rules (reusable playbooks for common constraints) so travel agents can quote clients from WhatsApp without the previous fully manual assembly — the same logic is available from the admin system. Backend schedulers keep integration sessions alive on a fixed interval — Playwright and Chromium bundled in the API Docker image for browser-based inventory, HTTP health probes for API-based inventory — plus daily report retention cleanup on a 14-day policy and internal cache revalidation webhooks that refresh the public site when pricing, destinations, package hubs or transfers change, with selective Redis session preservation across revalidations. Real-time report progress streams through Socket.io with a Redis adapter for horizontal scaling. Production infrastructure includes daily MySQL backups to Google Drive and optional Google Places API integration for the public home rating badge.

Key Features

Live Flight, Hotel & Package Search with WhatsApp Inquiry Templates
AI Quotation Agent via WhatsApp Business Cloud API — Inbound Agent Channel
Live Package Composition — Flight + Hotel + Transfer Total in USD
Configurable Quotation Rules & Reusable Playbooks on Shared Domain Logic
TypeScript Monorepo with Four-Layer SOLID Architecture — API, Public Site & Admin
TDD on Domain Logic & Critical Quotation Flows
Shared DTOs & Live Inventory Integrations as Isolated npm Packages
Unified Admin Backoffice — Destinations, Transfers, Pricing & Reports
AVIF Destination Card Uploads with Server-Side Image Processing (Sharp)
Fare & Hotel Scouting Reports — Configurable Schedules & Excel Export
Google Drive + Sheets Sync for Scheduled Reports (OAuth / googleapis)
Cross-Report Package Sales Messages (Flight + Hotel Match)
Margin Engine — Agency Commission %, Flight Route/Carrier Rules & Hotel Net/Gross Modes
JWT Refresh Rotation, Area-Based RBAC, Members, Customers & Audit Logs
Production VPS — Docker Compose, Cloudflare, Nginx, Cache Revalidation & MySQL Backup

Challenges & Solutions

Delivering live travel search across three separately deployed applications meant sharing provider sessions in Redis between the API and public site, keeping browser- and HTTP-based inventory integrations healthy through background keepalive jobs without interfering with buyer-facing requests, and ensuring package composition never triggers browser automation mid-search. Package composition required parallel live lookups, USD-normalized totals with the agency commission margin applied, live currency conversion for mixed-currency hotel quotes, and time-limited quote UX aligned to supplier validity windows. The operational reporting stack — dashboard-configurable schedules, async runners, rolling non-stop/connecting fare windows, multi-property hotel filters, shared margin rules (agency commission on net cost or gross sell price) kept consistent between public-site pricing and report output, 14-day retention cleanup, Google Drive/Sheets sync on completion, and cross-report package sales messages for agent outreach — had to stay aligned with WhatsApp inquiry templates, AVIF upload pipelines and cache revalidation with selective session preservation, all while extending the four-layer SOLID architecture with new bounded contexts across the monorepo on a single production VPS. The AI quotation agent on WhatsApp Business Cloud API had to reuse the same live inventory and margin domain as the public site and reports — configurable quotation rules included — so inbound agent messages produce real supplier-backed quotes rather than invented fares, without forking business logic per channel.

What I Learned

Melincué reinforced how to extend a production-ready admin foundation into a domain-specific travel platform — reusing JWT refresh rotation, RBAC, audit logs and Socket.io while adding destination management, transfer pricing, fare-scouting reports and configurable margin engines as first-class modules under a four-layer SOLID structure. Delivering on-demand live quotation flows validated buyer UX where every price is time-bound and every displayed total already includes the agency commission. Building ops tooling — configurable scouting schedules, Drive/Sheets automation, ExcelJS exports and cross-report sales messages — confirmed what a travel agency team uses daily. Wiring an AI quotation agent to WhatsApp Business Cloud API on the same domain as admin and the public site validated channel-agnostic quotation: live inventory, margins and configurable rules stay the source of truth while agents quote from chat. Running the full stack in production — three-app monorepo on a VPS, Chromium in Docker, shared Redis sessions, Cloudflare and Nginx Origin CA — validated end-to-end delivery from integration packages through deploy, third-party API lifecycle and operational reporting at scale.

Built with

Node.js 22TypeScript 6.0.3Next.js 16.3.0React 19.2.4Express 5.2.1Prisma 6.19.3MySQL 8Redis 7ioredis 5.11.1Socket.io 4.8.3jose 6.2.4Zod 4.4.3Pino 9.14.0Tailwind CSS 4.3.3shadcn/ui 4.16.2Radix UIPlaywright 1.62.0ExcelJS 4.4.0googleapis 173.0.0WhatsApp Business Cloud APIGenerative AInode-cron 4.6.0bcryptjs 3.0.3Nodemailer 9.0.3Helmet 8.3.0Sharp 0.35.3Vitest 4.1.8fast-check 4.8.0DockerNginxCloudflare
Melincué Viajes: Digital Travel Quotation & Sales Platform