Frontend, multi-tenancy and operation of a product that evaluates incoming documents with an LLM and generates letters for law firms.

Starting point
The initial implementation was a specialized app for a single law firm and was not in a good state. It was to become a generalized product that can also be offered to other law firms. Due to the confidential nature of the project, screenshots of the first version cannot be shown.
The firm specializes in traffic accident cases, which follow a consistent workflow: various documents arrive for a case, a largely standardized initial claim letter is created from them, and further letters follow based on the information gathered. A pipeline processes all incoming documents: it reads the text, assigns the document to one of six classes (such as expert report, repair invoice or rental car invoice), extracts the values of that class with a self-hosted language model, checks them for inconsistencies and records where in the document each value is found.
My role
Concept, design and implementation of the frontend were mine, from scratch. From 2026 I also worked on the backend: multi-tenancy, the connection of the inbox, file storage and deployment. The extraction pipeline and the original backend come from colleagues. In autumn 2026 I prepared the project for handover.
Approach
The inbox shows all received documents in a sortable, searchable table with document type, sender and status. It indicates whether the pipeline encountered errors or inconsistencies. Documents arrive by email or are uploaded directly, up to ten PDFs at a time. The list refreshes in the background and announces new documents through a browser notification.

For each document, origin and metadata are visible: uploaded via the app or received by email, with sender, recipients, subject and date.

The extracted values are shown next to the original document and can be compared and overridden. The recognized value stays read-only beside the correction; changes are saved automatically after one second. Values and document are linked in both directions: hovering over a value highlights its bounding box, clicking a box marks the matching value, and clicking a value opens the preview on the right page. The preview zooms from 25 to 400 percent and can be panned. Invoice line items have their own presentation.

Once a document has been checked, it is assigned to a case through a searchable picker. The values are then available as placeholders for letters, amounts move into the "Schadentabelle" (damages table), and an entry is created in the email history of the case. The damages table contains the current financial positions: what is being claimed, what has already been paid and what is still outstanding. It can be edited in the frontend and is also set into the letter.

For the initial claim letter and all further letters, the firm's staff create templates based on blocks: text blocks, letterhead, footer and page break. Blocks can contain placeholders for the values of the case, which are filled in when the document is generated. The editor is built with the Quill editor library; a picker shows which placeholders already have a value for the case. The finished letter is generated as a PDF on the firm's letterhead, shown in a preview before saving and sent by email straight from the case, through the mail server of the respective firm.


The system is multi-tenant. Each firm works in its own isolated database; a master database holds users, roles and tenants. Connection data and mail server credentials are stored encrypted. Users and tenants are managed through the admin panel, including database connections, email settings and access restrictions to certain cases. Each tenant has its own color scheme, loaded after sign-in; a splash screen prevents the wrong colors from showing briefly beforehand.

Behind the scenes, in 2026 the frontend was moved to Tailwind CSS with custom design tokens that each tenant can override, and the backend from hand-written SQL to an ORM with migrations for all tenants. GitLab CI builds the backend as a container image; the frontend runs as a static application.
Result
The app for a single law firm has become a multi-tenant product that covers the route from the incoming document through review to the sent letter. In autumn 2026 it was handed over with cleaned code, database schemas and a guide for a fresh installation.
Planning a similar project?
A conversation clarifies whether and how your project can be implemented – with an initial assessment of scope and timeline.