PlatformCập nhật 2026-06-30 · platform/PLATFORM-INTEGRATIONS.md
Platform Integrations — Bản đồ tích hợp
Tích hợp nội bộ (giữa module ↔ spine ↔ engine) và ngoài (3rd-party). Mọi tích hợp đi qua port/adapter, không rò rỉ vào domain.
Tích hợp NỘI BỘ
| Từ | Tới | Qua | Mục đích |
|---|---|---|---|
| Mọi module | Identity | port/SDK | Auth, RBAC |
| Mọi module | Tenant | port | Brand/theme/domain, RLS |
| Booking, F&B, Tour, Medical | Payment | port + webhook | Thu tiền, đối soát |
| Affiliate | Payment | port | Payout hoa hồng |
| Mọi module | Notification | port + queue | Email/SMS/Zalo, xác nhận |
| Booking, CRM, Search | Search | port | Tìm kiếm/filter |
| AI Concierge, Medical, Tour | Travel Intelligence | API/port | Recommendation, trust, MedicalTravelStrategy |
| Medical Tourism | Booking + Tour | domain reuse | Lưu trú + di chuyển cho gói điều trị |
Tích hợp NGOÀI (3rd-party)
| Hệ ngoài | Module dùng | Adapter | Phase |
|---|---|---|---|
| VNPay / Momo / ZaloPay | Payment | PaymentGateway | 2 |
| Email (Resend/SMTP) · Zalo OA · SMS | Notification | NotifierPort | 2 |
| S3 / Cloudflare R2 / MinIO | Media | StoragePort | 2 |
| Google Places · review sources | Travel Intelligence | ReviewSourceGateway (đã định nghĩa) | 4 |
| LLM (narrative/extraction) | Travel Intelligence | LLMReportGateway (đã định nghĩa) | 4 |
| OTA channel (Agoda/Booking) | Booking | ChannelManagerPort | 6 |
| Health provider / hồ sơ y tế | Medical Tourism | ProviderDirectoryPort | 5 |
| Maps / geocoding | Search, Tour | MapPort | 3-4 |
Nguyên tắc
- Seam-first: port định nghĩa trước, mock trước, 3rd-party thật khi có consumer.
- 1 adapter cho 1 hệ ngoài, có fallback + rate-limit + cache (theo external-data-integration của Travel Intelligence).
- Travel Intelligence là API nội bộ quan trọng nhất — mọi module cần trí tuệ gọi qua đây, không tự nhúng LLM.