@dokus/dksd
Create documents, inspect exact snapshots, and build ordered document changes.
Dokus provides separate packages for document structure, blueprints, server requests, and browser viewing. Install only the packages your code needs.
The API key stays on the server. The render request names a document version, a blueprint, and the data for that run.
import { createDokusClient } from "@dokus/client";
import { defineBlueprint, input, values } from "@dokus/blueprint";
const dokus = createDokusClient({
apiKey: process.env.DOKUS_API_KEY!
});
const blueprint = defineBlueprint({
inputSchema,
rules: [values({ "customer.name": input("customerName") })]
});
await dokus.documents.render({
documentId,
versionId,
blueprint,
data: { customerName: "Northstar Logistics" },
generatePdf: true
}, { idempotencyKey });Create documents, inspect exact snapshots, and build ordered document changes.
Define accepted input, bind values to fields, and add show and repeat rules that target blocks, tables, rows, and cells.
Import documents, manage versions and blueprints, start renders, and inspect runs from your server.
Render exact document and font bytes in the browser and select text, fields, blocks, tables, rows, and cells. Read-only.
Use @dokus/client only in trusted Node.js code. Your server owns authorization, transport, storage decisions, and retries.
Pass authorized document and font bytes to the viewer. It renders and selects; it does not edit, save, or hold API keys.
Start with one document and one typed field.