Skip to content
Email is the ERP of global trade. We gave it a document engine.
Logistics · International Freight
Web & App Development AI & Automation Integrations

Kontroll · Kila DocGen AI

Email is the ERP of global trade. We gave it a document engine.

AI document and analytics module built for Kontroll’s Kila logistics platform. Freight forwarders design their own Bills of Lading, Packing Lists and Arrival Notices on a visual canvas, fill them with live shipment data and export branded PDFs — while a Gemini-powered assistant drafts templates and dashboards from plain language. Built in eight days and integrated into Kontroll’s platform.

Duration

Delivered April 2026 · MVP + post-feedback iteration

Completed

April 15, 2026

Email is the ERP of global trade. We gave it a document engine.
8 days
MVP to delivery-ready

First commit Mar 25 → feature-complete Apr 1, 2026

162
Live data fields

108 shipment + 54 purchase-order fields loaded per tenant

10 + 6
Ready-made templates

10 trade documents (HBL, HAWB, D.O.…) + 6 KPI dashboards

7/7
Client feedback closed

8 pull requests in 3 days, directly in Kontroll’s codebase

The Challenge

Kila already centralized shipments, purchase orders and quotes, but the documents that data feeds were still assembled by hand in Word or Excel and sent by email.

Every Kontroll customer wants the same data in a different layout, and there was no way to compare operations visually over time.

  • — Trade documents rebuilt by hand for every shipment — the same data retyped from the platform into Word, then emailed
  • — ~160 fields per operation, and every forwarder wants a different subset, layout and brand on the same document
  • — Multi-tenant Firestore data with nested parties, containers, line items and charges — not flat rows ready to print
  • — Operational data was there, but no way for users to build their own KPIs without asking engineering
Our Solution

Six systems delivered as one self-contained Vue module that Kontroll’s engineers integrated into their platform, followed by a post-feedback round written directly in their codebase.

  • + Template Builder · drag-and-drop canvas with a 12-column Bill of Lading grid, live tables, autosave and pixel parity between editor and PDF
  • + Live data layer · 162 per-tenant fields across shipments, purchase orders and quotes, with nested parties, containers, line items and charges resolved automatically
  • + PDF engine · branded, paginated PDFs with the tenant’s logo, dynamic row heights, automatic landscape suggestion and footer variables
  • + Inside the operation · generate from a template within the shipment or purchase order, with a coverage check before the PDF exists and the file saved back into its documents
  • + Dashboard Builder · 10 widget types, the 10 logistics KPIs Kila asked for (OTIF, on-time rate, lead time by stage) and custom formulas per company
  • + Kila AI · a Gemini 2.5 assistant that drafts document templates and dashboard layouts from plain language, applied only with a click, plus an admin panel to tune it without code
Selected Frames

Inside the build.

Brand, interface and system — shown as they shipped.

Logistics KPI dashboard with on-time rate, OTIF, lead time and an origins map
DASHBOARD BUILDER
Logistics KPIs (on-time, OTIF, lead time by stage) and a global origins map · sample data
Kila AI proposing a shipment pre-alert template
KILA AI · DOCUMENT
Plain language in, a structured template proposal out, applied with one click
Generate-from-template modal inside a shipment with coverage badges
INSIDE THE SHIPMENT
Generate from a template with a coverage check before the PDF exists
Generated House Bill of Lading PDF
GENERATED PDF
Branded HBL rendered from live data: parties, containers, logo and footer
Custom KPI formula editor with live validation
CUSTOM KPI FORMULAS
Each company writes its own KPIs, validated live, with no eval() underneath · sample data
Under the hood

The editor is the visible 40 %.

This is not a pretty editor. It is a multi-tenant data layer over Firestore, a document rendering engine, an aggregation engine with logistics KPIs, a formula language of its own and an AI with guardrails — packaged as a module the client’s team integrated into their platform in days. The engines run in the browser on top of Kontroll’s existing architecture, and they are roughly 60 % of the code.

~60/40
Engine logic vs. interface code
18
Domain modules, 5 added after feedback
~10K
Lines of TypeScript and Vue in the MVP
72
Commits in the first eight days
5
Gemini flows, each with structured output
6
Logistics metrics computed from shipment milestones
01

What you see is what prints

The HTML canvas and jsPDF measure differently — pixels against points — so fonts came out 33 % larger in the PDF. Scale and grid widths were unified so the editor and the document match.

02

Any data shape, turned into a document

Parties as objects, arrays of objects, sub-collections and multi-container shipments go through one generic resolver. Metrics are also discovered from the real data, because the field catalog did not cover quotes or every custom field.

03

The AI proposes, people approve

Gemini receives the tenant’s real catalog of fields, widgets and metrics, so it cannot invent fields. Truncated JSON is repaired and normalized before anything is built, nothing lands on a document without a click, and the builder works fully with the AI switched off.

04

Custom KPIs without eval()

Users write spreadsheet-style formulas. A hand-written parser turns them into an abstract syntax tree and evaluates it per group, with live validation and error positions — no arbitrary code ever runs.

05

Built into someone else’s codebase

The post-feedback round was written directly in Kontroll’s repository, adapting to their versions of Tailwind, Pinia and the router, their routes, their conventions and their tenant system.

06

Hybrid AI Coding

Senior WebMinds engineering directing AI coding agents (Claude Code), with independent QA on every change. Architecture, judgment and every decision with the client stayed human. That is how a six-system module went from first commit to delivery-ready in eight days.

The Stack

Technologies & Tools

The tech stack powering this solution

Composition API
Vue 3
End to end
TypeScript
Build
Vite
Multi-tenant data
Firebase Firestore
AI co-designer
Gemini 2.5
PDF engine
jsPDF
Charts
Chart.js
Maps
Leaflet
UI
Tailwind CSS
Claude Code
Hybrid AI Coding
The Impact

Beyond the numbers, we delivered a system that transformed how this client operates.

01

Documents that fill themselves

A Bill of Lading used to mean retyping a shipment into Word. Now a forwarder picks the operation, the template fills from live data and the PDF is filed back into the shipment, coverage-checked before it is generated.

02

Every client, their own document

Same 162 fields, endless layouts. Each Kontroll customer designs its own formats, brands and KPIs, including formulas of its own, without opening an engineering ticket.

03

A module, not a side project

Delivered as a self-contained Vue module that Kontroll’s engineers integrated into their platform in days. Feedback rounds land as pull requests in their codebase, under their conventions.

Timeline
  1. Mar 25, 2026
    First commit: the DocGen AI MVP
  2. Mar 26–27, 2026
    Connected to Kila’s real data: dynamic field catalog, operations, sub-collections, conversational Kila AI and the first KPI dashboard
  3. Mar 30, 2026
    BL-style Grid Builder, full Dashboard Builder, AI for dashboards, the 10 requested KPIs and the map
  4. Apr 1, 2026
    Feature-complete: template protection, settings management and handoff documentation
  5. Apr 12–15, 2026
    Kontroll’s team integrates the module into its platform; formal delivery and acceptance
  6. Apr 22–24, 2026
    Feedback session with 7 items, closed in 3 days as 8 pull requests in Kontroll’s codebase
Start Your Project

Ready to achieve similar results?

Let's discuss how we can transform your business with a tailored digital solution.

Hi! I'm Atlas