5/5 - (2 votes)

Summary Summary

Industry: Legal Tech
Location: Mexico City, Mexico
Partnership period: November 2020–Ongoing
Team size: 6–8 experts
Software products delivered: API Platform, web application, mobile application (iOS)
Expertise delivered: Architecture design, infrastructure build (AWS Lambda), API design and engineering, FE development (React), UI/UX design, and requirements development

Tech Stack

  • Infrastructure: AWS (Amazon Web Services) Lambda, RDS, S3, CloudFront, SES, GitHub Actions, Terraform
  • Back-end: Java, Quarkus with GraalVM, Hibernate, PostgreSQL
  • Front-end: TypeScript, React
  • Mobile: TypeScript, React Native, Expo
  • Authentication: Auth0

Methodology, Tools

  • Shortcut
  • GitHub
  • Slack
  • Figma

Overview

Our partnership with a Mexico-based enterprise-oriented law firm started following a recommendation from one of our clients, Alex Samano. We have successfully completed numerous projects for Mr. Samano, including a Progressive Web Application for Mogami, a Mobile application with Augmented Reality functionality, and a Web Content Management System for Space Needle. After seeing our proven track record with similar products, we moved straight to discussion and planning with our client in November 2020.

The initial plan was to enhance and expand the client’s existing application. However, it was later on decided that an entirely new software solution would be developed from scratch, including both Web and Mobile (iOS) applications. This decision was made, based on the investigation conducted by our system architect, Ihor Dmitriev. Here, it is important to mention the efforts of our Business Analyst, who worked closely with the client in this regard. Together, they came up with solutions for how to cover the business demands effectively, by implementing various features in the new app.

Active development started on April 26, 2021, and continues till date.

“The core team from SPD Group at the moment includes 7 experts: two front-end developers, a front-end team lead, two back-end developers, a quality assurance expert, and a project manager. However, during different phases of development, this team expanded as per the demand. For example, we had a full-time designer for a significant amount of time, an architect at the beginning, and also some changes in the development team.”
– Alla Radziun, Project Manager, SPD Group

Business goals

The creation of the new Legal Shelf app would enable our client to offer more functionality to users, improve user experience by providing faster services than before, and attract new customers, as a result. The business goal of the application is to provide accounting and maintenance of legal documentation services. The target audience of this app includes Legal Shelf customers, large enterprises in the Latin American market, and law experts working at Legal Shelf.

In discussion with our client, we decided that a Web application with a responsive design for mobile phones and a mobile app that could run on the iOS platform would be developed, providing the following features:

  • Creating and storing all required legal documents in the company’s digital library
  • Enabling the participants to be involved in all stages of document processing
  • Providing flexible service of access management by setting specific roles in the system
  • Signing documents using Advanced Electronic Signatures
  • Tracking events within documents, such as expiration date
  • Handling user requests related to problems with the app or specific documents

Technical Challenges

While trying to meet the business goals and achieve the desired functionality, our team faced several challenges along the way. Three major challenges faced by the team from a technical standpoint are:

  • Usage of Java as AWS Lambda runtime
  • Implementation of search functionality that provides quick retrieval of required documents. This was a priority for the Product Owner, as he wanted to showcase this functionality to gain market advantage and stand out from the competition
  • Migration of the old data to the new app

Product in detail

We have designed system architecture and an advanced set of roles, after conducting in-depth business analysis. As a result, we developed a legal documents platform from scratch, which is secure and intuitive for users.

Business architecture

We implemented Role-Based Access Control (RBAC), an integral part of the entire system. RBAC includes such roles as Super Admin, Full Access User, Document Manager, Client Admin, Client User, Guest, and Signer. Defined permissions are based on the common needs of each user role for access segregation.

  • Super Admin is a role for an expert from Legal Shelf with full access to all companies in the database and their libraries
  • Full Access User is a special role that provides the same user rights as the Super Admin role for a particular company

Legal Shelf Case Study

  • Client User is a role that provides partial access for a user to particular folders and documents inside his or her company

Legal Shelf Case Study

  • Client Admin is a role that has permissions to manage file access within a company for Client Users and Guests

Legal Shelf Case Study

  • Document Manager is a role for Legal Shelf personnel that allows helping Client Users to manage their documents and support the document signing process

LegalShelf Case Study

  • Guest is a role that allows a user to participate in reviewing a document on a temporary basis via invite. Guests have view-only access to the specific folders and documents and are able to sign when they are assigned to a document as a Signer

LegalShelf Case Study

Product essentials

In this section, we will take a closer look at the key modules and functionalities of the Legal Shelf solution.

Library

We created a file management system that allows users to create and store legal documents of companies. Granular access became possible thanks to the functionality to make documents and folders available to specific users. It is also possible to share documents with users beyond the system. Outside visitors can be added as Guests to be able to review and sign documents.

The Library includes such features as:

  • Moving a group of files to another folder
  • Sorting by date, name, and type
  • Filtering by the most common characteristics

LegalShelf Case Study

Search

The Quick Search function allows users to find fuzzy matches for the specified terms. The system provides results ranking and also supports Spanish, which is very important for Latin-American clients.

Along with a Quick Search, there is also an Advanced Search feature that makes search results more specific and accurate. We conducted a considerable amount of work to optimize the performance of both search options and allow users to find documents as quickly as possible.

