By Maryna Poplavska, Lead Project Manager · Last updated 30 November 2026
An AI-built app, often called a vibe-coded app, is one where most of the code was generated by an AI tool from prompts. Taking a vibe-coded app to production is harder when it carries live video, voice or patient data. The demo passed on one network, with two participants, test accounts and no real patients; production tests all of those at once. This guide lists what breaks when real users arrive, with a pass/fail test for each item. This is not legal advice.
Key takeaways
- A working demo does not mean real users can connect. It never met cellular networks, crowded rooms or patient data.
- These failures are not specific to AI tools. In our reading, any prototype nobody has tested on real networks has them; we have no data on whether AI-built code has them more often.
- Calls that work in the demo can fail for some users from launch when there is no TURN relay, signaling state lives in one process or groups use mesh calls; TURN credentials in the client let strangers use your relay.
- Patient data spreads past the database, into logs, analytics, transcripts, media servers and prompts pasted into an AI tool. Each place needs an owner and a retention rule, and every vendor that holds it for you needs a signed BAA.
- The 14-row checklist below helps you decide whether to harden, rework the media layer or hold patients back; it is not a compliance sign-off.
Not an engineer? Go to the checklist and ownership and handover.
What does “works in the demo” prove, and what does it leave untested?
A demo proves that the happy path exists: two people, one network, known accounts, nothing at stake. It leaves five conditions untested: network variety, concurrency, phone background rules, hostile users and regulated data. Whether an idea is worth building is a separate question, covered in prototypes as a feasibility test in project planning.
What do Lovable, Bolt, Cursor, Replit and v0 say about their own output and security?
Quoted from the pages we read on 30 November 2026; the order implies no ranking. Trembit is not affiliated with or endorsed by any of these companies; the product names belong to their owners.
Lovable. Its docs describe “a working application that includes frontend, backend, database, authentication, and integrations”. Its security overview says: “Lovable’s checks find common security problems, but they can’t guarantee that your app is secure or replace a full security review.”
Bolt. Its help center says: “Bolt builds websites and apps, including marketing sites, portfolios, online stores, dashboards, and internal tools.” Its security page says “we recommend running a security check at least once before you publish” and, about the audit, “Bolt fixes most problems on its own. Sometimes you may need to make a change yourself”.
Cursor. Its docs say: “Cursor is a coding agent for building ambitious software. Use it to understand your codebase, plan and build features, fix bugs, review changes, and work with the tools you already use.” Its enterprise hardening page advises: “Have Bugbot and Security Agents review Cursor-generated code before it ships to production.”
Replit. Its docs say: “Turn ideas into real apps and sites. Build, iterate, and publish with confidence.” Its scan page says: “A scan is not a complete security review.”
v0. Its docs say: “v0 is an AI agent that helps anyone create real code and full-stack apps and agents.” Its security page advises “Run DeepSec before you ship to check your chat’s changes for vulnerabilities”.
Together, these pages cover web-app controls: keys kept out of the browser, database access rules, scans before publishing. On the pages we read on 30 November 2026, we found no mention of WebRTC, TURN or STUN for any of the five, and no mention of HIPAA or a BAA for Lovable, Bolt, Replit or v0. Cursor’s hardening page points to a separate page (“Also see HIPAA BAA and Cyber Safeguards when those apply to your deployment.”), which we did not read and make no statement about. None of this is a statement about any vendor’s HIPAA or BAA position, which may be set out on trust-center or sales pages we did not read; ask each vendor directly.
None of this makes a tool insecure. It sets the scope: in our reading, the checks these pages describe target web-app risks, and a video, voice or health app needs the tests below as well.
Why does a call that works on your Wi-Fi fail for real users?
Because the demo found a direct path between two devices, and many real networks do not offer one. The TURN standard, RFC 8656, gives the remedy: “When a direct communication path cannot be found, it is necessary to use the services of an intermediate host that acts as a relay for the packets.” That relay is a TURN server.

