MACEK.LEGAL
Document automation for a Czech law firm
2025 to now
Client project, built by me end to end
The platform drafts legal documents and reviews contracts that come from the other side. I did the architecture, backend, frontend, servers and the AI layer.
- 98 s
- to generate a contract, was 628 s
- 32
- MCP tools the agent can call
- 16,814
- court decisions in search
- 1¢
- roughly, per document
- 18 document types in 8 modules. Contract review marks risky or missing clauses and exports DOCX with real tracked changes.
- An MCP server with 32 tools for the in-house agent, Hermes. It writes and edits documents, keeps track of case deadlines, searches case law and reads scans with a vision model.
- A custom OpenAI-compatible proxy in front of the models. It strips personal data before anything leaves the network, routes between providers and counts cost per document. Hosters of the same model differed in speed up to 23x, so each model is pinned to one of them.
- When a lawyer corrects a mistake or dictates a rule, it applies to every future document.
Python · FastAPI · SQLAlchemy async · PostgreSQL · arq · Redis · MCP · React · TypeScript · vision-OCR · Docker · Caddy
