Projects P.05

Teramex

A system for the company Teramex that turns company documents into searchable agendas: search, chat with page references, filling tables from the content of documents and deadline monitoring. I designed and built it on my own.

Role
Design, development
Period
2026 → present
Scope
System for working with company documents: search, chat with page references, extraction into agendas, deadline monitoring
Status
In pilot operation
Chat over documents: an answer with a reference to the page where the figure sits in the contract. Sample data.
Fig. 1 · Chat over documents: an answer with a reference to the page where the figure sits in the contract. Sample data.

The brief

Teramex works with company documents, such as lease and insurance contracts or STK (roadworthiness test) protocols. The system I designed for them takes in the documents, reads them (scans too), sorts them into agendas, meaning registers of one kind of record, for example Vehicles or Insurance, and fills tables from them. You can search the documents and ask them questions in a chat.

The system is still in pilot operation.

What is worth mentioning

01

The chat answers with a reference to the page of the document

An answer without a source cannot be checked. So the chat names the document and the page it took the information from, and the document opens from the answer. In the screenshot I ask how much is paid for early termination of a mini excavator lease, and the answer points to page 3 of the contract, where that condition is. The reference lets a person quickly check the figure right in the document.

02

An uncertain reading does not go straight into the register, a person approves it first

It is not always possible to tell from a document with certainty which record the data belongs to, for example which vehicle. When the system is not sure, it does not write the data into the register. The record waits in the overview of pending records, which shows how sure the system is, and a person approves it, merges it with an existing one or rejects it. Ten are waiting in the screenshot. What goes into the register is decided by a person.

03

Deadline monitoring with advance warning

An STK, an insurance policy or a lease runs out and nobody notices in time. So the system watches date columns marked as a deadline and tells apart whether a deadline has already passed, is about to, or is fine. The agenda overview has an Expirace (expiry) panel that lists the watched deadlines from all agendas, ordered by how close they are. For deadlines you can set a rule for how many days ahead and through which channel the system should speak up, in the app or by e-mail.

What it looks like

Lease contract detail: document summary and fields with the lessor, lessee, dates, amounts and numbers
Fig. 2 · Data extracted from a contract into fields: parties, dates, amounts and numbers.
Inbox of orphaned records (Schránka osiřelých záznamů): a table of pending records with confidence and the buttons Schválit, Sloučit and Odmítnout (approve, merge, reject)
Fig. 3 · Inbox of orphaned records: uncertain readings wait to be approved, merged or rejected.
Overview of the Auta (vehicles) and Pojištění (insurance) agendas, with the Expirace (expiry) panel on the right listing the watched deadlines
Fig. 4 · Agenda overview with the Expirace (expiry) panel: watched deadlines ordered by how close they are.

What it runs on

  • NestJS
  • React
  • PostgreSQL
  • pgvector
  • Redis
  • Ollama
  • Docker

A web app talks to an API that stores documents and records in PostgreSQL with a vector extension, and processing runs through a queue. The application and database run on the client's server, a local model computes the vectors, and an external language model handles reading, classification and answers. The external model can be swapped for a local one once the client decides to invest in its own hardware.

Teramex architecture The browser runs a web app that calls the API. The API stores records, vectors and full-text search data in the database, stores documents in document storage, sends e-mails about deadlines and sends chat questions to an external language model. Document processing runs through a job queue, which has text vectors computed locally and sends documents to an external language model and OCR to be read, classified and filled in. BROWSER (REACT) API (NESTJS) E-MAIL (SMTP) DOCUMENT STORAGE JOB QUEUE (REDIS, BULLMQ) EMBEDDINGS (OLLAMA, LOCAL) EXTERNAL LANGUAGE MODEL AND OCR DATABASE (POSTGRESQL, PGVECTOR)

I describe how I build systems like this on the How I work page.

Want to build something similar?

Get in touch →