Prompter is a heavy loaded platform for classification, analysis and creation of legal documents. On top of that it was created for lawyers, a target audience not quite full of early adopters. Below I describe briefly how I addressed many different challenges from the frontend perspective.

  • 🗄 Category: platform for law office
  • 💰 Size: 50,000 - 200,000 PLN
  • 🗓 Term: 11/2021 - 11/2022
  • 🖥 Frontend: React, Prime, MobX, WebSockets
  • 🤖 Backend: Python, Django, Docker, AWS

Prerequisites

Lawyers, as end users, are pretty demanding: skeptical about technological tools and reluctant to change their workflow. To address their needs our development team had to create a platform that would be super-intuitive, operate smoothly and give constant feedback. Minimalistic and aesthetic design was also essential. Fortunately, we were lucky to collaborate with great Polish designers, Tomek Kuczma and Stefan Sajdak, to create beautiful layouts.

In order to provide a highly accessible and efficient interface we decided to use WebSocket for API communication. Prompter processes huge amounts of data and we wanted it to ship results, as fast as possible (even partly), and to inform users, in real-time, about progress. To meet visual requirements I decided to use Prime - a stable and extensive UI library, which has been battle-proven in previous projects.

Classification and analysis

The main challenge of classification and analysis was to figure out how to display a lot of information in one view. Each document gives us hundreds of datapoints, some of them crucial i.e. missing clauses, or worst - suspicious clauses for a particular type of document. Another aspect was to render, in real-time, complicated charts based on processed documents such as selected clauses, languages and types of agreements. On the view layer I didn't want to try to reinvent the wheel. I used an old and familiar Chart.JS library. On the data layer I used MobX-State-Tree which is super effective for reactive calculations. Our documents repository was a living organism and we wanted to refresh analysis after every change.

Creation of documents

Next functionality was document creation. The main challenge was to provide an easy to use interface with drag-n-drop builder. Additionally we wanted to provide two-way data binding between document data points and plain text of agreement. Most of the work was custom solutions and required pretty creative work with react and hooks. Under the hood I had to deal with plenty of document templates with many versions of clauses. We even created a separate repository for drafts, templates and created documents. Thanks to that, the end user could generate documents based on our trained AI model, upload custom agreements or even choose multiple documents from the repository to support final creation.

Working in Prompter was slightly different than in other startups. Due to the financing structure based on European Funds, we had a roadmap for months ahead, full of very specific functionalities. For developers it ends up with a stable and predictable environment. Another advantage was an amazing team composed of academic people. Thanks to that we worked in a great atmosphere of discovering and creating new things, keeping a truly scientific approach to details.