DEV Community

Cover image for When Shipping Meets Code: A Story of Collaboration and Innovation
Anesa
Anesa

Posted on

When Shipping Meets Code: A Story of Collaboration and Innovation

What connects an IT company from Sarajevo with one of the largest shipping firms in the U.S.? The answer is their shared vision for innovation.

This story is about building a successful long-term collaboration with our client and crafting several products that helped them overcome some of their main challenges – scaling their business and bringing several cost reductions in an industry that was once resistant to change.

The Rise of Digitalization in the Shipping Industry
With the constant growth of technology and the countless benefits digitalization has brought to various areas of life, the shipping industry has also opened its doors to automation. And our client recognized this from the very beginning. Investing in digitalization has led them to be one of the fastest-growing shipping companies in the US.

Seizing Opportunity in a Time of Crisis
At the beginning of 2020, a difficult time of the COVID-19 pandemic, when the world faced uncertainty, so did the IT industry. But for us, an opportunity for collaboration emerged, opening up a new path during a critical time. Our client recognized a need for a product that would automate and enhance one of its processes. What initially began as developing what was a primary task; as trust was established and quality was achieved, new project opportunities began to arise. Thus, in Atlantbh, a small but dedicated team of six people was formed, ready to take on this challenge.

Marking the Starting Line
You’ve likely purchased a frozen product at some point. When buying such products, they are kept at precisely controlled temperatures in the store, and we’ve often heard warnings against refreezing once-thawed items. However, the journey of these initially frozen products to markets across the country is a process most consumers rarely think about. Frozen and temperature-sensitive goods are transported in refrigerated trucks with strictly controlled temperatures. Even minor fluctuations can lead to spoilage and significant losses.

Before collaborating with us, the systems in place to monitor these highly sensitive temperature changes in refrigerated trucks were decentralized and required human intervention to address any issues. Therefore, it wasn’t a scalable system and had possibilities for failure as it heavily relied on the people operating the system. Automation of this system was a natural step forward, and that’s where we fit in with our first project – Trailer Monitoring.

The team that started work on the project included three Software Engineers, one Quality Assurance Engineer, one DevOps Engineer, a UX/UI designer, and a Product Manager on the team as well.

From Concept to Code
The project started with the goal of having a working production solution in two months. To achieve this, we worked on delivering a backend-only Spring Boot project with an event-driven architecture consisting of event generators, event processors, and a notification engine.

This approach allowed us to have a seamless data flow from receiving an external update to sending a notification email. Decoupling event generation, processing, and notifying allowed us to have a scalable, maintainable design.

  • Event generators were isolated allowing for independent data processing in parallel.

  • Event processors handled all of the business logic, and they were clearly separated from the rest of the system.

  • The notification engine had a simple entry point allowing us to easily add or change the communication method in the future.

No external libraries were used for sending and receiving these events, but rather a simple producer > consumer mechanism, built to allow scaling and future changes.

We knew upfront that the number of events could be large and that we had to store each event in order to know exactly what happened at any moment. As a point of reference, a trailer sent an update approximately every hour, and there were hundreds of trailers. After researching ways to keep up with this volume of data, we ended up using TimescaleDB with PostgreSQL. This proved to be a superb solution allowing for storing and querying millions of rows in a matter of milliseconds. We liked it so much that we even wrote another blog about it.

From the pool of millions of rows of data, there was the need to make geospatial computations (distance calculations, closest points, etc.) To support this, we extended PostgreSQL with PostGIS and also stored the latest state for each trailer. This made querying the current trailer state, all the trailers at some location, or the trailer path easy and fast, even after the trailer fleet expanded.

The project quickly expanded with the emergence of requests for a user interface. The UI started as a reporting dashboard at first, but over time, it became an essential tool for monitoring and controlling the trailer fleet, and it was included in the client’s onboarding process.

  • The maintenance crew used it to check for faulty trailers.

  • Operation managers used it to check the daily audit and statistics.
    Driver managers used it to always be up to date on the trailer state.

  • Admins for controlling notifications in real-time and setting schedules so no emails get lost.

Requests for new features were pouring in, and the trust we had established pushed us into new waters as a new project was around the corner.

