Appearance
MINAP File Service
Version: 1.2
Date: 2026-11-22
Status: Working baseline
SoT chi tiết cho File Service trong repo platform-file. Applications tích hợp qua File Service — không gắn trực tiếp object store. Metadata SoT nằm PostgreSQL schema minap_file; bytes nằm disk (temp/local/variant) và cloud S3-compatible.
Đọc nhanh
| Đối tượng | Bắt đầu tại |
|---|---|
| Owner | Bản đồ đọc → Ranh giới → Quyết định → OPEN catalog |
| Implementer | Database overview → Schema → Config keys → Temp & promote → API surfaces |
| Ops | Runtime web+worker → Disk roots & Infisical → storage_connections |
Nguyên tắc cốt lõi
- Domain bắt buộc soft-ref
…_file_id+ display projection…_file_metađể UI render không gọi FS trước — FS vẫn SoT metadata/bytes (D-005 DECIDED; ví dụ Core avatar). - File Service độc lập Platform Core: soft ref
acc_…/ws_…, không FK bắt buộc sang Core (DEC-011). workspace_idnullable trên metadata — foresight quota; không thay authorization (DEC-008/009).- Không bảng quota/usage trong FS; malware scan và FS
audit_events= DEFERRED. - Lifecycle: temp → promote đồng bộ (
file_id,tier=local) → migrate/purge/GC async (DEC-012). - Video: ffmpeg cover lúc promote (
cover_storage_name); variant gen từ cover; không API/cover(DEC-014/015). - Runtime: Next.js web
minap-file(API + Admin/platform-uisau) + workerminap-file-worker;node-cronchỉ trên worker; jobs orchestrator đọcconfigrồi đăng ký children; Redis lockjobs.lock.*; poll +POST /v1/ops/jobs/reload(DEC-016/017). - Secrets: Infisical (D-016) — wiring implement sau; dev có thể dùng
.envlocal tạm, không commit secrets. - HTTP paths + ErrorResponse = PROPOSED đến khi Owner/Gate đánh dấu DECIDED. OPEN catalog phải đọc trước khi invent DECIDED.
Hub platform-docs giữ overview nền tảng và link về SoT này — xem Refs platform-docs.