Compare and decide
Keep, Refactor, or Rebuild? How to Decide What Your Vibe-Coded App Actually Needs
Last reviewed: . Vendor facts checked against each vendor's own pages on the dates shown.
Short answer: Keep, refactor or rebuild depends on two checks: can the code and data leave the builder, and can everything touching patient data move to services that sign a BAA? If both are yes, keep the screens and move patient data to covered services. If the code cannot leave a builder with no BAA, rebuild from the current app.
You built an app because a workflow was frustrating. Staff like it, and now someone wants real patients in it. The next decision is not whether AI-generated code is good or bad. It is which parts of your app can stay, which parts must be replaced, and whether anything usable can leave the tool you built it in.
On this page the three words mean one thing each. Keep: the design and code stay; patient data moves to services covered by a BAA (business associate agreement, the contract in which a vendor that handles patient data for you agrees to protect it), and safeguards are added around it. Refactor: the screens and workflow stay; the database, sign-in, hosting or outside services that touch patient data are replaced. Rebuild: the current app becomes the specification, and the production version is built again elsewhere. PAHL makes Fabrica, so weigh our view with that in mind. Every rule and vendor statement below is cited and dated. This is not legal advice; your counsel or privacy officer makes the final call.
What HIPAA and the builders say, in their own words (checked November 15, 2026)
What any version of your app has to support
The keep, refactor or rebuild decision is really a question of which version of your app can carry the safeguards HIPAA expects. The starting point is the risk analysis, which is Required:
“(A) Risk analysis (Required). Conduct an accurate and thorough assessment of the potential risks and vulnerabilities to the confidentiality, integrity, and availability of electronic protected health information held by the covered entity or business associate.”
After it, you must put in place measures that bring the risks you found down to a reasonable and appropriate level. (HHS (eCFR), 45 CFR 164.308 -- Administrative safeguards., verified November 15, 2026) Whatever you keep has to make these possible:
- Access control, so only people or programs granted access can reach patient data. (HHS (eCFR), 45 CFR 164.312 -- Technical safeguards., verified November 15, 2026) Each user needs a unique user identification. (HHS (eCFR), 45 CFR 164.312 -- Technical safeguards., verified November 15, 2026)
- Audit controls that record and examine activity in systems holding patient data. (HHS (eCFR), 45 CFR 164.312 -- Technical safeguards., verified November 15, 2026)
- A data backup plan and a disaster recovery plan, both Required. (HHS (eCFR), 45 CFR 164.308 -- Administrative safeguards., verified November 15, 2026) (HHS (eCFR), 45 CFR 164.308 -- Administrative safeguards., verified November 15, 2026)
- Minimum necessary: reasonable efforts to limit patient data to what the purpose needs. (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026)
- An agreement with every vendor that creates, receives, maintains or transmits patient data for you. (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026) A vendor's own vendors that handle the data count too: (HHS (eCFR), 45 CFR 160.103 -- Definitions., verified November 15, 2026) your agreement must require your vendor to hold them to the same terms. (HHS (eCFR), 45 CFR 164.504 -- Uses and disclosures: Organizational requirements., verified November 15, 2026)
What the builders say about getting your code and data out
Whether a builder signs a BAA decides where patient data may live. Whether it lets you export code and data decides how much of your app can leave. Here is what each builder's own pages say:
| Builder | Code | Data |
|---|---|---|
| Lovable | Full source code download on paid plans; (View and edit your project's code - Lovable Documentation, verified November 15, 2026) Git sync copies code and database structure. (Sync your Lovable project code with GitHub, GitLab, or Bitbucket - Lovable Documentation, verified November 15, 2026) | Database export includes structure, data, user accounts and password hashes, but not storage files or secrets. (Back up, restore, and export your project's database - Lovable Documentation, verified November 15, 2026) |
| Bolt | Zip download on desktop; (Bolt (StackBlitz, Inc.), Manage your projects, verified November 15, 2026) GitHub sync with full change history. (Bolt (StackBlitz, Inc.), GitHub for version control, verified November 15, 2026) | Table rows can be exported or copied in CSV or JSON. (Bolt (StackBlitz, Inc.), Database tables, verified November 15, 2026) |
| v0 | Code export and two-way GitHub sync. (Vercel, FAQs | v0 Docs, verified November 15, 2026) | Sits with the database provider you connected, such as Neon or Supabase. (Vercel, Databases | v0 Docs, verified November 15, 2026) |
| Replit | Repository can be linked to an outside Git provider. (Replit, Using the Git pane, verified November 15, 2026) | Production database reachable from any PostgreSQL-compatible client. (Replit, Connection details, verified November 15, 2026) |
| Base44 | ZIP export and GitHub sync on Builder plan or higher, (Base44 developer tools - Base44 Support Documentation, verified November 15, 2026) (GitHub Integration - Base44 Support Documentation, verified November 15, 2026) but the code still relies on Base44 to run. (Base44 developer tools - Base44 Support Documentation, verified November 15, 2026) | Tables exported separately as CSV. (Base44 developer tools - Base44 Support Documentation, verified November 15, 2026) |
| Bubble | No source-code export; JSON export is for another Bubble app. (Can I export my Bubble application? | Bubble Support Center, verified November 15, 2026) | Records export as CSV, JSON or NDJSON. (Exporting data | Bubble Docs, verified November 15, 2026) |
| Glide | We could not confirm a way to export app code to run outside Glide from Glide's own pages as of November 15, 2026. (Glide: public pages we checked (23 pages), verified November 15, 2026) | Tables export to CSV. (Data | Glide Docs, verified November 15, 2026) |
| FlutterFlow (new AI builder) | No source-code export or GitHub; only compiled phone builds. (Not available | FlutterFlow docs, verified November 15, 2026) | Built-in backend does not export records. (Not available | FlutterFlow docs, verified November 15, 2026) |
| FlutterFlow Studio | Source download on Basic and above. (Pricing · FlutterFlow, verified November 15, 2026) | Data lives in your own Firebase, Supabase or APIs. (FlutterFlow or FlutterFlow Studio? · Two ways to build, verified November 15, 2026) |
Two statements matter most for this decision. Base44 is direct about what its export is and is not:
“The exported code still relies on Base44 to run, so a ZIP is a copy of your code, not a way to move your app off Base44.”
And Lovable, whose code exports cleanly, still says a move is several manual steps:
“Lovable does not transfer a project to another backend in one step. To move, export your database, download your storage files from More → Storage, and move your code with Git sync.”
On BAAs: Lovable says it does not sign them, (FAQ - Lovable Documentation, verified November 15, 2026) and Base44's documentation says it cannot sign one. (Privacy and security - Base44 Support Documentation, verified November 15, 2026) Bubble now signs a BAA, but only as an add-on to its Dedicated Enterprise plan; (HIPAA | Bubble Support Center, verified November 15, 2026) get that agreement in writing and confirm what it covers before relying on it. The full, dated list is in the BAA Matrix.
What this means for your app: decide part by part, not app by app
Few apps are a single keep, refactor or rebuild. Sort each part where patient data can sit, then add up the result.
- Screens, wording and workflow. Usually the most valuable part and the easiest to keep. They hold patient data only when seed or demo records are baked into them.
- The database. If it lives inside a builder that offers no BAA, it must move. Moving it to a covered service is a refactor, not a finish line: Supabase's BAA, for example, leaves Row Level Security policies (database rules that decide which rows each user can read), API keys and sign-in settings to you. (Business Associate Agreement (Supabase Legal / Customer Legal Resources), verified November 15, 2026)
- The sign-in and user table. HIPAA counts demographic details a provider collects about a patient's care as identifiable health information, (HHS (eCFR), 45 CFR 160.103 -- Definitions., verified November 15, 2026) so treat patient names, emails and phone numbers in your user list as patient data. Lovable's database export carries user accounts and password hashes, (Back up, restore, and export your project's database - Lovable Documentation, verified November 15, 2026) so plan where those land. A login screen does not prove that each user reaches only their own records; test that separately.
- Uploaded files. Insurance cards and photos often travel separately from the database. On Lovable they must be downloaded on their own. (Back up, restore, and export your project's database - Lovable Documentation, verified November 15, 2026)
- AI calls, email and texts. Each outside service that receives patient data needs its own agreement. (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026) These are often single functions you can swap without touching the screens.
- Logs, analytics and preview links. Easy to forget, and often the place a patient name ends up without anyone deciding it should.
- The builder chat history. If you pasted real patient details while building, treat the chat as one more place patient data may sit, and deal with it separately from the code. See what to do if patient data is already in Lovable.
Then add it up. If only the data, sign-in and a few outside services must change, the app is a Keep or Refactor candidate. If the core of the app cannot run outside a builder that offers no BAA, the screens become the specification for a Rebuild. If the builder signs a BAA on a plan you can use, staying put under that agreement is a real option too.
The decision table
Answer each question honestly. The column where most of your answers land is your starting point, not a final verdict. This is a decision aid we propose, not a validated scoring tool.
| Question | Keep | Refactor | Rebuild (or pause) |
|---|---|---|---|
| Can the code run outside the builder? | Yes, today | Yes, once the backend is replaced | No usable export |
| Can the data be exported, including users and files? | Yes, complete | Yes, in pieces you can reassemble | No, or only partly |
| Can you list every place patient data goes? | Yes, all covered by agreements | Yes, and the uncovered ones can be swapped | No one can say |
| Can you show each user reaches only permitted records? | Tested | The rules can be added in one layer | Users and records are tangled throughout |
| Can you restore from backup and roll back a bad release? | Rehearsed | Can be added and rehearsed | No safe way back |
| Is the clinical purpose agreed and owned? | Yes, bounded | Needs a narrower workflow | Unresolved: pause first |
Answer the backup and rollback row with your builder's own rules, not its undo button. Replit, for example, says: “Checkpoint rollback never touches your production database.” (Data recovery - Replit Docs, verified November 15, 2026) Production data is recovered separately. So a refactor that changes your database tables needs its own copy of the patient data and a restore you have actually rehearsed, apart from any code checkpoint.
Pause is a valid outcome. If the purpose, the legal role or the owner of the app is still unsettled, settle that before any code moves.
Build a small evidence packet before you choose
Whoever helps you decide, whether that is your own team, a developer or PAHL, will need the same material. Assemble it with synthetic records, never real ones:
- A short screen-by-screen walkthrough, plus the uses the app is not meant for.
- A list of every service the app calls: database, sign-in, file storage, AI model, email, texting, analytics, hosting.
- A map of where patient data goes and who can see it, by role.
- Whether you can export the code and the data today, and on which plan.
- Tests beyond the happy path: a user denied access to another patient's record, a missing record, bad input, an outside service failing.
- The name of the person who will maintain the app after launch.
If you want to test with real records stripped of identity, removing names is not enough. Under the safe harbor method, identifiers such as email addresses, Social Security numbers and medical record numbers must go too, (HHS (eCFR), 45 CFR 164.514 -- Other requirements relating to uses and disclosures of protected health information., verified November 15, 2026) or a qualified expert must determine and document that the re-identification risk is very small. (HHS (eCFR), 45 CFR 164.514 -- Other requirements relating to uses and disclosures of protected health information., verified November 15, 2026) Synthetic data avoids the question. The packet also feeds your risk analysis; our risk analysis template is built around the same questions, and what a HIPAA app review checks walks through how a reviewer uses it.
How this goes wrong: the export that never left
A hypothetical scenario. Imagine a two-physician dermatology practice with a Base44 intake app. Patients upload photos of a rash and their insurance card before the visit. A partner reads that Base44 says it cannot sign a BAA, so the practice decides to Keep: download the code ZIP, host it with a provider that signs a BAA, and call it done.
The new site looks identical. But the backend (the behind-the-scenes part that stores data and handles logins) never moved. Base44's own docs say that if exported code runs elsewhere, data, logins, backend functions and integrations still come from Base44 and use the live app's data. (Base44 developer tools - Base44 Support Documentation, verified November 15, 2026) Every new intake, photo and insurance card still lands in Base44. The practice has added a covered host in front of an uncovered backend and believes the problem is solved. Meanwhile, the table CSVs exported for the move sit in a staff member's downloads folder.
What the right call looked like: a Refactor at minimum. Keep the screens, replace the data, sign-in, file storage and backend functions with covered services, move the exported records into them, delete the stray CSVs, and plan for the old uploads: Base44 says deleting a record does not delete the stored file it links to. (Base44 (Wix.com Ltd.), Using media, verified November 15, 2026) Then confirm nothing still calls the old backend before patients use the new version. The lesson for any builder: a code export tells you what you can reuse, not where your data now lives. For the full Base44 path, see moving a Base44 app to a HIPAA-ready stack.
When rebuilding, or another route, is the better choice
Rebuilding is not a failure. It is the honest call when:
- The code cannot leave the builder and the builder offers no BAA you can use. Bubble says its apps run only on Bubble and leaving means rebuilding the logic elsewhere. (Application and data ownership | Bubble Docs, verified November 15, 2026) The new FlutterFlow builder offers no source export, (Not available | FlutterFlow docs, verified November 15, 2026) and we could not confirm from FlutterFlow's public pages, as of November 15, 2026, that it signs a BAA. (FlutterFlow: public pages we checked (16 pages), verified November 15, 2026) For Bubble, staying on Bubble under its Dedicated Enterprise BAA is an alternative to a rebuild. (HIPAA | Bubble Support Center, verified November 15, 2026)
- No one can explain where data goes, or users and patient records are mixed together in the core design.
- The code and its deployment cannot be reproduced by anyone other than the original builder session.
Start any rebuild from the preserved workflow and written acceptance tests, or the new version can recreate the old ambiguity. A rebuild also does not undo earlier exposure: if patient data sat in an uncovered service, assess that history separately with your counsel. Before moving records, rehearse the transfer, check counts match, and keep a way back. When you leave a vendor that signed a BAA, the agreement must require it to return or destroy patient data at the end, if feasible. (HHS (eCFR), 45 CFR 164.504 -- Uses and disclosures: Organizational requirements., verified November 15, 2026) Disposal is also its own Required item in the Security Rule: your practice needs policies and procedures for the final disposition of patient data and the media it is stored on. (HHS (eCFR), 45 CFR 164.310 -- Physical safeguards., verified November 15, 2026) Whichever column you land in, write a retirement plan for the old version with a date on it: the builder project and its database, uploaded files, exported CSVs on staff computers, test copies and preview links. Keep, refactor and rebuild all leave something behind.
Other routes fit some readers better than ours. If your app is mostly forms and tables, a HIPAA no-code platform may suit you: see Fabrica vs. HIPAA no-code platforms. If you want a developer to own the code, see Fabrica vs. hiring a developer. If you have technical staff who will run security and paperwork long term, see doing HIPAA yourself. And if you are thinking hosting alone will fix things, read why hosting alone does not fix your app.
Keep a clinical review on every path
Privacy and clinical safety are separate questions. A covered data path does not show that an output is fit for a clinical decision. Ask the clinical owner to write down what users may infer from the app, what must be confirmed in the chart, and how errors are reported. See clinical safety review for AI-built tools.
Keep, refactor, or rebuild?
The answer depends on what the builder lets you take with you and where patient data can legally live. When code and data export cleanly and every PHI-touching part can move to services under a BAA, keep the screens and refactor the data layer. When the builder offers no usable code export and offers no BAA, rebuild from the app as a specification, or stay on the builder only if it signs a BAA on a plan you can use.
Use the two checks from the top of this page. Exportable code and data plus a path to BAA-covered services points to Keep or Refactor. No usable code export from a builder that offers no BAA points to Rebuild, with the current app as the specification. In every case the screens and workflow you designed are worth preserving, as code or as a specification.
Fabrica, PAHL's HIPAA-ready environment, is built around the first outcome. PAHL's own position is that in most cases an existing app can be kept: PAHL moves the live app and its patient data into Fabrica, into a cloud account your practice owns, and you keep improving it. The process on the Fabrica page starts with a Week 0 assessment of what you built and where patient data goes today, followed by a fixed quote before build work starts, with the first app live in about 30 days. Your practice remains the covered entity, responsible for its policies, training and risk analysis. For the timeline in detail, see how long it takes to make a vibe-coded app HIPAA-ready.
Frequently asked questions
Can I keep using the app I built in Lovable or Base44 with real patients?
Not with patient data stored inside those builders, going by their own pages: Lovable says it does not sign BAAs (FAQ - Lovable Documentation, verified November 15, 2026) and Base44's docs say it cannot sign one. (Privacy and security - Base44 Support Documentation, verified November 15, 2026) The screens and workflow can often be kept while the database, sign-in and files move to services that sign a BAA.
If I download my app's code, have I moved it off the builder?
Not necessarily. Base44 says its exported code still relies on Base44 to run. (Base44 developer tools - Base44 Support Documentation, verified November 15, 2026) Lovable's Git sync copies code and database structure but never the data. (Sync your Lovable project code with GitHub, GitLab, or Bitbucket - Lovable Documentation, verified November 15, 2026) Check where data, logins and files actually come from after the move.
My app is on Bubble. Do I have to rebuild?
Not always. Bubble offers no source-code export, (Can I export my Bubble application? | Bubble Support Center, verified November 15, 2026) so leaving means rebuilding the logic elsewhere. (Application and data ownership | Bubble Docs, verified November 15, 2026) But Bubble now signs a BAA as an add-on to its Dedicated Enterprise plan, (HIPAA | Bubble Support Center, verified November 15, 2026) so staying under that agreement is another option. Get the BAA in writing, confirm what it covers, and weigh it with your counsel.
Is rebuilding safer than refactoring?
Not by itself. A rebuild without written requirements and tests can repeat the same gaps, and it does not undo any earlier exposure of patient data. What makes either path safer is the evidence: tested access rules, a complete list of where data goes, agreements with each vendor, and rehearsed backups. (HHS (eCFR), 45 CFR 164.308 -- Administrative safeguards., verified November 15, 2026)
Who decides whether my rebuilt or refactored app is HIPAA compliant?
No authority certifies software as HIPAA compliant. Your practice remains the covered entity and must do its own risk analysis. (HHS (eCFR), 45 CFR 164.308 -- Administrative safeguards., verified November 15, 2026) Your counsel or privacy officer decides whether your safeguards are enough.
How long does each option take?
It depends on how much must change: the number of services that touch patient data, whether code and data export cleanly, and how many records and files must move. Fabrica's stated process runs from a Week 0 assessment to a Week 4 release, with the first app live in about 30 days. See the realistic timeline.
Palo Alto Health Labs Fabrica
Keep building. We make it safe.
Not sure which column your app lands in? A 30-minute call is enough to sort the parts and name the next step.
Fabrica moves the patient data in your vibe-coded app into an environment your practice owns, built for HIPAA compliance, with a BAA. You keep building in the tool you already use. Start with a 30-minute call about what you have built and where patient data goes today.
See how Fabrica works and book a 30-minute call
Please do not send patient information when you get in touch. The call is a conversation, not an audit or legal advice.
Sources
Every vendor statement on this page comes from the vendor's own terms, documentation or trust pages, or from the regulator, opened and read on the date shown. Vendor terms change; confirm the current version and your own signed agreement before relying on it. This page is general information, not legal advice.
- HHS (eCFR), 45 CFR 164.308 -- Administrative safeguards.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- HHS (eCFR), 45 CFR 164.312 -- Technical safeguards.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- HHS (eCFR), 45 CFR 160.103 -- Definitions.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- HHS (eCFR), 45 CFR 164.504 -- Uses and disclosures: Organizational requirements.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- View and edit your project's code - Lovable Documentation. Checked November 15, 2026.
- Sync your Lovable project code with GitHub, GitLab, or Bitbucket - Lovable Documentation. Checked November 15, 2026.
- Back up, restore, and export your project's database - Lovable Documentation. Checked November 15, 2026.
- Bolt (StackBlitz, Inc.), Manage your projects. Checked November 15, 2026.
- Bolt (StackBlitz, Inc.), GitHub for version control. Checked November 15, 2026.
- Bolt (StackBlitz, Inc.), Database tables. Checked November 15, 2026.
- Vercel, FAQs | v0 Docs. Checked November 15, 2026.
- Vercel, Databases | v0 Docs. Checked November 15, 2026.
- Replit, Using the Git pane. Checked November 15, 2026.
- Replit, Connection details. Checked November 15, 2026.
- Base44 developer tools - Base44 Support Documentation. Checked November 15, 2026.
- GitHub Integration - Base44 Support Documentation. Checked November 15, 2026.
- Can I export my Bubble application? | Bubble Support Center. Checked November 15, 2026. Page dated July 29, 2026.
- Exporting data | Bubble Docs. Checked November 15, 2026. Page dated Last updated 5 months ago (as displayed 2026-11-15).
- Glide: public pages we checked (23 pages). Checked November 15, 2026.
- Not available | FlutterFlow docs. Checked November 15, 2026.
- Pricing · FlutterFlow. Checked November 15, 2026.
- FlutterFlow or FlutterFlow Studio? · Two ways to build. Checked November 15, 2026.
- FAQ - Lovable Documentation. Checked November 15, 2026.
- Privacy and security - Base44 Support Documentation. Checked November 15, 2026.
- HIPAA | Bubble Support Center. Checked November 15, 2026. Page dated Updated over 3 weeks ago (as displayed 2026-11-15).
- Business Associate Agreement (Supabase Legal / Customer Legal Resources). Checked November 15, 2026. Page dated Version 1 — October 23, 2026.
- Data recovery - Replit Docs. Checked November 15, 2026.
- HHS (eCFR), 45 CFR 164.514 -- Other requirements relating to uses and disclosures of protected health information.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- Base44 (Wix.com Ltd.), Using media. Checked November 15, 2026.
- Application and data ownership | Bubble Docs. Checked November 15, 2026. Page dated Last updated 3 years ago (as displayed 2026-11-15).
- FlutterFlow: public pages we checked (16 pages). Checked November 15, 2026.
- HHS (eCFR), 45 CFR 164.310 -- Physical safeguards.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11 (versioner API).