Bỏ qua, đến nội dung

@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ăngChi tiết
1Full captureQuét toàn bộ cấu hình: collections, pages, menus, roles, workflows, settings
2SelectiveChọn phần cấu hình cần đưa vào template (không bắt buộc tất cả)
3MetadataĐặt tên, mô tả, version, tags cho template
4Data exclusionChỉ export cấu hình (schema), không export dữ liệu thực
5Apply templateTạ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

SectionMô tả
collectionsĐịnh nghĩa collection: fields, indexes, relations
uiSchemasPage layouts, form schemas, block configs
menusCấu trúc menu và navigation
rolesRole definitions và default permissions
workflowsWorkflow definitions (nếu có)
settingsSystem settings (branding, language...)
metadataTên template, mô tả, version, author, tags

Thành phần client

Thành phầnMô tả
TemplateGeneratorWizard tạo template: quét config → chọn items → đặt metadata
TemplateListDanh sách template đã tạo
TemplatePreviewPreview nội dung template (collections, pages...)
TemplateApplierWizard áp dụng template vào instance mới

Dependencies

PackageVai trò
@digiforce-nc/serverServer framework
@digiforce-nc/databaseDatabase ORM
@digiforce-nc/clientClient UI framework

Mục lục chi tiết

(Xem trang tổng quan ở trên)