Micro-frontend là kiến trúc chia giao diện thành nhiều ứng dụng frontend độc lập, mỗi ứng dụng do một team sở hữu trọn vẹn (từ code tới deploy), rồi tích hợp lại thành một sản phẩm.
- Nó áp ý tưởng microservices lên phía frontend.
Ví dụ: trên một trang chi tiết sản phẩm, phần thông tin sản phẩm, phần đánh giá, và phần gợi ý liên quan do ba team khác nhau xây và deploy riêng — team Đánh giá có thể sửa rồi deploy phần của họ mà không cần build lại cả trang.
A micro-frontend is an architecture that splits the UI into several independent frontend apps, each owned end-to-end (code to deploy) by one team, then integrated into a single product.
- It applies the microservices idea to the frontend.
- Example: on a product detail page, the product-info section, the reviews section, and the related-items section are built and deployed by three different teams — the Reviews team can change and deploy its section without rebuilding the whole page.
- Integration can happen at build-time (publishing a package) or run-time (loaded while running).
- Note: don't confuse splitting into components with micro-frontends — the core is independence of teams and of deployment, not merely breaking code into smaller pieces in one codebase.