🏗️ Microservices Architecture
Thailand Market Platform — Event-driven · API Gateway · Kubernetes · Bangkok Region
Client Layer
🌐
Web App (PWA)
Next.js 14 · Tailwind · Zustand
CSRSSRISR
📱
Mobile App (iOS/Android)
React Native · Expo
FCM PushDeep Link
🏪
Seller Portal
Next.js 14 · shadcn/ui
DashboardAnalytics
⚙️
Admin Dashboard
Next.js 14 · Chart.js
GMVReports
API Gateway & Edge
🚪
API Gateway (Kong)
Kong · JWT Auth · Rate Limiting · Load Balancing
AuthRate LimitSSL TerminationRequest RoutingCircuit Breaker
☁️
Cloudflare CDN
CDN · DDoS · WAF · Image Optimization
CDNWAFDDoS
Core Microservices (NestJS · Docker · K8s)
👤
User Service
NestJS · PostgreSQL · Redis
AuthProfileLoyalty
📦
Product Service
NestJS · PostgreSQL · S3
CRUDVariantsInventory
🛒
Order Service
NestJS · PostgreSQL · Redis
CreateStatusHistory
💳
Payment Service
NestJS · Omise · 2C2P
ChargeWebhookRefund
🔍
Search Service
NestJS · Elasticsearch · Thai NLP
SearchSuggestFacets
🔔
Notification Service
NestJS · FCM · LINE API
PushSMSEmail
🎟️
Promotion Service
NestJS · Redis · PostgreSQL
CouponFlashLoyalty
🏪
Seller Service
NestJS · PostgreSQL
OnboardPayoutGP Calc
🚚
Logistics Service
NestJS · Kerry API · Flash API
BookingTrackingWebhook
Review Service
NestJS · PostgreSQL · NLP
SubmitModerateSentiment
📊
Analytics Service
NestJS · ClickHouse · Kafka
EventsReportsFunnel
🤖
AI/Recommendation
Python · TensorFlow · MLflow
RecoRankPredict
Event Bus (AWS SQS + SNS)
📨 Message Topics & Consumers
order.createdPayment, Inventory, Notification
payment.completedOrder, Seller, Loyalty, Analytics
shipment.updatedOrder, Notification, Analytics
product.stock.lowSeller, Notification
review.submittedProduct (rating), Loyalty (+50pts)
flash_sale.startedProduct, Notification (broadcast)
Infrastructure (AWS ap-southeast-1 Bangkok)
🗄️
PostgreSQL
AWS RDS · Multi-AZ · Read Replica
Redis Cache
AWS ElastiCache · Cluster Mode
🔍
Elasticsearch
AWS OpenSearch · Thai Analyzer
📁
Object Storage
AWS S3 + CloudFront CDN
📨
Message Queue
AWS SQS + SNS · FIFO
🐳
Container Orchestration
Kubernetes EKS · Helm Charts
📊
Monitoring
Prometheus · Grafana · PagerDuty
🔐
Secrets Manager
AWS Secrets Manager · KMS
12
Microservices
99.9%
SLA Uptime
<200ms
API P95 Latency
50K
Req/sec Peak
3
Availability Zones
Auto
HPA Scaling