Legal Document Management Solution
Web-to-desktop migration for a US legal company with AI-assisted component migration that accelerated delivery by up to 5x
ABOUT the project
- Client:
- Legal services provider
- Location:
-
USA
- Company Size:
- 500+ Employees
- Industry:
-
LegalTech
- Solution:
-
Reengineering and modernization
Leobit helped the customer migrate a web-based legal document management solution to a desktop application. The system manages legal documents and signature workflows for the customer’s entire team, distributed across multiple US offices.
The key challenge wasn’t simply moving the application from web to desktop. We had to rethink where each part of the system should run. Instead of moving everything off Azure, we kept the services that benefit from centralized access in the cloud and shifted routine data operations and processing closer to the user. This hybrid approach gave us the best of both worlds: lower cloud dependency and faster desktop performance without sacrificing security, synchronization, or collaboration.
Customer
The customer is a LegalTech company providing software for document-intensive legal workflows. Its platform helps legal professionals work with documents, manage signatures, and collaborate on shared data across offices.
Business Challenge
The customer’s document workflows ran entirely in the cloud. Every operation, retrieving a document, editing it, running a search, triggered requests to cloud-hosted APIs and the cloud database. Because Azure charges partly on request volume, computing resources, and operation complexity, day-to-day usage across all offices generated a steady stream of billable cloud operations.
The web version also constrained the user experience. The customer wanted the responsiveness of a native desktop application for a team that works with documents all day.
Why Leobit
The customer found Leobit through Clutch, where our reviews and track record in .NET and Azure development matched what they were looking for. They needed a technology partner that could approach the project as more than a front-end migration: moving from a cloud-hosted web application to desktop required redesigning how the solution handled data, processing, authentication, security, and communication with the services that would remain in Azure.
Project
in detail
The original solution was a React and TypeScript web application hosted on Azure, backed by a .NET back end, a cloud PostgreSQL database, and a Redis cache. Our team moved the user interface and most day-to-day processing to a .NET MAUI desktop application with a local database and local cache, while the APIs and the central database remain in the cloud to support synchronization and collaboration across offices.
Our team started by mapping the existing cloud architecture: how many services the solution used, what each service did, and how they communicated. The main complexity of a web-to-desktop migration hides in these dependencies. For each service, the team decided whether to replace it with a desktop equivalent or keep it in the cloud and let the desktop application communicate with it remotely.
The desktop application maintains a local copy of the PostgreSQL database and a local cache mirroring the cloud Redis instance. The application stores and retrieves most of its working data locally instead of querying the cloud for every operation.
Our team designed a synchronization mechanism between the local PostgreSQL database and the cloud-hosted PostgreSQL database, allowing most data operations to run locally while periodically synchronizing changes with the cloud. Rather than sending a cloud request for every database operation, the desktop application works primarily with its local data and exchanges updates with the centralized database at defined intervals. The cloud database remains the source for shared data, enabling collaboration and cross-office consistency. The synchronization layer is implemented within the .NET application stack and communicates with cloud services through secured APIs, with Microsoft Entra ID handling authentication and access to Azure-hosted resources. The exact synchronization frequency and conflict-resolution rules are defined by data type and business workflow to prevent concurrent changes from overwriting critical data.
Separating the desktop client from the Azure environment required new security configuration: keys, certificates, and access permissions for every remaining connection to cloud services. Instead of authenticating the client independently with each service, the team designed a single identity layer using Microsoft Entra ID. The desktop application authenticates once against this layer, which then grants access to the authorized cloud services (similar to signing into a desktop application with your account).
The team used Claude AI to migrate React components to Blazor. Because AI can operate continuously, this approach accelerated the migration process by up to 5x. Leobit QA engineers tested the resulting functionality and performed end-to-end validation of all AI-generated code.
To move users off the web version without disruption, the team displayed a notification in the web application prompting users to download the desktop version, tracked which users had installed it, and introduced a transition period with redirects to the desktop application before shutting down the web version.
Moving from web to desktop raised a practical question: how to deliver the application, and every future update, to employees across multiple US offices without building new distribution infrastructure. The team solved this with Azure and ClickOnce. Installation packages are hosted in the customer’s existing Azure environment, and ClickOnce lets employees install the application from a link and receive new versions automatically whenever an update is published. With no app store fees and no third-party distribution services involved, delivering and updating the application across all offices costs almost nothing.
Desktop application development
Leobit engineers built the desktop client on .NET MAUI, Microsoft’s framework for native applications running on .NET. Since the customer’s back end was already built on .NET, this choice kept the entire solution within one technology ecosystem, so the desktop application could reuse existing logic, tooling, and engineering expertise instead of introducing a separate desktop stack.
For the user interface, the team used Blazor Hybrid as a container. In this setup, the interface runs as Blazor components inside the native application, allowing the team to carry over the structure and workflows of the existing React front end rather than redesigning the product from scratch. Users work with the same screens they know from the web version, now running as a native application with direct access to local resources on the machine, including the local database and cache.
This project required Windows support only. All users are internal employees working on Windows machines, so there was no immediate business need for additional operating systems. The technology itself is cross-platform, and the team designed the architecture with that in mind: if the customer decides to expand later, the same application can be built and run on macOS without a rewrite.
Securing communication between desktop and cloud
When every component lives in the same Azure environment, related resources sit in one resource group and communicate freely because Azure recognizes them as part of the same infrastructure. Introducing external access from a desktop application breaks that assumption. Every remaining connection between the desktop client and cloud services had to be secured individually.
The team evaluated two options. The first was to configure an individual API key or certificate for each connection, so each cloud service authenticates the desktop client independently. The second was a single identity layer between the desktop application and the remaining cloud services: the client authenticates once, and the identity service determines whether it is authorized before granting access to the appropriate services. On Azure, this maps naturally to Microsoft Entra ID.
The desktop application authenticates users through Microsoft Entra ID and receives short-lived access tokens that are used to call authorized APIs, while token renewal allows users to remain signed in without repeatedly entering their credentials. Azure centrally manages access policies and permissions, so individual cloud services don’t need to maintain their own desktop-client credentials.
This also simplifies credential rotation and revocation: access can be changed centrally without redistributing API keys or certificates to every installed application. Where certificates or application credentials are required for service-to-service communication, they can be managed and rotated centrally rather than embedded in the desktop client.
Cost savings
Many cloud services charge based partly on request volume, computing resources consumed, and operation complexity. With the desktop architecture, the application performs most operations against its local database and synchronizes with the cloud periodically. Instead of hundreds of individual cloud requests, the system runs one periodic sync, which sharply reduces SELECT operations and other queries against the cloud database.
The bigger opportunity is in shifting processing away from the cloud. Previously, a user retrieved a document from the cloud, and every subsequent operation ran through cloud-hosted APIs and back-end services. Now the document can still be retrieved from the cloud when necessary, but subsequent operations run locally on the user’s machine. The cloud remains responsible for what genuinely requires centralized access: shared data, synchronization, collaboration, and APIs.
Technology Solutions
- Built the desktop client on .NET MAUI with Blazor Hybrid as the UI container, designed for Windows first with cross-platform support available for the future
- Used a local PostgreSQL database copy and local cache on the desktop to replace continuous cloud database requests with periodic synchronization
- Configured Microsoft Entra ID as a single identity layer to authenticate desktop clients against the remaining cloud services
- Kept APIs and the central PostgreSQL database in Azure to support synchronization and collaboration across offices
- Applied Claude AI to migrate React components to Blazor, accelerating the migration by up to 5x, with QA engineers performing end-to-end validation of the generated code
- Distributed the desktop application through Azure and ClickOnce at almost no cost
Value Delivered
- Reduced estimated cloud infrastructure costs by 30–40% by moving routine data access and part of the application processing from Azure to users’ local machines
- Reduced cloud database operations by an estimated 50–70% by serving routine reads and data processing from the local PostgreSQL database instead of continuously querying the cloud
- Improved application responsiveness, with common data operations expected to complete 2–3× faster, as frequently used data no longer required a network round trip to Azure
- Accelerated delivery by up to 5x through AI-assisted migration of React components to Blazor