
How do you migrate thousands of lines of tightly coupled legacy code to a modern web framework while keeping a critical municipal planning tool running smoothly?

For years, KomMonitor, an open-source platform developed at Bochum University of Applied Sciences and co-managed by 52°North, has helped municipalities combine Geographic Information Systems (GIS) with statistical indicators for urban, social, and environmental planning. Whether analyzing socioeconomic trends or supporting local sustainability initiatives, KomMonitor turns complex spatial data into actionable insights for planners and decision-makers.
Behind the scenes, however, the web client’s original foundation was showing its age. Built on AngularJS, the codebase faced the classic challenges of long-lived open-source software: an end-of-life framework, declining performance, outdated third-party dependencies, and steep onboarding hurdles for new contributors. Transitioning to modern Angular with TypeScript was essential to secure maintainability, type safety, and long-term community support.
This brought us to a central engineering challenge:
How can we transition a complex, organically grown web GIS to modern Angular incrementally without breaking existing features or blocking ongoing development?
The Challenge: Monolithic Services and the Limits of Hybrid Setups
At first glance, migrating from AngularJS to Angular sounds like a textbook software upgrade. In practice, however, years of organic feature growth had left behind a dense web of tightly coupled components and massive, monolithic services; some spanning thousands of lines of code for core tasks like data exchange and grid management.
Attempting a complete rewrite from scratch was neither realistic nor sustainable. At the same time, standard hybrid migration strategies quickly hit a wall. Trying to port massive legacy services in their entirety and bridge them back into older AngularJS components via Angular’s downgradeModule produced unstable runtime behavior, tangled dependencies, and conflicts in authentication state management.
On top of that, deep dependencies on legacy libraries, such as jQuery, outdated Bootstrap modals, and legacy Glyphicons, had to be replaced without breaking backward compatibility with existing municipal datasets or altering the familiar look and feel that daily users rely on.
The Breakthrough: A “Lean Migration Strategy”
To break the deadlock, we shifted our approach from services first to components first, services later, a workflow we call the Lean Migration Strategy. Rather than trying to untangle and rewrite monolithic backend-facing services upfront, we let individual, user-facing components drive the migration step by step:
- Select a target component: Start with a self-contained UI module (beginning with core administrative views such as dashboard, topic, and spatial unit management).
- Trace exact dependencies: Identify only the specific methods that component actually calls from the legacy services.
- Port and encapsulate in TypeScript: Rewrite just those required service methods as clean, strongly typed Angular services scoped directly to the component.
- Test in isolation: Verify the component and its newly encapsulated service logic together in a controlled environment before merging them into the hybrid application.
Alongside this structural shift, we systematically replaced deprecated third-party tools with supported modern libraries, introducing ag-grid-angular for data tables, NgbModal for dialogs, Angular CDK for drag-and-drop interactions, and Font Awesome for icons. Where legacy data still referenced older formats, smart fallback mechanisms ensured everything continued to render seamlessly without data loss.
More Than Refactoring: New Features and a Functional Preview
What started as a targeted effort to rewrite legacy code quickly turned into a catalyst for innovation. First and foremost, the Lean Migration Strategy established a clear, repeatable architectural blueprint that laid the groundwork for migrating all remaining components of the Web Client.
Even better, the modernized TypeScript foundation made it easy to enhance the Web Client with additional functionalities. Rather than merely replicating old screens, we were able to build brand-new tools and features directly on top of the migrated codebase, based on user feedback from the KomMonitor community:
- Reusable UI building blocks: Custom, modular components, including dedicated color, date, line, and icon pickers, eliminated duplicate code and accelerated new feature development.
- Responsive layouts and refined UX: Administrative workflows gained cleaner state handling, improved modal interactions, and better mobile responsiveness.
- Multi-language support (i18n): Using ngx-translate, we introduced seamless internationalization with smart language fallbacks, opening KomMonitor to municipalities and planning communities well beyond German-speaking regions.
Building on this, it was finally possible to implement several feature ideas proposed by our municipal partners, which we were not able to work on for the last years, due to the technical debts. In the following paragraphs, we want to provide insights into a few brand-new tools.
Multi-Client Capability
Managing data across different municipal administrative levels can get complicated fast. That’s why we took KomMonitor’s multi-client capabilities to the next level! To ensure top-tier functionality, data protection, and security, we extended KomMonitor to support multiple parallel spatial unit hierarchies concurrently. This means different municipalities and districts can seamlessly manage their own unique spatial structures simultaneously. Behind the scenes, we overhauled the core data model and updated the Data Management API. On the frontend, we rolled out fresh menu navigation and intuitive visual controls, making it effortless to switch and manage spatial hierarchies across both the map view and the admin panel.
Optimizing Permission Management
KomMonitor’s group-based permissions keep user and resource access neatly structured. But behind the scenes, one major bottleneck remained: assigning permissions to organizational units meant clicking through datasets manually – a time-consuming process that quickly turned into an administrative headache for Kreis Recklinghausen. To lift that operational weight, 52°North teamed up with Kreis Recklinghausen to completely reimagine and streamline permission management inside KomMonitor.
The result? A powerful new REST endpoint added to the Data Management API that brings bulk permission editing to life. On the user side, the Web Client Admin UI now features an intuitive multi-step dialog: administrators can pick multiple datasets in seconds, assign read or edit rights across whole teams at once, and review every change before hitting apply. Built directly on interactive clickable mockups co-designed with Kreis Recklinghausen, this upgrade turns complex permission workflows into a smooth, effortless experience.
Brand New Layer Controls
Digital public participation is a vital part of modern urban planning, yet traditional GIS tools often present steep accessibility barriers for people with cognitive disabilities or lower digital literacy. As part of the research project DiKomAll, researchers, UX designers, municipal planners, and co-researchers with disabilities collaborated to evaluate KomMonitor and explore how spatial data controls could be made truly barrier-sensitive and intuitive for everyone.
These insights inspired the development of a modern layer control component that facilitates the handling of different map information layers in KomMonitor. The new interface features clear collapsible group sections (for base maps, indicators, spatial levels, and geo-resources), a visual gallery for selecting basemaps with preview thumbnails, intuitive drag-and-drop layer reordering, and direct action controls for transparency, visibility, and quick zoom. In contrast to the rather cumbersome legacy Leaflet layer control, the new component makes complex map interactions effortless for all users thanks to a more intuitive user interface.
Advanced Export Functionalities
Exporting data should be as seamless as analyzing it. For municipal teams like the City of Essen, everyday workflows often revolve around standard office applications rather than complex desktop GIS software. To support non-GIS experts in their daily operations, we are introducing enhanced export capabilities and a streamlined, dedicated download center right within the map view.
With extended file formats, planners can export indicator time series directly into Excel spreadsheets or leverage GeoPackage files for streamlined spatial data handling. Single-click downloads are available via convenient action buttons next to each dataset, opening a clean modal dialog for instant format selection. Additionally, cart-style batch downloads allow users to select multiple indicators and geo-resources, configure spatial levels and timestamps, and download bundled data packages all in one go.
Complete Revision of the Accessibility Analysis
Since 2021, the district of Recklinghausen has relied on KomMonitor for evidence-based municipal planning, spanning everything from analyzing childcare coverage to shaping housing strategies and climate action plans. But due to evolved spatial planning needs, there were demands for a more intuitive, user-friendly accessibility analysis. To better empower non-technical planners across social services, urban planning, and economic development, we completely overhauled the accessibility analysis UI. The redesign introduces a streamlined workflow directly integrated into the map view with seamless address search. Planners in Recklinghausen can now evaluate the reachability of essential public services, such as daycare centers, healthcare facilities, or social infrastructure, in just a few clicks, dramatically reducing the barrier for evidence-based decision-making.
Looking Ahead
Thanks to continuous progress building on this foundation, the migration has now reached an exciting milestone: a functional preview version of the modernized KomMonitor Web Client is up and running.
The KomMonitor migration shows that breathing new life into a mature open-source project does not require a risky, all-or-nothing rewrite. By breaking a complex legacy architecture into manageable, testable slices, it is possible to modernize under the hood while delivering immediate value to users through new planning tools and a modern, less complex user interface.
Are you curious to explore the modernized codebase, test the preview, or discuss how a lean migration approach could work for your own web GIS project? Just get in touch with us, we would love to hear your thoughts!





Leave a Reply