Loading Things Up
Thanks to the success and value of our collaboration, we were given the opportunity to expand our team and work in another important branch of the client’s business, logistics – dealing with finding the right carrier to outsource transportation of certain goods (referenced as load in the text that follows). At the time, this whole process was completely manual – making inquiries, agreeing on the price for each load and handling common scenarios such as last-minute cancellations. The importance of this process and the scale at which it was performed made its automation a natural next step. A new team was formed, which ended up sharing members across different teams. This setup posed challenges as it introduced a new team dynamic, but it also had advantages – business logic often overlapped, and workload distribution across projects allowed for more flexibility.

The product aimed to automate the whole process from a load becoming available for transport, through offering it to specific carriers, to finally putting it up for auction where any partnering carrier could bid for it. With the new domain also came new challenges and considerations:

  • A large number of users that were external partners of the client

We explored multiple user management services, finally settling on using Auth0. We aimed to create a user-friendly solution that represents the client’s company in the best way, and that would scale with the increased number of users. We had to put procedures in place for onboarding users to a new tool and working on the product while it was actively used in production.

  • Real-time auctioning process

In case a load wasn’t accepted by any carrier it was offered to, it would get published to an auction where any of the almost a thousand partners could bid for it using the application. It was paramount to ensure the correct state of the system after a possibly large amount of user interactions at the same time. To prevent race conditions, we explored different locking solutions. Testing this feature was a challenge in itself, and our QA team kept improving the automation suite over time, challenging the limits of the application and exploring complex scenarios.

  • Real-time monitoring dashboards for brokers

Besides the carrier-facing UI that lets them keep track of offers and ongoing auctions, we implemented a dashboard aimed at brokers – users monitoring the complete lifecycle of a load. It surfaced a myriad of actions they could take to resolve even the most complicated edge cases that would ultimately come up. This dashboard utilized a web socket based communication protocol so the data presented on the dashboards would update in real-time.

The application was deployed to production after a year of development, and it has since been an invaluable resource in automating a high-yield business process.

The Golden Age
We were actively working on a couple of projects involving over 20 team members. The systems grew, as did our client’s trust and satisfaction. In 2023, a new opportunity emerged. Our client recognized the need to automate one of their HR processes. After extensive discussions and work on the MVP, we realized that the scope of the work extended far beyond improving a single process. With valuable experience behind us, this was an opportunity to start a project and adopt all the lessons we learned.

This system encompassed monitoring one of their yards, tracking personnel and equipment moving in and out of it, conducting various employee performance surveys, generating diverse analytics and behavioral insights, and even an in-app domain-specific task management system.

One aspect we are particularly proud of-and which significantly streamlined the development of this product-was our design process and established design system. Our design processes evolved with our projects over the years. We started with one UX/UI designer and ended with a team of four designers. Over the years, they have been building a reusable design system consisting of custom components in Figma, which reached its peak at the time we started working on this project. Custom components were translated into UI components and used as building blocks for complex pages. This sophisticated design system, complete with a storybook, helped turn frontend development into an intuitive, puzzle-like experience.

A distinctive characteristic of this project is that a lot of user input came from complex multi-stage questionnaires.

  • This required a scalable data model that supported different types of questions (text, multiple choice, single choice, answering by choosing from a map, etc.) as well as many ways to group them to create very specific forms

  • Forms on the UI were fully dynamic, powered by the backend service that was responsible for storing the full structure of the questionnaire, specific questions, and their answers

  • Later improvements included autosave capabilities and mechanisms for answering questions through integration with external services

Lasting Impact: More Than Just Software
Back in 2020, we didn’t know much about the complexity of the shipping industry and its core businesses. It is actually a lot more than moving different kinds of goods from point A to point B. Its role is crucial in global supply chains, ensuring products reach businesses and consumers efficiently. The systems we built covered key aspects of this industry: fleet management, logistics coordination, and regulatory compliance, all of which contribute to efficient and timely delivery.

Four years later, hard work and dedication have exceeded expectations. The team has grown significantly and set up four different tracks, developing products of great strategic value to the client, improving their key processes, and leaving a lasting impact on the entire organization. Many business processes were automated and centralized, leading to significant cost reductions and general business scalability. As the projects grew, so did our team and individuals. We learned a lot and established some of the procedures that are used on other projects as well. Over this period, more than 30 individuals contributed to these projects, building a shared legacy that the Atlantbh company will rely on in the future.

Top comments (0)