Architecture Overview

Docamint is designed as a secure, scalable document-generation engine that merges Word templates with JSON or XML data.

Core Engine
Template Merge Engine
The merge engine processes DOCX templates, evaluates tags, loops, and conditionals, and produces final DOCX or PDF outputs. It preserves all Word formatting, styles, tables, headers, and footers.
Data
JSON/XML Parser
Incoming payloads are parsed into a structured object model. Nested fields, arrays, and complex objects are supported, enabling rich document generation scenarios.
Tags
Tag Interpreter
The tag interpreter resolves fields ({{customer.name}}), loops ({{#each items}}), and conditionals ({{#if customer.vip}}). Formatting helpers are applied during evaluation.
Output
DOCX/PDF Renderer
After merging, the renderer produces DOCX files using the OpenXML format and PDFs using a conversion pipeline optimized for layout fidelity.
API
REST API Layer
Applications integrate with Docamint through a simple REST API. Endpoints support template upload, validation, document generation, and batch processing.
Security
Secure Processing
Payloads and templates are processed over encrypted (HTTPS/TLS) connections. Templates you choose to store in Docamint Cloud are held in encrypted, tenant-specific storage. Payloads are never used for training or analytics.

Flow
High-Level Architecture Flow
Below is a simplified conceptual diagram of how Docamint processes a request:
Client App → REST API → Template Engine → Tag Interpreter → Merge Processor → DOCX/PDF Renderer → Output

This flow ensures that templates, data, and outputs remain isolated, traceable, and secure.