
When we think of Norway’s National Postal Service, we think of legacy, tradition, and history – a service that has been delivering letters, packages, parcels, and sometimes even joy, for nearly 400 years.
But what happens when such an ancient institution faces the modern challenges of software development and cross-platform integration? How does a company like Posten Bring navigate the world of fragmented business logic across multiple platforms and systems?
But before I answer these questions, I want to ask YOU – Have you ever had a complex business rule-set problem? You know the kind where you have business rules (logic) spread across multiple platforms, systems, and applications? Some of them might even be alter egos of the same rule hiding in different apps. You never know which one might turn up where; there is no single source of truth, solving errors takes hours of debugging, and making changes requires (oftentimes) painful coordination across teams and applications (ugh).
We faced this exact challenge at Posten Bring As – Norwegian National Postal Service, founded way back in 1647 – a 378-year-old institution with software spanning more generations than most families! Our business logic was scattered across platforms, some of which were as ancient as the company itself (okay, maybe not that old, but close enough)!
In this article, I’m spilling the tea. We will discover how the team at a century-old Norwegian postal services giant tackled modern challenges with cutting-edge technology.
I’m going to walk you through our journey with Kotlin Multiplatform, including the hurdles we encountered, the lessons we learned, and why KMP is a game-changer for anyone grappling with similar challenges.
This article is for you if troublesome & unruly business logic keeps you up at night & you want that to end NOW. It is also for you if you like to hear a good story.
Problem Statement – Complex World of Logistics
Let’s start with a bit of context — From the moment you place an online order, to the time it shows up at your door, there’s a lot happening in the background. Behind every package being ordered and delivered, there are millions of lines of code and hundreds of thousands of business rules governing the flow of that package. But let’s briefly peel the onion here and take a closer look at how Posten Bring dealt with this chaos. Because—spoiler alert—logistics is inherently complex. And it’s not just a Posten Bring issue, it’s an industry-wide challenge.
In the past, we worked with a huge monolithic system, where all the business rules lived in one big beast of a codebase. Over the past decade, that beast has been broken down into smaller, more manageable apps. However, even though the monolith is no longer the centre of everything, we faced a new problem: duplicated business rules everywhere, spread across multiple codebases. And we had no central source of truth for those rules.
The shift from a monolithic system to microservices had its downsides. While we escaped the monolith, we were left with multiple codebases, each containing its own version of business logic. And that’s when the real challenges began.
Can anyone here relate? Has anyone else spent hours, or maybe days, sifting through millions of lines of code trying to figure out where a business rule was implemented and why it was different in every app?
Debugging in this environment wasn’t exactly “fun”.
It was like playing whack-a-mole – fix one issue, and another pops up!

And it wasn’t just production issues; even a simple question from our product owner could send us on a wild goose chase.
Inconsistent rules, slow feature development, and painful deployments led to a fragmented codebase, creating a high cost in business logic verification. This resulted in frustrated developers, stifled creativity, and an increased likelihood of bugs, all while hindering overall progress and clarity on feature success.
What did we want? Simple: One codebase to rule them all. We wanted a centralised source of truth for our business rules, one that didn’t feel like defusing a bomb every time we touched it.

With the problem clearly identified, the next question was: How could we solve this fragmented codebase chaos?
The solution turned out to be Kotlin Multiplatform.
What is Kotlin Multiplatform?
Kotlin Multiplatform (KMP) is an open-source framework developed by JetBrains that allows you to share code across multiple platforms (iOS, Android, web, and more) while retaining the benefits of native programming.
By using KMP, you can write common logic once and seamlessly run it on different platforms, making cross-platform development more efficient and scalable.
For a more in-depth exploration of KMP, you can dive into the official documentation here.
How KMP Streamlined Our Business Logic Across Platforms
At first, it wasn’t about KMP. We just wanted a centralised solution for our code. In 2019, we started pulling out these duplicated business rules and dumping them into a Kotlin library, which was then packaged as a JVM artifact, which we used as a dependency in our backend applications. The goal? A centralised place for our backend APIs to share code, and for us to finally have a semblance of control.

For a while, this worked wonderfully well. But in 2021, we realised something important: We needed to extend this solution to our frontends as well. We’d already built this great shared library and wanted to somehow use it for frontend validation too. We figured that if we could integrate the library we’d created two years ago into our frontend apps, we could maintain consistency and streamline development across the board.
That’s when we turned to Kotlin Multiplatform.
KMP not only addressed our immediate needs but also offered several key advantages that made it the ideal choice for us.
- Kotlin’s interoperability with Java
- Strong community support
- Support for diverse build targets
- Proven success with industry leaders
- Rich ecosystem of libraries
- Comprehensive documentation
Curious to see how we pulled it off with KMP? Watch the full talk here, where we dive into the code behind our success.
So, Have We Finally Demystified the Chaos?
Well, if you ask me, I’d give a resounding YES! Our team is walking around with a spring in their step, joy in their heart, and maybe even a bit more colour in their life.

Gone are the days of wild goose chases and endless debugging. We’ve cleared up a huge chunk of the mess thanks to Kotlin Multiplatform, but let’s not kid ourselves—it’s not all sunshine, rainbows, and unicorns.
While KMP has done wonders for organising our business logic, there are still a few X’s lurking around like uninvited guests at a party. It’s like trying to clean out a garage—you manage to get rid of most of the clutter, but there’s always that one mysterious box of forgotten stuff. We’ll get to those lingering issues, don’t worry!
So, yes, we’re making progress.
Here’s to fewer headaches, fewer wild goose chases, and a lot more high-fives!
Wins, Woes, and Wisdom
As with any transformation, there have been some clear wins and a few challenges along the way.
Positives: KMP Made Our Work Life Better
- Centralized Services & Business Rules
- Write-Once, Use-Everywhere
- Lower Maintenance & Testing Costs
- Faster Feature Releases & Optimised Reliability
- Developer Bliss: Mondays are fun again.
- Centralised Documentation: Automatic updates for code-driven docs.
- Product Owner Magic: Product owners reading code and raising PRs with ease.
Challenges: We’re Not Perfect Yet
- Experimental Features & Libraries: Some parts of KMP are still in beta.
- Business Rule Categorization: It’s a work in progress.
- JS Package Size: Generated JS can be bulky, but Webpack 5 helps.
- Developer Adoption & Skill Siloing: Learning curves and skill gaps are still being addressed.
- Tech Transformation Trials: Convincing non-technical stakeholders required extra effort.
The Road Ahead: Cooking Up Your Own KMP Masterpiece
Now that we’ve unraveled the spaghetti, I hope you’re tempted to cook up your own KMP masterpiece!
Start small—no need to dive headfirst into the deep end. Begin with a simple use case and build from there. Iterate and improve through repeated cycles, making adjustments as you go. And remember, KMP allows you to share code or write natively based on your project’s specific needs, so feel free to tailor your approach.
At the end of the day, KMP is about simplifying the complex, improving efficiency, and, of course, having fun along the way. So, grab your apron, get coding, and start cooking!