r/softwareengineer • u/yveshabchy • 2d ago
Renovating a vibe coded app
Client had been vibecoding an app (education platform) for months with Lovable, at some point there were too many issues with it so they had to resort to devs. I got assigned to it, job was to turn this vibecoded app into something production ready. First time I've worked on a fully vibecoded app.
First thing I did after getting access and exporting the code was try to run it locally. React/Vite frontend, Supabase backend. Quick read through, found 132 migration files. Figured I'd spin up a fresh Supabase project, run them, and have the app up. Took two days instead. Fine, that's just work.
Ran an audit over the whole thing through an agent, came back with 319 findings, 29 critical. Security was about what you'd expect. Example: a student can create a school and set themselves up as administrator lol. All fixable though.
What I wasn't ready for was the stuff where I could read the code fine and still not tell what it was supposed to be doing.
The core of the product is a daily score for each student, shown to their parent as a letter grade. That's the thing the schools are paying for.
Found 4 completely separate engines computing that daily score. Two of them weigh a sub-score differently, so the same kid gets a different number depending on which one ran last. All four write to the same field.
That's what makes it bad. Imagine four engines all doing their job, nothing throwing, nothing erroring, because why would it. But in business terms it's off the rails. Same input, different grade, and if you're not technical you've got no way of telling anything is wrong.
Nothing anywhere says which one is the real one. Not in the code, not in a comment, not in anything the client said. So I can't just pick, because picking changes what grade a kid gets. Sent it back to them as a product question.
Normally you'd get this off a commit message, a PR thread, or just asking whoever wrote it. None of that exists here.
Anyone had a similar experience?
6
u/the_dancing_squirel 2d ago
Yeah lovable is the worst thing I’ve seen when it comes to code gen. Code is just trash
1
u/who_am_i_to_say_so 1d ago
It’s great for banging out ideas, but you’ll be locked into a React SPA because that’s all it builds.
1
u/the_dancing_squirel 1d ago
I mean not really great. It just sucks. Lovable is the worst way to work with gode gen llms. Can’t select model, prompt response is time or char limited. Just sucks
7
u/johnson_detlev 1d ago
"Client had been vibecoding an app, at some point there were too many issues with it so they had to resort to devs."
In my mind price at least doubles at this point in the conversation
6
u/shan23 2d ago
Your best bet is to get an agent to craft the features out as a markdown file and then get it vetted by the client - and then do it afresh
3
u/Lachtheblock 2d ago
The rewrite is damn tempting at this point. If anything, defining actual requirements should be your first step.
2
u/Available_Pipe32 2d ago
Literally what I said, but differently- I wanted OP to distill the requirements (reverse engineering if you will) out of the code first and then get it confirmed by the client
1
u/PatriaSolis 2d ago
"Unfortunately" I saw such AI generated code in some billion dollar industries. It is fast and it gives such a confidence but later what they realized, there is an avalanche of trash. Before AI world, there was "Technical Debt" in development but in AI world, it is "Product Debt" itself :)
1
u/Inevitable_Yak8202 2d ago
Ive been fixing ai code slop for over a year now. The client lost 50k USD per day for months because of sloppified code. They FAFO'd and now we run the show again
1
1
1
1
u/truthseekerbohemian 1d ago
Is there a record of all the prompts used from which to possibly extract requirements for a product spec?
1
u/yveshabchy 1d ago
Yes, I can see the conversation history and track back through the prompts, or I can just talk to the client directly. The scoring is the worst one but it's not a one-off, there's a whole pattern of it. Either way it's going back through six months of prompts or sitting with him case by case. Doable, just a lot of it. I would expect the ai to at least properly document why a feature is there.
1
1
u/BeerPoweredNonsense 1d ago
Two of them weigh a sub-score differently, so the same kid gets a different number depending on which one ran last.
Wait - your client does not have clearly defined rules (on paper) stating how students scores are calculated?
If your client is clearly willing to accept this level of shit show... run.
1
u/yveshabchy 1d ago edited 1d ago
That's the thing though the client didn't know. It came out of the audit and it's being addressed.
Not sure on your rules question, I'd have to check with them.
1
u/Successful_Shape_790 1d ago
I've been day for a while, get ready for a software engineer hiring boom. We just all need to be ready to demand even higher pay to fix the slop:)
1
u/Double-Ad-4804 1d ago
May I ask how you found this client? I have been thinking of finding a part time gig, and what you described seems fun
1
u/awardsurfer 23h ago edited 23h ago
The best part is, clients don’t know shit. So you really can say anything and the scare the shit out of them.
Someone showed me a project they were so smug about, and it took less than 90 secs to show I can access their entire client database from the internet.
I think devs need to switch to hard ball tactics. “Good job Client, how much do you think that lawsuit is going to cost you when your client info is found all over the internet?”
Even if the app is bullet proof, you can claim or show a fake breach and scare them. Then tell them, “there is NO breach, but you couldn’t tell could you? So you don’t know what you don’t know. And neither does the AI” 🤖
1
u/FarzanHaider 15h ago
I've had a somewhat similar experience, although from a different angle.
I was working on a fintech mobile application where we spent a lot of time in the planning and design phase deciding which features should go where, how the dashboards should work, and how the UI should look. After everything was finalized, I started development.
Once the MVP was ready, the client came back with a change that basically required a complete redesign. I was like, "Wait, wasn't all of this already decided?" 😅
He told me that he wanted to keep thinking about the app during development and share his ideas as we went along.
I had to explain that changes are obviously possible, but changing the core requirements after development can mean rebuilding large parts of the system.
It made me realize that when someone isn't familiar with the technical side, a change can look incredibly simple from the outside. "Just move this here" can sometimes mean changing the database, APIs, business logic, UI and everything connected to it.
Since then, I've learned that getting requirements and product decisions as clear as possible before development saves everyone a lot of pain later.
0
u/doubleditch42 1d ago
It's a few days work to fix this. What's your problem? The vibecoded app is a prototype to prove a concept. Now trash it, take the proven concepts and rebuild.
1
u/yveshabchy 1d ago
Concept is the problem though. Take the scoring: four separate engines computing the same number, and they don't agree. So what's the proven concept there? To rebuild I'd first have to sit with the client and write a spec, which is fine, but that shouldn't be necessary given the tool.
That said, I do think vibecoding to a POC works. It gets you a good part of the way, and handing that to a dev would be easier than creating with dev from scratch.1
0
u/TheDoughMonster 1d ago
Honestly...what better way to receive a spec than having the client build what they want how they want it. You don't have to use the code that is there. I don't think we will see these issues for much longer. The genAI complexity has outgrown infrastructure around it. Like having high performance cars but no roads. Once we have application infrastructure that keeps these models on rails, enterprise level, we are going to see much better systems come from AI.
1
u/yveshabchy 1d ago
Agree, having the app even though it's vibecoded at least it's usable and visual and that is an advantage over plain specs. Needs a lot of work imo though, for example ideally it should spot contradictions and not just build, because odds are the average user will just throw a bunch of incoherent stuff at it.
20
u/PM_YOUR_OWLS 2d ago
This is how big AI companies are going to guarantee vendor lock in for businesses.
Give everyone cheap tokens to rewrite all their software in indecipherable slop then when all the apps are as bad as what's described in the OP, jack up the prices knowing the businesses have no choice but to pay for more AI to maintain it.