LegalShelf Case Study

Documents

Users with access are able to edit the metadata of each document, including such parameters as:

  • Name
  • Type
  • Subtype
  • Set of dates, depending on the type
  • Tags
  • Description

The user can upload PDF content of the document, download it and open it in the preview. Additionally, the user can add attachment files to the document, manage Participants and Signers from the Document Info page and share the document with other users.

Learn How Legal Shelf App Looks Like

Signing

Supporting document signatures is one of the most important parts of the Legal Shelf application. This function became possible due to the integration with Mifiel, a service that handles the document signing using Advanced Electronic Signatures (AES). Admins are able to assign a group of signers to a document, signers will be notified and go for signing the document. When the signing process is complete, the application notifies the users and provides a link to NOM 151 certificate.

Document signing feature

Requests

Any user is able to create a request that will be handled by one of the active admins. Leveraging this function, Guests can suggest modifications to a document after the review. Users can leave comments and add attachments to the request thread. This function is useful for tech support and allows making requests on creating and sharing documents, as well as adding signers.

User requests

Solutions

Legal Shelf had a legacy system written in PHP, which did not satisfy its business demands anymore. Our team decided to build a new, serverless solution using AWS Lambda for the following reasons:

  • The usage of this service guarantees high availability and out-of-the-box scalability
  • Versioning support allows easy deployment
  • Service charges are levied only for resources used when requests are running; so all development and testing can be done with little to no cost for computing resources

Our team has extensive experience in Java programming, so usage of Java in AWS Lambda runtime was a workable challenge for us. Java is a good choice for building fast and secure applications. However, it is common to choose JavaScript on Python in such situations, because of a quick cold start when compared to Java. For example, when the API is not called for a long period of time, the request spins up a new instance. Packing the Java app into GraalVM native executable allows Java in the native mode to achieve the same cold start time as the JavaScript app.

“Going with GraalVM compiler presented some additional challenges. For example, using libraries with reflection and adding resources required some explicit configuration. We decided to use Quarkus as it is one of the frameworks that supports native mode and one that is being actively developed at the moment. The GitHub Actions tool helped us configure a suitable continuous delivery pipeline to deploy the back-end part, using ready-to-use actions for the native build.”
– Viktor Ilvovskyi, Back-end Developer, SPD Group

The next step was to select an appropriate storage option for users’ legal data, such as documents and contracts. Not only should this option allow a quick search and provide relevant results, but should also store Mifiel metadata. Mifiel is a third-party service that provides additional functionalities like digital signing. We chose PostgreSQL for the back-end, as it is a great fit for achieving our technical goals and provides both OLTP and OLAP functionalities. For storing the documents, we decided to use AWS S3 (Simple Storage Service), as it offers secure and durable storage with quick access.

The implementation of a fast and intuitive search of the document library was probably our biggest challenge and the technical highlight of the entire project. We decided not to use external solutions, but rather, developed on the built-in PostgreSQL full-text search engine. After we made some customizations, this choice showed great results, both in quality and performance. Our search function could find fuzzy matches, provide results ranking, and support the Spanish language, which is critical for our Mexican partners.

When the client made the decision to migrate data from the old data storage to the new one, we decided to create an automatic script to avoid the hassles of manual data transfer. While mapping the old data models, we had to communicate a lot with the client to ensure that we interpret everything correctly. The magnitude of the data was another factor that pushed us to build a well-optimized migration algorithm. The script that we developed saved a lot of time for our client and our efforts were greatly appreciated.

“At some point, we started to investigate instances when the document search became very slow. Our experts identified the reason for this and worked out a way to eliminate the delay and optimize the search function. Our team redesigned the way in which the system works with document access data. This solution helped us achieve a 5x boost in the search speed.”
– Viktor Ilvovskyi, Back-end Developer, SPD Group

Results

In early 2022, with the help of our team, Legal Shelf launched a new version of the app in the form of a PWA (Progressive Web App), to ensure faster development and deployment across platforms. Within three months, we built a cloud service for Legal Shelf, accessible through Web and Mobile (iOS) applications, to enable digital signing, storage, tagging, and search of enterprise documents. We successfully achieved all business goals and overcame technical challenges to build the most innovative digital solution for document management in Latin America for enterprise clients, including the Latin branch of IBM.

18 enterprises with over 800,000 documents are now switching to a solution created by SPD Group, while Legal Shelf is looking to expand their client base and launch a new and improved application.

Till date, we are continuing our partnership with Legal Shelf, after the successful launch of the Web version of their app. In the near future, our experts are looking to develop Calendar and Notifications functions for the Legal Shelf app.

Testimonials Testimonials

“Going with SPD was an easy decision. Their range of knowledge from PHP to AWS Lambda and React made it possible to work with a single partner through the assessment of the exiting PHP platform as well as architecting and building our new one. They always seem to have the expert we need at the right time. It’s particularly helpful to be able to pull infrastructure experts on technologies like AWS Lambda as we need them, but not burden the team with their on-going cost. As a startup, it was also a life-saver to be able to pull UX/UI design and analysis resources when our team was maxed-out. We really appreciate and enjoy SPD’s partnership.”
– Alex Samano, Chief Product Officer, Legal Shelf