Built With MongoDB: ADEx
March 30, 2021 | Updated: October 17, 2022
Anyone who has reviewed legal documents knows how tedious and time-consuming the process can be. In the high-stakes, detail-oriented legal environment, even experienced lawyers or paralegals can make mistakes. And those mistakes can be expensive.
ADEx is an online legal document due-diligence platform that is transforming the way people interact with legal and financial documents. “Computers never get tired, no matter how many pages your legal document contains or how dense its language,” says ADEx Co-Founder and CTO Apoorv Khandelwal. “Our platform can abstract your legal documents faster and more reliably than a paralegal.”
The company has hosted more than 7 million contracts and partnered with large companies including Salesforce, Box, and Colliers International.
As part of our #BuiltWithMongoDB series, we spoke with Apoorv about the company’s growth, its tech stack, and his experience scaling with MongoDB.
MongoDB: What's ADEx's tech stack like?
Apoorv Khandelwal: For our back end, we use the Java-based Play and Spring frameworks. We use Angular for the front end and Electron for the desktop app. For various predictions, we have Python Flask applications, and the deep learning models themselves are trained with TensorFlow and Keras. Our cloud provider for servers and application deployment is Kubernetes.
We use various AWS services for storing clients’ legal documents, machine learning models, and other files. But the majority of our application data — ranging from contract summaries to our provision library to user events — is stored in MongoDB.
MongoDB: How did you decide to use MongoDB?
AK: Having worked at Amazon as a software development engineer, I was familiar with SQL databases and Hadoop. The team focused on machine learning, so its input data formats and sources were constantly evolving. My experiences showed me the pain associated with keeping SQL schemas up to date. When the choice came for ADEx, it was clear to me that we couldn’t use SQL. My experiences in successful startups showed me how we could successfully leverage the flexibility and scalability of MongoDB.
I had worked before with Dynamo and other NoSQL platforms, but we didn’t want to get tied down to specific cloud providers. There were conversations about graph databases such as Neo4j as well, but they were not ideal for the majority of our queries that execute bulk data scans or do not start from a known data point. In the end, MongoDB’s flexibility and large community support made it the best choice.
Later, upon joining the Techstars Accelerator in 2019, we were able to get credits through the Techstars and MongoDB for a startups partnership. We worked with a technical advisor at MongoDB to set up private connections from our applications. The learning curve was very short compared to other databases I had used; the basic concepts were clear, and the documentation guided me through the more complex data modeling and architecture decisions.
Between features such as end-to-end encryption, auto-scaling, and automated backups, much of the basic database management work is now handled by MongoDB Atlas.
MongoDB: How has MongoDB been for you as you've scaled?
AK: With Atlas, I don’t have to worry about scaling anymore. Given how intuitive and easy to use it is — especially with the metrics and visualizations — it has solved a bunch of problems. I don’t even have to think about storage, because the database capacity automatically adjusts based on current data usage. Often for SQL, a team of database engineers may be needed for managing and running the database. With Atlas, we don’t need any dedicated person at all.
We’ve been pleasantly surprised by the gentle learning curve while gradually utilizing more MongoDB features. For example, as we’ve introduced more-sophisticated use cases in our products, and we have enjoyed using MongoDB’s powerful aggregation framework to offload data processing from our application servers.
We have an M30 cluster for cloud, and M20 for QA.
MongoDB: What advice do you have for developers hoping to someday become CTOs?
AK: Three things. First, get prior experience at a successful startup with a small engineering team. You will witness firsthand the growing pains a CTO has to deal with. These practical lessons can be invaluable for your own venture.
Second, act as a filter between the business and technical teams. Imagine filling a small plate with food from a giant buffet. In a startup, the technical team has a limited capacity with which to build features or maintain the product. You should actively filter the flow of incoming ideas and features. Prioritizing the most crucial ones will prevent overflowing the technical team’s capacity while ensuring maximum value for customers.
And third, get good technical mentors. It’s difficult to design sufficiently abstract data models that anticipate all potential future pivots. But a good debate with mentors can save plenty of technical debt later on. The first years were hard for me until I got technical mentors, such as Lalit Kapoor and Mihai Strusievici through Techstars.
Looking to build something cool? Get started with the MongoDB for Startups program.