Crystallon — Document conversion and generation

Crystallon is the Document conversion and generation component of Gluonify.

Document service: it turns a dynamic document into a fixed, self-contained, archivable one, and it generates new ones. Conversion: images (BMP, JPEG, PNG, TIFF, WebP) become PNG; PDFs become PDF/A-1B (fonts and colour profile embedded, XMP metadata) and several PDFs can be merged into one; nothing is kept. Generation: a PDF is produced from a JSON template and JSON data (invoice, quote and letter presets, Swiss QR-bill with strict validation, PDF/A-1B on request). Templates are kept per organisation in a dedicated gDown database, with versions, history and restore, together with their logos and images (SVG images are drawn as vectors); an application renders a template by its name, or at a given version, and every validation error says where it is in the template. A graphical editor in the web interface (English, French, Spanish, Italian and German, light and dark theme) lays the page out: blocks added and moved by drag and drop, text in styled segments, columns, the Inter and Helvetica fonts, live PDF preview with sample data. Each organisation can also upload its own TrueType fonts (licence checked, rights confirmation required, four variants per family, quotas): templates use them like the built-in ones and they are embedded in the PDF/A-1B. Its Code tab gives an application what it needs: the schema of the data the template reads (JSON Schema) and generated Java code, records and a facade built on the Java SDK, which is distributed through the Maven repository of Sea. Access is by Charm token (audience gluonify-crystallon) with one role per job: render to generate documents, convert to convert them, templates to manage them. An application that declares crystallon in its uses receives a short-lived render token from the platform, renewed without a restart; a signed-in person can also forward their own. Payment-provider secrets are read from the Top vault. Conversion of AVIF and HEIC images is done by external tools (avifdec, heif-convert) that must be installed on the node; without them the service answers 503. It ships as an application archive with its libraries.

In plain words

The archivist: it turns a photo or a document into a fixed form that looks the same everywhere and will still open in years, and it writes invoices, quotes and letters as PDF from templates drawn in a graphical editor, in the fonts of your organisation if you wish.

In physics

A crystal is a solid whose atoms sit in a regular lattice repeated in every direction: a liquid that cools settles into this fixed order.

Why this name

The service does the same to a document: a photo, a PDF produced by any tool or several PDFs to assemble are set into a stable format that depends on no reader.

The other components

Back to the architecture