Five failures sit behind this symptom and its relatives:
- No relay, or one nobody tested. An app with no TURN server connects when a direct path exists and fails when it does not. Row 1 of the checklist tests it with W3C WebRTC statistics; our Trickle ICE tool shows what your ICE servers return.
- TURN credentials shipped in the client. RFC 8656 says why TURN asks for them: “Since relaying data has security implications, the server requires that the client authenticate itself”. A long-lived password in the bundle, or from an endpoint anyone can call, lets strangers relay traffic on your bandwidth bill. In our view, short-lived credentials issued per session are safer.
- Signaling state held in one process. With rooms in memory and a load balancer in front, two people in one room can land on different instances and never see each other. We cover keeping signaling state across instances separately.
- Mesh calls for groups. Every participant sends a separate stream to every other. This is arithmetic, not a benchmark: with n people, each device uploads n−1 streams, and without a shared encoder it encodes each one too. An SFU (selective forwarding unit) forwards one stream per participant; it lifts that load off the phone and adds a server you have to size, place and test.
- No ICE restart on a network change. In our reading, moving from Wi-Fi to cellular gives the phone a new address, and media needs an ICE restart to find a new path; reconnecting signaling alone does not renegotiate it.
In our reading, none of these is specific to an AI tool; any untested prototype can have them. Our layer-by-layer diagnosis checks the SDP exchange and ICE before anything above them, and we have written up common ways WebRTC projects fail in production.
What changes on iOS and Android?
Apple’s PushKit documentation says: “For apps built using the iOS 13 SDK or later, PushKit requires you to use CallKit when handling VoIP calls.” An iOS app that rings through VoIP push has to hand those calls to the system call interface.
Android’s foreground service documentation says: “Beginning with Android 14 (API level 34), you must declare an appropriate service type for each foreground service.” Because of while-in-use permission rules, it adds, “you cannot create a camera foreground service while your app is in the background”, “with a few exceptions”, and the microphone type carries the same restriction. In our reading, the service that keeps a call alive has to be declared in the manifest and started while the app is on screen. The rule is about creating the service, so test what happens to a running call when the user presses Home.
A web app wrapped for the app stores inherits these rules; we cover where React Native breaks in healthcare apps separately.
Where do auth, tokens and secrets break in an AI-built app?
Wherever the browser is trusted to make a decision. Lovable’s security guide puts it plainly: “Frontend code should never make security decisions.” Four controls matter here, and each has a known way to fail.
Join tokens minted on the server, scoped to one room and set to expire. A guessable room ID lets a stranger ask for a session; the server-side token check is what stops them. In OWASP Top 10:2025 terms: “A01:2025 – Broken Access Control” and “A07:2025 – Authentication Failures”.
Third-party scripts on the call page. RFC 8826, the WebRTC security model, warns that JavaScript included from an untrusted site “is executed in the security context of the page” and “could lead to compromise of a call even if the parent page is safe.” RFC 8826 adds that the risk is not limited to the page itself: any page on the same origin that loads an attacker’s script can expose it. Row 13 tests it.
Database access rules. Lovable’s docs: “Row-level security (RLS) controls who can read or modify individual rows in your database.” The same page adds: “Server-side code that uses the service role, the privileged database access your backend has, bypasses RLS, so that code must check permissions itself.” A leaked service-role key skips every policy at once, and a policy that checks “signed in” and nothing else lets any patient read any other patient’s rows.
Secrets out of the bundle. Lovable: “Secrets stored in frontend code are visible to users and should be considered compromised.” OWASP files this under “A02:2025 – Security Misconfiguration”.
A scan that finds nothing does not prove an access rule is right. Test each control with a second account and a copy of the bundle.
Where can PHI end up in an AI-built health app, and who needs a BAA?
In more places than the database. Trace one session and check each place it can land: the database and file storage; recordings and transcripts; application logs and the error tracker; product analytics and session replay; TURN and media server logs; speech-to-text or LLM calls; and the AI coding tool, if anyone pastes real patient data into a prompt while debugging.
The HIPAA Security Rule binds covered entities and their business associates; 45 CFR 164.312 opens with “A covered entity or business associate must”. If your organization is one, the Rule applies to its electronic PHI whoever wrote the code; if you are not sure whether it is, ask counsel before relying on this section. The section sets the technical safeguards, including “Standard: Access control.”, “Unique user identification (Required).”, “Standard: Audit controls.”, “Standard: Person or entity authentication.” and “Standard: Transmission security.” Encryption in transit is listed as “Encryption (Addressable).” Under 164.306(d)(3), addressable means you assess whether the specification is a reasonable and appropriate safeguard in your environment; if it is, you implement it; if not, you document why and implement an equivalent alternative if that is reasonable and appropriate.
Encryption does not settle the BAA question either. HHS guidance on cloud computing says cloud providers that create, receive or maintain ePHI for a covered entity or business associate “meet the definition of a business associate, even if the CSP cannot view the ePHI because it is encrypted and the CSP does not have the decryption key.” End-to-end encryption in telehealth video protects session content; it does not remove the need for a BAA with vendors that store recordings, transcripts or logs.
Two tools address part of this. Replit’s scan page says its review can find “privacy issues such as sensitive data flowing to logs or third-party APIs”. Cursor’s hardening page advises: “Add .cursorignore entries for secrets and regulated paths.” It also notes that “terminal and MCP tools can’t honor it, so pair with approvals and file permissions.” Neither is a HIPAA statement, and we read neither that way.
HHS proposed changes to the Security Rule on 27 December 2024 (NPRM page). As of 30 November 2026 the rule is still a proposal: that page does not say it is final, the Federal Register lists only the proposed rule, and the current 45 CFR 164.312 applies. For the program around the code, see the HIPAA program around a telehealth MVP.
How do you know it works: logging, load tests and observability?
When you can answer from records who joined which session, where quality breaks under load, and why one call failed. Section 164.312(b) asks for “hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use electronic protected health information.” Log account and session IDs, not names, birth dates or room titles, so the log carries as little PHI as possible. An account ID that links to a patient still identifies that patient, so the log stays on your PHI map (row 10). Rows 5, 11 and 12 test the rest; we describe how to load test a WebRTC app separately.
What is the pre-launch checklist, and how do you test each item?
The table is our method, not a standard. Each row is a test you run yourself, on systems you own or are authorized to test, and call pass or fail; where a number is needed, set your own line before testing.
| # | What breaks with real users | Measurable check (pass/fail) | Anchor |
|---|---|---|---|
| 1 | No relay when the direct path fails | On a locked-down client, call with UDP blocked, then with TCP/443 egress alone. Pass: it connects; the pair named by selectedCandidatePairId uses that client’s relay candidate; relayProtocol shows tcp or tls on the 443 test |
RFC 8656; W3C stats |
| 2 | TURN credentials public or never expiring | Search the bundle; call the credentials endpoint unauthenticated and as a second account; reuse a credential after expiry. Pass: nothing static; unauthenticated calls and expired credentials refused | RFC 8656 |
| 3 | Signaling state in one process | Two instances behind a load balancer, two peers in one room on different instances; restart one mid-call. Pass: peers see each other and rejoin without manual refresh, within a time you set | Signaling post |
| 4 | Mesh P2P for group calls | At 4, 6 and 8 people, read outbound-rtp stats and CPU per participant. Pass: you can state upload and encode load, and when you switch to an SFU |
Mesh arithmetic |
| 5 | One media server, never loaded | Ramp participants until server CPU, egress or loss at the receivers crosses your line; throttle one client’s link. Pass: a dated report with the break point; the throttled call degrades without dropping | Load-test post |
| 6 | Calls drop on phones | iOS: kill the app, send VoIP pushes; the system call screen appears every time. Android: in a call, press Home and wait. Both: switch Wi-Fi to cellular mid-call. Pass: mic and camera stay live; media recovers | Apple PushKit; Android FGS types |
| 7 | Joining without authorization | Request another account’s room by ID; replay an expired join token; use a room-A token on room B. Pass: all denied server-side | OWASP A01, A07 |
| 8 | Database rules missing or too wide | As user B, query user A’s rows, storage URLs and realtime channels. Pass: nothing returned; no anonymous access to health tables; no service-role key in client code | Lovable docs; OWASP A01 |
| 9 | Secrets in client code | Search page source, bundle and source maps for keys; revoke anything found and confirm it stops working. Pass: no live key; production and development keys differ | Lovable docs; OWASP A02 |
| 10 | PHI lands where nobody controls it | List every place from the PHI section above. Pass: each has an owner and a retention rule, and every vendor that creates, receives, maintains or transmits PHI for you has a signed BAA, or the PHI is removed from that place | 45 CFR 164.312; HHS guidance |
| 11 | No audit trail, or PHI in log lines | Seed a test patient with a unique name and birth date, run a session, search logs, error tracker, analytics and session replay. Pass: you can reconstruct who joined; the seeded values appear in none of those | 164.312(b); OWASP A09 |
| 12 | Nobody can explain one failed call | Find the session behind a complaint (“froze at 10:42”) with its connection and quality stats. Pass: found within a time you set | W3C stats |
| 13 | Untrusted scripts on the call page’s origin | List every script that any page on the call page’s origin loads. Pass: each is justified, and a Content Security Policy blocks the rest; a script you allow can still be compromised at its source, so keep the list short | RFC 8826 (risk); CSP is our method |
| 14 | Nobody but the original author can run it | Someone new deploys to a clean environment from the README, with secrets from a vault. Pass: it runs; they list what was missing | Handover section |
What your result means, in our reading:
- Rows 1–11 pass: fix rows 12–14 before launch, then keep your launch plan. On a health app, launch also waits on your own compliance sign-off; passing rows 7–11 is not one.
- Rows 1–6 fail: expect media-layer rework before launch.
- Rows 7–11 fail on a health app: no patient should use it until each is fixed or your compliance lead has documented a decision on it. A vendor holding PHI without a signed BAA (row 10) has to be fixed, not documented.
- Row 14 fails: start there.
If rows 1–6 fail, a WebRTC rescue assessment is where we would start: measure the live system, then decide what to fix. If rows 7–11 fail on a health app, bring them to the call at the end of this page.
What have Trembit’s rescues involved, and what have we not done?
We have not taken over an AI-built codebase. What follows is what we have rescued, with the limit of each, and what we would check.
Meetaway: video code earlier teams could not get working. Our rescue page describes it this way: “Meetaway came to us with semi-functional video code built on WebRTC and TokBox, after several earlier teams had tried and failed. We took it over and got it working.” Limit: code written by earlier teams on a commercial video API, not AI-built; we publish no before-and-after figures for it.
Learnster: the stall was the process, not the code. For Learnster, a Swedish corporate learning platform, the case study’s diagnosis is that “The core problem was not technical — it was the development process”. We still run its engineering. Limit: its case study describes no real-time video work; it was a process rescue, and the code was not AI-built.
Our rule on regulated platforms. Our rescue page states the constraints on the repair itself: “In regulated platforms the fix itself must respect the constraints: no new third-party media routing, data residency kept, encryption intact, and nothing that would reopen a certification.” That is our method, not a case result.
On an AI-built video or health app, we would check rows 1, 2, 7, 8 and 10 before anything else. Our method carries over, in our view: measure the live system before changing code and diagnose in layers, from signaling and ICE upward, whoever or whatever wrote the code. We have no rescue data on AI-built code, so we make no claim that these failures are more common in it than in hand-written code.
Who owns the code, and what should a handover include?
Ownership has two layers. The legal one depends on each AI tool’s terms, your contracts with anyone who edited the code, and how copyright law where you operate treats AI-generated code; ask a lawyer, and treat this section as an engineering view, not legal advice. The practical one: you own a codebase when a stranger can build and run it without its author. A handover should include:
- the repository, with full history, in your organization’s account
- build and deploy steps that work from a clean machine
- secrets in a vault, not in the repository or a chat
- a runbook: restart signaling, rotate TURN credentials, roll back
- the dated checklist results
- the PHI map from row 10, with each vendor’s BAA status
- TURN, hosting, app-store and analytics accounts in your company’s name
Questions to put to any partner who offers to take your prototype over:
- What have you taken over that your team did not write, and what were its limits?
- What will you measure before you change any code?
- Which rows of a checklist like this will you run, and what will the written result show?
- Will you sign a BAA with us if your engineers can reach production data?
- Will all code, fixes and documentation belong to us, and in whose accounts will the infrastructure live?
Ask us both on the call; we answer them in writing. We discuss scope there; a firm estimate comes only after we have measured the live system.
FAQ
Can an AI-built app handle patient data under HIPAA?
Who wrote the code does not decide it. HIPAA binds covered entities and their business associates; if you are one, the Security Rule covers the electronic PHI your app holds. That includes the technical safeguards in 45 CFR 164.312, administrative and physical safeguards, a risk analysis, and a BAA with each vendor that creates, receives, maintains or transmits PHI for you. No checklist, ours included, and no tool’s security check makes an app compliant. This is not legal advice.
Should we rewrite it or harden it?
Measure before you decide. In our view, a rewrite is justified when measurement shows the architecture cannot meet your scale or compliance constraints, not because the code was generated. Our rescue page states the default: “Our default is to keep what works.”
Have you taken over an AI-built codebase?
No, we have not taken over an AI-built codebase; the rescue section above lists what we have taken over instead.
Taking an AI-built video, voice or health app to real users? Book a free 30-minute call with a Trembit engineer. Bring the repository structure (or the symptom that fails) and your launch date, and we will walk through this checklist with you. Please don’t share patient data; we can start under NDA if you need one. No deck, no pitch.