Giao diện
@digiforce-nc/plugin-template-generator
Plugin sinh template ứng dụng — tạo template (bản mẫu) ứng dụng từ cấu hình hiện tại của instance Digiforce, cho phép triển khai nhanh instance mới với cùng cấu trúc.
Plugin này làm gì?
Khi đã cấu hình xong một instance Digiforce hoàn chỉnh (collections, UI pages, menus, workflows, permissions), plugin cho phép đóng gói toàn bộ cấu hình thành template tái sử dụng. Template này có thể dùng để tạo instance mới nhanh chóng — tương tự "Save as Template" trong các nền tảng no-code.
Năm tính năng chính
| # | Tính năng | Chi tiết |
|---|---|---|
| 1 | Full capture | Quét toàn bộ cấu hình: collections, pages, menus, roles, workflows, settings |
| 2 | Selective | Chọn phần cấu hình cần đưa vào template (không bắt buộc tất cả) |
| 3 | Metadata | Đặt tên, mô tả, version, tags cho template |
| 4 | Data exclusion | Chỉ export cấu hình (schema), không export dữ liệu thực |
| 5 | Apply template | Tạo instance mới từ template với một click |
Kiến trúc
Luồng tạo và áp dụng template
Nội dung template package
| Section | Mô tả |
|---|---|
collections | Định nghĩa collection: fields, indexes, relations |
uiSchemas | Page layouts, form schemas, block configs |
menus | Cấu trúc menu và navigation |
roles | Role definitions và default permissions |
workflows | Workflow definitions (nếu có) |
settings | System settings (branding, language...) |
metadata | Tên template, mô tả, version, author, tags |
Thành phần client
| Thành phần | Mô tả |
|---|---|
TemplateGenerator | Wizard tạo template: quét config → chọn items → đặt metadata |
TemplateList | Danh sách template đã tạo |
TemplatePreview | Preview nội dung template (collections, pages...) |
TemplateApplier | Wizard áp dụng template vào instance mới |
Dependencies
| Package | Vai trò |
|---|---|
@digiforce-nc/server | Server framework |
@digiforce-nc/database | Database ORM |
@digiforce-nc/client | Client UI framework |
Mục lục chi tiết
(Xem trang tổng quan ở trên)