Surface chính
| Surface | App | Người dùng chính | Mục tiêu |
|---|---|---|---|
| Platform | apps/admin | platform operator | quản trị hệ thống, support, modules |
| Tenant | apps/saas | tenant operator | quản trị workspace, website, members |
| Public | apps/renderer | visitor website | render website theo domain |
| API | apps/api | mọi surface còn lại | business boundary trung tâm |
Dòng chảy chuẩn
- UI hoặc renderer gọi
apps/api. - API resolve auth + runtime context.
- API gọi service/repository theo module ownership.
- Response quay về đúng surface.
Điều không nên làm
- Không dùng frontend để tự xử lý data isolation.
- Không để
apps/adminhost tenant surface như một chế độ phụ. - Không dùng platform role để thay tenant membership.