@opengis/docm
v0.1.15
Published
<!--  -->
Maintainers
Keywords
Readme
@opengis/docm
This service provides a robust platform for dynamic document generation and template lifecycle management, enabling teams to create, manage, and export documents from structured data with full control over content and formatting.
Features
- Template Registry – Centralized governance of templates with full lifecycle control and auditability
- Multi-Format Support – Standardize document creation across DOCX, HTML, and Markdown formats
- Dynamic Data Binding – Structured variable schema for consistent and controlled data injection
- Flexible Generation Engine – Integrate with internal systems via JSON, forms, or external IDs
- Document Lifecycle Management – Enforce workflows from draft to approval, signing, and closure
- Document Registry – Maintain a single source of truth with filtering, metadata, and traceability
- Real-Time Preview – Validate outputs instantly with controlled sample data
- Post-Generation Editing – Enable controlled updates while preserving document integrity
- Export & Compliance – Generate PDF/DOCX outputs for legal and operational use
Install
npm i @opengis/docmUsage
bun fcore-migrate --package @opengis/docmFastify / FCore server
import { createFCore } from "@opengis/fcore";
import fcoreFastify from "@opengis/fcore/fastify";
import {
createDocmRoutes,
resourcesDocm,
dictionariesDocm,
} from "@opengis/docm/plugin";
// fcore init
const ctx = await createFCore({
/*resources*/
});
await fcoreFastify(ctx)(app, {});
// docm register
app.register(createDocmRoutes(ctx));
ctx.resource.register(resourcesDocm);
ctx.dictionary.register(dictionariesDocm);
app.addHook("onClose", () => ctx.close());
await app.listen({ port: 3000 });The plugin adds DocM routes at /api/docm. Pass an existing FCore context to
createDocmRoutes; the host owns its lifecycle.
Frontend
// router.config
export default [
{
path: "/templates/:id?",
component: () => import("@opengis/docm").then((m) => m.TemplateCard),
props: { routePath: "/templates/:id?" },
},
{
path: "/documents/:id?",
component: () => import("@opengis/docm").then((m) => m.DocumentCard),
},
];Data Provider
const resourceList = {
code: "docm-resources",
name: "Перелік ресурсів",
items: [
{ code: "invoices", name: "Рахунки" },
{ code: "contracts", name: "Договори" },
],
};
export default resourceList;Documentation
For a detailed understanding of dataset, its features, and how to use them, refer to our Documentation.
Technology stack
Contribute
Feel free to contact us through our website SOFTPRO.UA or email [email protected]
- Report bugs
- Share your ideas
- Ask questions
Follow Us
License
Copyright © SOFTPRO. All rights reserved.
