Case study
AI SaaS Product
pdfs.build — AI PDF Template Studio
An in-house SaaS product where a chat-driven AI agent designs data-driven PDF templates in Typst — with live in-browser preview, a draft-to-published lifecycle, organisation workspaces, and a REST API, OAuth 2.0 server and MCP endpoint for generating documents at scale.
At a glance
16 technologies · 4 outcomes captured below
Case Study
AI SaaS Product
Context
AI SaaS Product
Focused product scope with measurable operational and user-facing outcomes.
Technologies Used
Problem Space
The Challenge
Teams that generate invoices, statements, contracts and reports from their own systems either hand-code fragile HTML-to-PDF templates or commission static layouts that break the moment the data changes. There was no tool where a non-technical user could describe a document in plain language, see it rendered instantly with real data, and hand developers a stable, versioned API to produce it in production.
Delivery Response
Our Solution
BrilliMinds built pdfs.build as a product: an AI agent that writes and iterates Typst templates, JSON schemas and sample data from conversational requests, compiled live in the browser through WebAssembly. Templates move through drafts, checkpoints and published versions inside organisation workspaces, and are rendered in production through a REST API, an OAuth 2.0 server and an MCP endpoint so external AI agents can generate documents too.
Inside the Build
The product goals, delivery process, users, design direction, and outcome
This section walks through what the product needed to solve, how it was delivered, who it serves, and what changed after launch.
Goals
pdfs.build is a BrilliMinds product for anyone who needs documents generated from data: invoices, account statements, quotes, purchase orders, certificates, HR letters and reports. Instead of a drag-and-drop editor or a code-only templating language, the core loop is a conversation with an AI agent that edits a Typst template, its JSON schema and sample data while the result renders live in the browser.
- Let a non-technical user describe a document and iterate on it in plain language, with every change visible in a live PDF preview within a second.
- Give developers a production-grade path from a designed template to an API call — versioned templates, a JSON schema for the input data, API keys, webhooks and an OAuth 2.0 server.
- Run the AI layer cost-efficiently across several model providers, so routine edits use cheaper models while complex layout work gets the strongest one.
Process
- 01
Product definition and the Typst decision
The first decision was the rendering engine. HTML-to-PDF pipelines are unpredictable for page breaks, tables and typography, while Typst is a modern typesetting language with deterministic layout and a compiler that runs both natively on the server and as WebAssembly in the browser. BrilliMinds prototyped the full loop — agent edits Typst, browser compiles it, preview updates — before writing any product code, then defined the template model around three files the agent controls: the Typst source, the JSON schema describing the input data, and a sample data document used for previews.
- 02
Agent and editor architecture
The server is a Hono API with a Mastra-based agent that exposes tools for editing the template, updating the schema, regenerating sample data, researching the web for reference layouts, and generating images. The agent streams its progress as a message stream that the React editor renders step by step, so the user sees "editing template", "updating schema" and "compiling" as they happen. A multi-model routing layer sends each request to the appropriate provider through an AI gateway, with tiered cost optimisation and automatic fallback when a provider is slow or unavailable.
- 03
Template lifecycle, workspaces and the gallery
Templates gained a draft/published lifecycle with checkpoints and a diff view, base-template cloning and style presets. Organisation workspaces share templates, custom fonts, images and presets between team members. To shorten the path from zero to a usable document, the team designed a gallery of 105 templates across 35 use cases and 10 categories — every one data-driven, rendered by the same engine that powers the API, and openable in the editor so the agent can reshape it around the user's data.
- 04
Integration surface and launch
For production use, the team built a REST API for rendering, API key management, webhooks, a render log with latency and status, an OAuth 2.0 server for third-party apps, and an MCP endpoint so external AI agents can design and generate documents on behalf of their users. The stack is deployed with Docker on Coolify with PostgreSQL and S3-compatible storage, with a marketing site, documentation, and a staged rollout through staging and production environments.
Product Users
Business users — operations, finance and admin staff — use the editor to design and adjust documents without writing code: they describe what they want, review the live preview, and publish when it looks right. Developers integrate published templates into their systems through the REST API and webhooks, relying on the JSON schema to validate input data and on versioning to change layouts without breaking production.
Organisation administrators manage workspaces, fonts, brand assets, members and billing. External AI agents and integrations use the OAuth 2.0 server and the MCP endpoint to generate documents as part of larger automated workflows, treating pdfs.build as the document layer of their own product.
Design Direction
The editor is a focused two-pane workspace: the conversation with the agent on one side and the document on the other, with tabs for the rendered preview, the input data form generated from the schema, version history and — for advanced users — the Typst source. The visual language is deliberately restrained: a warm neutral palette, a single orange accent, a sharp 6px radius and a clear type pairing of a grotesque display face with a clean sans body, so the document itself is always the most prominent thing on screen.
The rest of the application follows the conventions of professional developer tools — a light sidebar, dense but readable tables for templates, renders and API keys, status badges for the template lifecycle, and copy-ready code samples on the developer pages. The gallery is designed as a browsable catalogue with category filters and real rendered thumbnails, because the fastest way to explain what the product does is to show the documents it produces.
Outcome
pdfs.build shipped as a complete product: a chat-driven Typst editor with sub-second in-browser preview, a gallery of 105 production-ready designs, organisation workspaces, and a full integration surface of REST API, OAuth 2.0 and MCP. The multi-model routing layer keeps AI costs proportional to task complexity, and the versioned template lifecycle lets teams change document layouts safely after they are in production. The product now serves as BrilliMinds' reference architecture for agent-driven SaaS — the same stack later powered Chapbook.
Visual Support
Project Gallery
Screens from the delivered product, shown the way its users see them.
Web & desktop
Measured impact
Results & Impact
Outcomes we track with clients—numbers where they matter, clarity everywhere else.
105
ready-made designs across 35 document use cases in the template gallery
Sub-second live preview with in-browser Typst compilation
Multi-model AI routing with tiered cost optimisation and automatic fallback
Production rendering through REST, OAuth 2.0 and MCP with versioned templates
Have a similar project?
Contact usMore Projects
View all projects
Fire Maintenance Management System
A comprehensive platform that helps fire maintenance companies organize operations, manage recurring orders, and track t...
CareMile NDIS Operations Platform
A 42-module Odoo-based operations platform built for an Australian NDIS disability support provider to manage participan...
Cookeh Gaming Automation Platform
A Windows desktop application that emulates Android mobile games and automates in-game processes like resource farming a...