Logistics Route Optimization Solution
Software reengineering for a Nordic waste container management service provider
ABOUT
the project
Client:
Location:

Helsinki, Finland
Company Size:
Industry:
Solution:
Services:
Legacy software modernization
Logistics container management solution ensures the proper placement of approved containers and provides route optimization to simplify the tracking and collection of waste. It aims to significantly reduce costs, increase pick-up frequencies, and enhance control over the billing process.
The biggest challenge was that the app had been migrated without a clear architecture, proper structure, or adherence to best practices. We have introduced proper app architecture, fixed all the issues, added unit and widget tests, refactored the code, and successfully finished app migration

Customer
Our customer is a Nordic leading innovator in cloud technology and sensor solutions designed to revolutionize waste management. Their tools help waste management companies optimize the ways to collect, transport, and distribute waste, with a focus on reducing operational costs, minimizing environmental impact, and enhancing overall efficiency in waste and recycling processes.
Business Challenge
Our customer faced a challenging software migration of their legacy Android application written on Java to the cross-platform Flutter framework, which resulted in an app plagued by glitches, poor functionality, and performance issues. The existing solution also lacked the flexibility to support new features. Since the customer didn’t have Flutter experts in-house, they sought external experts to help reengineer their logistics application, ensuring it could support future growth and development.
Why Leobit
Leobit’s extensive experience in cross-platform development, specifically Flutter, proved to the customer that we could be the right fit for the project. Our track record of delivering high-quality, scalable, and maintainable applications across various industries, including Logistics and Supply chain, further reinforced their confidence.

Project
in detail
Leobit’s Flutter experts successfully completed the migration process and thoroughly reengineered the customer’s container management service, ensuring it adheres to modern coding standards and engineering best practices. Leobit’s comprehensive approach transformed the customer’s container management service into a maintainable, scalable, and efficient solution. The improvement we made fixed the immediate issues and set the stage for future growth and development.


New architecture development and code refactoring
The project initially lacked any architectural framework, which made it difficult to maintain and extend. Leobit introduced the BLoC (Business Logic Component) architecture, which brought structure and scalability to the application. For state management, we used a combination of BLoC and Cubit, selecting the appropriate approach based on the specific task at hand. This allowed for efficient state handling and improved application performance.
To ensure reliability and stability, the core functions and repositories were thoroughly tested using a range of tests, including unit, widget, UI, BLoC, and golden tests.
To further streamline development, Leobit added scripts for tasks such as running full app coverage and executing utility functions. The team also introduced Linter as an addition to the BLoC architecture pattern in Flutter This tool helped enforce consistent styling and coding standards across the project, reducing errors and improving code quality.
Our Flutter team leader suggested modularizing the app into sections and adding abstraction layers to make it easier to implement changes at a low level—such as when business logic or backend components change. The application was divided into core logic and feature sections, with separate packages for the repository, API, models, and database layers.

Testing and code review
At the start of the collaboration, Leobit introduced Linter to the project and identified over 1,000 code issues. These issues included problems with styling, poorly written functions, and other inconsistencies. Leobit successfully resolved all these issues, significantly improving the quality of the codebase. We also introduced unit testing to reduce the number of bugs and minimize potential issues, leading to a more stable and reliable application. In addition to that, our Flutter team leader introduced a formal code review process to the project, which helped improve the overall quality of the codebase and allowed the in-house team to work more efficiently. Additionally, we integrated PiwikPro for analytics, providing valuable insights into user behavior and application performance.

HERE Maps integration
The customer needed a solution to plan and display routes for garbage trucks, track their progress along these routes, and store the progress in case of internet outages. To address these requirements, Leobit implemented a solution using the HERE SDK to display maps, truck routes, and the locations of waste collection containers. The Isar database was chosen to store data and enable the application to function offline, ensuring continuous operation even without internet connectivity.
Technology Solutions
- BLoC architecture adoption brought structure and scalability to the application
- Comprehensive architectural documentation development helped establish a clear structure for the project
- Modularizing the app into sections and adding abstraction layers streamlined the process of implementing changes at a low level
- HERE SDK integration to display maps, truck routes, and the locations of waste collection containers
Value Delivered
- The upgraded container management solution provided significant value to our customer’s clients, enabling them to reduce the number of bins and achieve financial savings of up to 35-40% through more efficient waste management practices
- A dynamic UI that is user-friendly on both phones and tablets