Revamping Legacy Systems with Elixir, React, and Real-Time Collaboration in the CloudWritten by Evan Bancroft
In the ever-changing world of technology, older systems can drag a company down, like an anchor holding back a ship. When Faster Permits came to us, they were grappling with a dated system called Permitech 1.0. This was a custom project management program that was exclusively designed for Windows XP. Using this outdated system was cumbersome, to say the least. Each team member had to run their own instance of the software inside of a virtual machine, and every month the entire team had to gather in person to sync their separate databases and resolve conflicts.
It was obvious from the start the value that we could bring to Faster Permits in modernizing this program. As we approached this rebuild of a decade-old system, we had a few key goals in mind.
Moving Data to a Modern Database: We needed to transfer all the data stored in the old Permitech 1.0 system to a more up-to-date and user-friendly relational database called PostgreSQL. Even with the data in a new database, we still had to wrestle with legacy data with one thousand and one edge cases.
Building from Scratch: Due to the age of the existing software, we had to start from the ground up. This meant rebuilding Permitech's core business logic using a powerful and modern programming language called Elixir. This included everything from basic data management to complex tasks like generating custom reports and invoices.
Keeping It Familiar: While we were making significant improvements behind the scenes, we wanted to modernize the interface while ensuring that the new system felt comfortable and familiar to the Faster Permits team. This system had been in use for over a decade and we needed to create as little disruption as possible in their workflows.
Innovate with the Times: The main selling point of this new system for Faster Permits was a single source of information and the ability for the entire team to access this uniform data at the same time. Due to this, we made the obvious transition away from a local program that runs on each team member’s machine and towards a cloud-based web app that could run anywhere with an internet connection.
Before we could get started with anything else in this project we needed to modernize & migrate the data from a legacy SQL system to a modern Postgres one. We were very fortunate in that the legacy system did use a legacy form of Microsoft SQL Server. This meant that while our migration was tedious and time-consuming, we were not having to switch database paradigms. The migration primarily consisted of renaming columns to a modern standard, refactoring the relationships between tables, and archiving columns that we knew we would no longer be using moving forward. We also added new columns to modernize the data, like ID columns for each record and foreign key columns that utilized these new ID columns.
Modern Tech Stack
Even more so than the data, the server and the front end of the Permitech application needed an update. We knew we wanted to use GraphQL for the API due to its ability to simplify server calls, which would prove to be tremendously helpful as we built out complex dashboards.
The server application is written in Elixir, which is a time-tested & fault tolerant language. Everything from the simple CRUD operations to the complex business logic is handled by this Elixir application. We also used Absinthe to generate our GraphQL API which acts as the interface between the server and the front end.
For the front-end stack, we went with React and we utilized the Apollo GraphQL client to connect to our Elixir server. We chose React due to our team's familiarity with it as well as the wide ecosystem that has sprung up around the framework. This saved us countless hours as we could use libraries for things like date-pickers and form managers that otherwise would have taken us days or weeks to build out manually.
With the data formatted & interconnected correctly we could move forward with the most critical part of this process. That step was recreating the business logic that acts as the brain of Permitech. See this software doesn't just help a team manage projects. It is able to run reports on all the data in the system to provide transparency as to how the company is doing.
Crucially, it also has the ability to generate invoices based on the time tracking done by the team throughout the week. We had to get this right to ensure our client wasn't losing revenue. And though we had some hiccups through the first few months, the feature has been as stable as you can ask for since.
Since completing the initial version of the app, we have been able to build on top of this feature in ways that drastically impacted Faster Permits. When they opened their architecture agency Design by Faster Permits they came to us and asked if we could provide more flexibility in their billing setup. We said 'Of course!' and were able to (more or less) seamlessly integrate this feature into the existing app. This made it possible for both sides of the company to remain on this same app. This again just would not have been possible on the legacy version of the app.
One of the larger tasks, one that we didn't see coming at first, was updating an interface while not slowing down years of muscle memory. We had grand ambitions of a clean and minimal UI, and that became a challenge with the level of complexity that the system required. As it turns out, permits are not simple and this system needs to store a lot of data for each project and the most critical data needs to be readable at a glance.
One win that came from all of this work was our ability to add in things that just weren't possible in Permitech 1.0. If there is relevant client information that needs to be seen on a project's page, well we can do that now with ease. This opened up a whole floodgate of ideas and the version of Permitech 2.0 in the wild now looks much different from the MVP we initially launched with.
The biggest pain point of the old system was the monthly syncs. These were days when the entire Faster Permits team would gather in the office with their laptops and attempt to merge all of their work into a singular database.
This rarely went well, especially at the end of Permitech 1.0's life.
There were always conflicts between the databases and while they were easy enough to sort out the time for the entire team added up quickly. It got to the point where most of the team would lose an entire day of work to sync their databases together.
When we heard about this, we instantly thought 'We need to get them on a cloud solution'. Now that the entire application lives in the cloud, every team member can access the most up-to-date data all the time. Sync days are a thing of the past, never to return.
Elixir is also a phenomenal language for concurrent connections, so Faster Permits can scale their business as much as they want without worrying about Permitech keeping up.
At the end of the day, we have saved the Faster Permits team countless hours that otherwise would have been spent wrestling with a legacy system built 15 years ago. Permitech 2.0 has vastly outpaced v1.0 due to the level of customization that is possible in the modern system. The sky is the limit and we are always shaping it and making it just a bit better for their team.
Seeing the impact that this new system has made on their team's day-to-day work life has been rewarding, to say the least. It has been such a tangible shift and the project has been a joy to work on.
If you have a legacy system that needs some updating, please reach out! We are always looking for more companies to partner and work with to create truly great things.
Contact us at: email@example.com