Skip to content

Integration

@nx/asset tích hợp bằng cách được mount như các IGNIS component bên trong các ứng dụng host - không phải bằng các lời gọi mạng giữa các service. Phụ thuộc bên ngoài duy nhất của nó là S3/Minio.

1. Service liên quan

Hướng: được mount bởi (host sử dụng asset).

ServiceHướngBề mặtContractAuthChế độ lỗiIdempotency
@nx/commercehost.component(ApplicationAssetComponent)component in-processhost JWT/Basiccomponent init ném lỗi → host boot thất bạikhông áp dụng
@nx/financehost.component(ApplicationAssetBanksVNComponent)component in-processroute public-không áp dụng
@nx/ledgerApplicationAssetComponent + MetaLinkRepository để upload PDF/XLSX được tạoin-processhost JWT/Basiclỗi upload được ghi log cho từng fileupload không idempotent
@nx/coreimport MetaLink, PostgresCoreDataSource, EnvironmentKeys, crudPermissionsphụ thuộc TypeScript-thời điểm compilekhông áp dụng

2. Hệ thống bên ngoài

Hệ thốngHướngBề mặtAuthChế độ lỗi
S3 / MinioBunS3Helper (@venizia/ignis-helpers/bun-s3)APP_ENV_S3_ACCESS_KEY / APP_ENV_S3_SECRET_KEYhelper ném lỗi → 4xx/5xx tới client; upload cũng bắt lỗi MetaLink

3. Luồng cross-service quan trọng

3.1 Commerce mount asset cho media sản phẩm

BướcChi tiết
2Tham số kết nối S3 được đọc khi construct qua applicationEnvironment.get()
4Controller mount dưới base path của host (vd /v1/api/commerce/assets)

3.2 Ledger upload một tài liệu được tạo

4. Tính ổn định của Contract

Bề mặtĐộ ổn địnhVersioning
host.component(ApplicationAssetComponent)ổn địnhexport TypeScript
REST /assets, /meta-links, /assets/banks-vnổn địnhtiền tố URL /v1/ của host
BindingKeys.APPLICATION_S3_STORAGE_HELPERổn địnhstring key (lưu ý: namespace @nx/commerce)
Đường dẫn StaticAssetComponent presigned-URLkhông hoạt độngđã comment trong source - không phụ thuộc vào nó

5. Trang liên quan

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.