Using code refactoring best practices to restructure a company’s existing software
For many companies, completely rebuilding an existing software system can be costly and impractical. A more practical approach is to modernize the application through targeted code refactoring, technology migration, and architectural improvements.
When a data service firm needed to update its data integration platform, BRF Consulting came to the rescue by allocating Full Stack Developer Lucas Guerra to help refactor it.
Code refactoring meaning
Refactoring is a very common process in IT projects because it restructures and cleans an existing computer code without changing its external behavior or functionality of the system, while improving its internal structure and readability.
“The main goal is to make the code easier to understand, maintain, extend, modify, and update,” Guerra explains.
“Usually, this involves reviewing the existing structure, removing duplicated or outdated code, improving components, organizing data flow, and preparing the project for future features….without necessarily changing what the product does for the user.”

What was refactored in this project?
After close inspection, BRF determined that instead of completely overhauling the data service firm’s county jail law enforcement web application, it should refactor the platform’s original dashboard. That’s because the client wanted a more flexible structure for future development.
This was a significant effort because it involved migrating the application's frontend from Angular to React using Remix, restructuring the codebase to improve maintainability and extensibility while introducing new geographic visualization capabilities.
“[The platform’s] dashboard system originally built in Angular was rebuilt in React and expanded with an interactive U.S. map feature,” Guerra remarks.
The tools used
To accomplish the task, BRF used specific tools to make it easier to organize the application, add new components, and integrate new libraries.
Remix and React: was utilized to rebuild the application structure, routes, and reusable interface components, making the project more flexible and easier to maintain.
Supabase: used for database integration, data fetching, CRUD operations, filtering, and pagination.
React Simple Maps: to build the new interactive map functionality, which was one of the main improvements. “This was especially important for the new map functionality, which became one of the main improvements in the refactored version,” Guerra explains.
What was the result?
The jail management dashboard was successfully modernized from Angular to React, improving performance and maintainability, while introducing a new interactive map feature that expanded the platform’s visualization capabilities for users.
Which projects can benefit from a refactoring process?
As projects and data systems expand, they become harder to maintain or need new features, so they can benefit from this process.
“Refactoring is especially useful when the codebase is old, duplicated, difficult to understand, or slowing down development,” Guerra explains.
Is refactoring a good method for any company?
“It can be advisable for other companies, as long as it is planned carefully and focused on clear technical and business goals,” Guerra adds.
About the author: Anna Lopes is the Communications Associate for BRF Consulting.
Lucas Guerra is a Full Stack Developer at BRF Consulting.
BRF Consulting provides Data Engineering and Software Development, assisting businesses to scale and become more efficient. For more information about our services, email us at contact@brfconsulting.com. |





Comments