Kiến trúc & hạ tầng
Kiến trúc tổng thể, monorepo, khả năng chịu tải, chiến lược cache, tên miền.
Cấu trúc monorepo (nền tảng cho app sau này)
Khả năng chịu tải & chống spam
API stateless, scale ngang; Postgres + read replica; Redis cho cache/rate limit. Webhook trả 200 ngay, xử lý qua queue, idempotent theo message id. Rate limit theo IP + user + workspace; client có debounce, backoff mũ, dedupe request đang bay. Realtime chỉ gửi "có thay đổi gì", c
Chiến lược cache 1 năm & làm mới khi thay đổi
Loại Cache Control Làm mới JS/CSS đã build max age=31536000, immutable tên file chứa hash nội dung Ảnh/video/giọng nói 1 năm, immutable URL chứa hash/version Drive: fileId@version HTML no cache luôn kiểm tra lại → trỏ tới asset mới API no store — Mỗi lần deploy: Terraform gọi Clo
Bản đồ tên miền & email
Host Mục đích leadhub.hatech.io.vn Landing + web admin plan.leadhub.hatech.io.vn Trang plan api.leadhub.hatech.io.vn API loginv4.hatech.io.vn OIDC Email: [email protected] sản phẩm , [email protected] loginv4 — Cloudflare Email Routing + SPF/DKIM/DMARC. ⚠️ Cần quyết định: Ch