A physician builds a healthcare application in Base44. It works, other clinicians start using it, and the organization wants to roll it out across more hospitals.
The application has already demonstrated its value. But expanding it introduces engineering problems that the original prototype wasn't designed to handle: patient data isolation, server-side authorization, recoverable backups, AI processing, and reliable data migration.
We encountered this situation while working with Anova Medical Associates on ClinicalDenialPro, an application built by one of its physicians to help prepare insurance denial appeals.
The physician reported reducing preparation time per case from approximately 30 minutes to five using AI-assisted drafting and voice dictation.
Our job at MEV was to preserve that workflow while rebuilding the application infrastructure on AWS, inside the client's own account.
The migration and production cutover are complete. Here's how we approached the architecture and the decisions that mattered along the way.
First, understand what the prototype is doing with patient data
The initial temptation with a low-code migration may be to start rebuilding the frontend and backend.
For a healthcare application, that can be risky. You need to understand the existing data flows before changing them.
We began with a Phase 0 assessment of the running Base44 application.
The assessment covered authentication, authorization, database records, external integrations, AI requests, speech processing, exports, service functions, and backup mechanisms.
We were looking for several things:
- Where protected health information (PHI) was stored and processed
- Which third-party services received patient information
- Whether users could retrieve records outside their permitted scope
- Which endpoints could expose or modify clinical records
- What backup and recovery options existed
- Which dependencies would need replacing
We also established a baseline for the migration by counting the existing case records across distinct patients.
That baseline became essential when verifying that historical data had transferred correctly.
An unsafe export was also the only backup
One finding required particular care.
The prototype had an email export mechanism that needed to be disabled. Unfortunately, that export had also become the application's only secondary copy of its data.
Disabling it immediately would have removed a risky data path while leaving the application without a recoverable backup.
We handled this in sequence:
- Create a complete backup of the existing data.
- Verify record counts and inspect samples.
- Disable the unsafe export and associated functions.
- Confirm the retired endpoints were no longer accessible.
This ordering matters during migrations from low-code platforms. Legacy features sometimes perform several jobs, including ones that were never formally documented.
Moving authorization from the browser to the backend
The Base44 prototype had an authorization model that suited its initial single-user workflow.
The frontend requested data and applied filtering to determine which records appeared to the user.
That approach became a problem when multiple advisors and two covered entities needed to use the same application.
Browser-side filtering cannot reliably enforce access restrictions because the backend must decide which records the user is permitted to retrieve in the first place.
We moved those decisions into the application backend.
Authentication now uses Amazon Cognito, with mandatory multi-factor authentication enforced by the application.
Once a user is authenticated, the backend determines the records that user can access based on their organization and site.
The browser receives only the data the server has authorized.
Enforcing tenant isolation centrally
ClinicalDenialPro needed to support two separate covered entities within one deployment.
We implemented organization-level isolation in a shared backend layer through which patient-data queries pass.
The user's organization is derived from their authenticated identity. The frontend cannot simply submit a different organization ID to retrieve another entity's records.
This also changed how we handle new backend routes.
Each route must declare its organization scope. Automated checks fail the build when a new route lacks that declaration.
That protects an architectural decision as the codebase evolves. A developer adding a new endpoint cannot accidentally omit the organization boundary without triggering a failure in CI.
Another improvement involved clinical rosters.
In the prototype, physician and advisor names were embedded in application code and enums. Changing the roster required a deployment.
We moved those values into database records associated with the appropriate organization and site. Administrators can now maintain the rosters, and the backend validates their use against the authenticated context.
What the AWS architecture looks like
The rebuilt application uses a React frontend, FastAPI backend, and PostgreSQL database, with AWS services providing identity, infrastructure, AI processing, and speech transcription.
The main components are:
| Component | Responsibility |
|---|---|
| Amazon CloudFront | Public application entry point |
| Amazon S3 | Private storage for frontend assets |
| Amazon ECS Fargate | Runs the FastAPI application backend |
| Private PostgreSQL | Stores clinical records and application audit data |
| Amazon Cognito | Authentication and MFA |
| Amazon Bedrock | Claude-based document drafting |
| Amazon Transcribe | Clinical voice transcription |
| AWS KMS | Encryption key management |
| AWS CloudTrail | Infrastructure activity logging |
CloudFront serves the frontend from a private S3 origin and routes API requests to the backend through an internal application load balancer.
The database remains private, without direct internet access.
Data is encrypted at rest using AWS KMS and protected in transit using TLS.
This provides a controlled environment for application data, infrastructure services, and identity management.
However, the architecture still needs application-level controls. AWS infrastructure security alone cannot determine whether a physician is authorized to view a particular patient's case.
That logic belongs in the application.
Keeping AI drafting and dictation while changing the data flow
AI-assisted drafting and dictation were important parts of the original ClinicalDenialPro workflow.
Removing those features would have reduced the usefulness of the application.
Instead, we changed how they processed patient information.
Replacing browser speech recognition
The Base44 prototype used browser-based speech recognition.
For the AWS rebuild, we switched to Amazon Transcribe.
The flow is now:
- The physician dictates a clinical narrative.
- Audio is sent through the authenticated application to Amazon Transcribe.
- Transcribe returns the transcript.
- The physician reviews the recognized text before using it.
Typed input remains available if speech transcription fails.
The production flow no longer uses the browser Web Speech API.
Moving Claude requests to Amazon Bedrock
The application also used Claude to draft appeal letters and status justifications.
We retained Claude but moved model access to Amazon Bedrock.
Requests go through the authenticated backend, allowing the application to control which clinical information reaches the model.
Where possible, patient identifiers are removed from model requests and restored when the final document is rendered.
We also kept the existing prompts during the initial migration.
This was intentional. Changing the model integration and rewriting prompts at the same time would have made it harder to determine why an output had changed.
We first compared the new drafting behavior with the prototype, then considered adjustments separately.
AI drafting and dictation services are configured to use the US regions approved by the client.
This kind of redesign is part of the work involved in moving vibe-coded healthcare applications into production. Existing functionality can often be preserved while authentication, processing paths, storage, and operational controls are rebuilt around it.
Migrating clinical records without silently dropping data
The application contained historical clinical records that needed to move from the prototype platform into PostgreSQL.
A conventional export-and-import process would have been insufficient because some source records contained values that could not be safely mapped to the new schema.
Examples included missing identifiers and values that did not match their expected fields.
The migration needed to expose these problems before writing production data.
Making dry runs the default
We developed a migration process that performs a read-only validation by default.
For each problematic record, the process reports its original source ID and the reason it cannot be migrated safely.
Those records are reviewed with the client before the separate apply run.
This avoids silently modifying, skipping, or incorrectly assigning clinical records.
The process followed four stages:
1. Extract and validate
Read the source records and identify missing or invalid values.
2. Review exceptions
Present records requiring decisions to the client, with their source identifiers and rejection reasons.
3. Apply the migration
Write records only after the validation and review stages have been completed.
4. Reconcile
Compare the migrated data with the audited source baseline.
Before working with the production dataset, we tested the migration against synthetic data shaped like the actual export, including deliberately problematic records.
We then rehearsed the migration against the audited baseline.
The rehearsal reconciled with zero record loss.
Only after those checks did we run the production migration. The migration and cutover have since been completed.
The important engineering decision here was to make failures visible before data was written.
For clinical records, a migration that finishes successfully while omitting historical information can be more dangerous than one that stops and reports an exception.
Application-level audit logs are different from AWS logs
CloudTrail provides visibility into AWS infrastructure activity, but it cannot tell you which patient record a user opened inside an application.
ClinicalDenialPro therefore needed a separate application audit trail.
The rebuilt application records patient-data access and changes using internal identifiers.
We also made several decisions about the level of detail captured.
For example, a library page can load 50 cases in a single request. Rather than presenting those reads as unrelated actions, the audit records share a request identifier so they can be traced to the browsing action.
Viewing an analytics chart is treated differently. If the chart displays aggregate counts, its audit entry records the chart view without attributing a read to individual patient records.
For AI-generated letters, the audit trail records which model produced the document. The model identifier is taken from the service response, so the record remains accurate when the configured model changes.
The audit trail is append-only and available through an administrator-only API.
Together, CloudTrail and the application audit log provide different levels of visibility: infrastructure operations and user activity involving patient information.
Making the application maintainable after the migration
Productionizing a prototype also means preparing it for engineers who did not build the original application.
The Anova rebuild included automated testing, database migrations, deployment controls, monitoring, and recoverable backups.
The CI pipeline checks both the frontend and backend.
Backend checks include linting, formatting, strict type checking, and tests against PostgreSQL.
Frontend checks include linting, automated tests, and a production build.
The pipeline also verifies that database migrations work from an empty database, checks third-party dependencies for vulnerabilities, and scans the packaged application.
We added two project-specific safeguards.
The first ensures that every backend route declares its organization scope. Any new route missing that definition causes the build to fail.
The second prevents the Base44 SDK from being introduced back into the frontend. An automated check rejects imports of the removed SDK.
These tests encode decisions made during the rebuild.
Without them, future changes could reintroduce the same architectural problems the migration was intended to address.
What this migration taught us about productionizing low-code applications
ClinicalDenialPro demonstrated that a physician could create a useful clinical workflow without an engineering team.
The original application was already delivering value. The physician reported reducing case preparation from about 30 minutes to five, and additional advisors had started using the tool.
Our engineering work concentrated on making that workflow suitable for broader operational use.
Several decisions from the project are worth carrying into similar migrations.
Start with the running application and its data paths. Source code alone may not reveal external integrations, unsafe exports, or unexpected dependencies.
Preserve the data before removing legacy features. An insecure mechanism may also be performing an essential operational function.
Centralize authorization. Organization and site boundaries should be enforced consistently by the backend, with automated checks guarding them as the application evolves.
Treat AI and speech processing as patient-data flows. Model calls and dictation services need the same attention as other integrations handling PHI.
Make migrations repeatable and auditable. Dry runs, exception reports, client review, and reconciliation reduce the chance of silently losing historical records.
Translate architectural decisions into tests. Production safeguards need to survive future code changes.
For ClinicalDenialPro, the result was a completed AWS migration and production cutover, with the physician's established workflow preserved.
A successful prototype had provided the foundation for the product. Rebuilding its infrastructure allowed Anova to support the application with the access controls, data handling, auditability, and engineering processes required for wider use.
This article is based on MEV's engineering work for Anova Medical Associates and its ClinicalDenialPro application.
Original article: Built a Healthcare App in Base44? Here's How to Move It to AWS
Top comments (0)