F
PlatformCập nhật 2026-06-30 · platform/PLATFORM-BLUEPRINT.md

Platform Blueprint — Travel Operating System

Tài liệu kiến trúc cấp CEO. Tầm nhìn 5 năm. Biến BNG Booking Platform từ một sản phẩm OTA thành nền tảng lõi của hệ sinh thái du lịch.

Thesis

BNG không dừng ở một website đặt phòng. Nó là module đầu tiên của một Travel Operating System: một bộ dịch vụ lõi dùng chung (spine) cộng một engine trí tuệ du lịch (Travel Intelligence), trên đó mọi sản phẩm/vertical mới (F&B, Tour, Experience, Medical Tourism, API Platform...) đều tái sử dụng cùng nền móng, không xây lại từ đầu.

  • Wedge (mũi nhọn): Booking/lưu trú — pain thường xuyên, có doanh thu + supply (listings, khách, giao dịch) ngay.
  • Compounding asset (tài sản tích luỹ): Travel Intelligence — trust/đánh giá calibrated, dữ liệu phản hồi, knowledge base.
  • Đích đến: Travel OS — hệ điều hành cho ngành du lịch.

1. Mô hình 4 tầng

┌────────────────────────────────────────────────────────────────────────┐
│ DELIVERY ADAPTERS (thin)                                                 │
│   Web · Mobile · Public API · MCP/Agent · Partner/Enterprise Dashboard   │
└───────────────────────────────▼────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────┐
│ VERTICALS / MODULES (nghiệp vụ)                                          │
│   OTA/Booking · Affiliate · CRM · CMS · Restaurant/F&B · Tour ·          │
│   Experience · AI Concierge · Medical Tourism · API Platform             │
└───────────────────────────────▼────────────────────────────────────────┘
┌──────────────────────────────────────────┬─────────────────────────────┐
│ TRAVEL INTELLIGENCE (engine trí tuệ)      │ SHARED SPINE (dịch vụ lõi)   │
│ knowledge · scoring · recommendation ·    │ Identity · Tenant · Payment ·│
│ reasoning · MedicalTravelStrategy ·       │ Notification · Search · CMS ·│
│ evaluation/trust calibration              │ API · Media · Audit          │
└───────────────────────────────▼──────────┴─────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────┐
│ DATA & INFRA                                                             │
│   PostgreSQL (multi-tenant, RLS) · Object storage · Queue · Cache        │
└────────────────────────────────────────────────────────────────────────┘

Quy tắc phụ thuộc: mũi tên chỉ đi xuống. Module/vertical phụ thuộc spine + intelligence qua port/API, không ngược lại.

2. Shared Spine — 8 dịch vụ lõi (mọi module BẮT BUỘC tái dùng)

Dịch vụVai tròHiện trạng
IdentityAuth, user, sessionFrontend RBAC sẵn; auth thật Phase 2
TenantMulti-tenant, brand/theme, domaintenant_id + 5 theme chuẩn bị; runtime Phase 3
PaymentThanh toán, đối soát, payoutMock; thật Phase 2
NotificationEmail/SMS/Zalo, webhookMock; thật Phase 2
SearchTìm kiếm/filter (listing, place, provider)UI sẵn; engine thật Phase 2-3
CMSTrang/blog/landing/bannerMarketing landing sẵn; builder Phase 3
APIREST/Public API, MCP/AgentSeam ports sẵn; public API Phase 3-4
MediaLưu trữ ảnh/file (S3)Ảnh tĩnh; storage Phase 2

Booking Platform hiện tại đã hiện thực bản frontend của Identity(RBAC)/Tenant(theme)/Payment(mock)/Notification(mock)/Search(UI)/CMS(landing)/API(ports). Spine là nơi mọi vertical mới cắm vào.

3. Booking Platform = Module #1

BNG Booking (5 portal: Guest/Partner/Admin/Customer/Affiliate) là module nghiệp vụ đầu tiên chạy trên spine. Nó:

  • Sinh doanh thu + supply (18 listing, 52 khách, 64 booking demo) — wedge thị trường.
  • Định hình domain abstraction dùng lại: Listing / Inventory / Reservation (xem DOMAIN-MODEL.md).
  • Chứng minh seam backend-ready (ports → repo) cho mọi module sau.

4. Travel Intelligence = engine trí tuệ

Hệ riêng (clean/hexagonal, ~/travel-intelligence) — không phải UI, là application layer trí tuệ: knowledge base có provenance, scoring, recommendation, reasoning, evaluation/trust calibration, và MedicalTravelStrategy (an toàn/sạch sẽ/khả tiếp cận). Booking + các vertical gọi engine này qua port/API để: gợi ý chỗ ở, chấm điểm tin cậy review, AI concierge, dynamic pricing (Phase 4+).

5. Medical Tourism = một VERTICAL (không phải dự án riêng)

Medical Tourism chạy trên cùng platform, tái dùng Identity/Tenant/Payment/Notification/Search/CMS/API + Booking (lưu trú+tour) + Travel Intelligence (MedicalTravelStrategy). Chỉ thêm domain riêng (cơ sở y tế, gói điều trị, hồ sơ bệnh nhân). Chi tiết: MEDICAL-TOURISM-INTEGRATION.md.

6. Roadmap 6 phase (xem TECHNICAL-ROADMAP-V2.md)

  1. Sales Demo ✅ — frontend 5 portal + sales assets + live.
  2. Backend MVP — DB/auth/payment/booking engine (spine thật).
  3. Production OTA — multi-tenant, vận hành thật nhiều khách.
  4. Travel Intelligence — tích hợp engine trí tuệ (recommendation, trust, AI concierge).
  5. Medical Tourism — vertical y tế trên platform.
  6. Travel Operating System — đa vertical/đa adapter trên spine + intelligence.

7. Nguyên tắc kiến trúc (bất biến)

  • Tái sử dụng spine — module mới KHÔNG tự làm Identity/Tenant/Payment/Notification/Search/CMS/API.
  • Domain abstraction — Listing/Inventory/Reservation, không khoá "Hotel/Room"; vertical extend, không thay.
  • Seam trước, implement sau — định nghĩa port/API ngay, hiện thực khi có consumer thật.
  • Multi-tenant từ gốctenant_id + RLS mọi bảng.
  • Không xây Phase N+1 khi chưa có nhu cầu thật — giảm rủi ro over-engineering.