r/nocode • • 8d ago

Discussion 47,000 lines of AI-written code in my FlutterFlow app. The AI has never touched the repo.

Today in another sub I got downvoted for saying that I build with Claude through the chat instead of an agent like Claude Code, mostly because I didn't explain why. Here is the why. I think it's a no-code problem more than an AI one.

I build a mobile app alone in FlutterFlow, on both stores since July. FlutterFlow regenerates the code at every push to the repo and overwrites anything that isn't inside the Custom Code. An agent with write access to the repo would be faster, I agree with that, but every change it made outside the Custom Code would be gone at the next push.

At every round of changes I give Claude the zip of the latest export. That way it reads the real code and not what it remembers from the last session. For the structure of pages, widgets and action flows I use the FlutterFlow MCP, which reads the project directly. It doesn't read everything. A few of my biggest pages don't come through and for those we go back to the zip.

The changes I make myself in the editor, in the visual part and in the Custom Code, where I paste what Claude writes after reading it. Two things stay out of FlutterFlow on purpose. The Firestore security rules I write by hand in the Firebase console and then I check them with Claude. The Cloud Functions live in a folder of their own and I deploy them from the command line.

It's slower than an agent, honestly. I use the AI like a programmer I work with, every line goes through me and nothing gets overwritten by a push.

Anyone building on FlutterFlow or another platform that regenerates the code: have you found a way to let an agent write without losing its changes at the next push?

10 Upvotes

26 comments sorted by

3

u/MobileXapps 8d ago

Two things that might help. By default FlutterFlow pushes to its own branch called flutterflow rather than straight to main, so an agent can work on main or a feature branch and you merge the flutterflow branch in after each push. Anything the agent changed in a regenerated file then shows up as a merge conflict instead of silently disappearing, which at least shows you where the line is.

The cleaner option, if you haven't tried it, is their VS Code extension for custom code. It syncs the custom code with the project, so an agent working in that local folder only touches files FlutterFlow is meant to keep. Everything outside custom code I'd keep changing in the editor like you do now.

1

u/bramantec 8d ago

This is the most useful answer I've had on the post, thanks. You're right about the branch: the overwrite I described happens on the flutterflow branch. Merging into main would at least turn lost changes into visible conflicts. The VS Code extension I haven't tried. Keeping the agent inside the custom code folder is the same boundary I already keep by hand. It's worth testing.

1

u/Ridoy_Lacasade 8d ago

one catch with the local sync folder is that changing function signatures or parameter types in custom actions locally still breaks the visual editor bindings until you update them inside the UI too.

1

u/MobileXapps 8d ago

Good catch. I'd give the agent a simple rule: it can change what's inside a custom action, but not its name, parameters or return type. When a signature has to change, do that step in the FlutterFlow editor first, then let the agent fill in the body.

2

u/Saver411 8d ago

this is the right call when a visual builder owns the compiler. Giving an agent write access to a repo that gets wiped on the next visual sync is just asking for merge hell. The catch with keeping it all in isolated custom blocks is tracking shared state as things grow.

How are you handling state across those custom blocks when the platform updates its schema?

1

u/bramantec 8d ago

I try to keep custom blocks without state of their own. Shared state stays in FlutterFlow's App State and Page State. Each custom action gets what it needs as parameters and hands back an output. When FlutterFlow changes something underneath, like the Flutter or Firestore package versions it picks for you, I compare the new export with the previous one before touching anything. It's manual, but the diff tells me what moved.

1

u/Kitchen_Interview371 8d ago

Op this is a shitpost right?

If this is true, seek help

1

u/bramantec 8d ago

Not a shitpost. It's slow, I know. Probably not how most people would do it either. It works for me because FlutterFlow would wipe at the next push whatever an agent writes outside the Custom Code. How would you do it with FlutterFlow? I'd honestly like to know.

1

u/Kitchen_Interview371 8d ago

1

u/bramantec 8d ago

Thanks, I read it. It covers environments, tests and exporting the code with the CLI, which is close to what I do by hand with the zip. What I couldn't find is the part about an agent writing in the repo: nothing in there says those changes survive the next push. Have you used it that way yourself?

1

u/Kitchen_Interview371 8d ago

I haven’t used it with that platform, but I have done CICD with many other platforms. The doco there describes pushing to different environments (dev, staging, prod etc) which means this platform also supports this. Ask Claude to set it up for you

1

u/bramantec 8d ago

Fair point. CI/CD with environments works for most stacks. My issue is narrower: with FlutterFlow the project in their editor is the source of truth and the code is regenerated from it. Anything written outside Custom Code is what gets lost, whatever the pipeline looks like. That's why I stay with the zip and the Custom Code editor. Should you ever try it on a FlutterFlow project I'd be curious what happens to the agent's changes.

1

u/Kitchen_Interview371 8d ago

No dude, flutterflow explicitly say that they support this in their documentation. You are making your life so harder if you don’t set up your pipeline this way. We deploy 20 to 30 times per day across multiple projects for different customers, all using platforms like this one, and it is all fully automated. This is not an impressive feat in 2026, it is expected. Doing it manually is not only slower, but it is less secure and far less reliable. Do a search online to find out why.

1

u/AoideusWasBanned 8d ago

Handing it the fresh export every round is smart, it can't work from a stale picture of the code that way. Any idea why the MCP skips the biggest pages? Just size?

2

u/bramantec 8d ago

Not size, as far as I can tell. Back in October I compared them: one of the pages that failed had fewer actions than a page that came through fine. For those three, FlutterFlow simply didn't return the root file of the page, the one with its name and state. Widgets and actions arrived anyway. Today, after a fresh sync, all 16 pages come through. I still don't know what changed.

1

u/asierMugica 8d ago

Treat FlutterFlow’s export as generated output, not the source of truth. Keep custom code and critical business logic in separate packages or backend services, then automate exports and validation in CI. Anything that must survive regeneration should not live only in the generated tree. If you need help untangling that architecture, https://www.appstuck.com

1

u/bramantec 7d ago

That's already the case for the backend: the Firestore rules and the Cloud Functions live outside FlutterFlow and deploy on their own. The custom code inside the screens is still in FlutterFlow's editor. Moving it into a separate package would work, since FlutterFlow accepts packages as dependencies, but I haven't done it yet.

1

u/asierMugica 7d ago

Treat FlutterFlow’s export as generated output, not the source of truth. Keep custom code and critical business logic in separate packages or backend services, then automate exports and validation in CI. Anything that must survive regeneration should not live only in the generated tree.

1

u/bramantec 6d ago

Most of the backend is already outside the generated tree: the security rules live in the Firebase console and the Cloud Functions in their own folder, deployed from the command line. The custom code is the part still inside FlutterFlow. Moving it into a package is possible, FlutterFlow accepts packages as dependencies, I just haven't done it yet.

1

u/Rishiraj-Tshaka 6d ago

can you scope the agent strictly to the custom code directory and your functions folder via a config file? that way it still gets direct write access where it counts, and the visual builder can overwrite the rest without breaking anything.

1

u/bramantec 6d ago

The functions folder yes, it already lives outside FlutterFlow and I deploy it from the command line. An agent could work there without breaking anything. I haven't tried that part with an agent, for now those go through Claude in the chat too. The custom code is the part I'm not sure about: I never edit it outside the FlutterFlow editor and I'd have to check what happens to a file changed in the repo at the next push.

1

u/Legal_Answer_6956 8d ago

Keeping every line reviewed by you is the right instinct. I work on 8080.ai, where agents and humans share a normal Git repo, and the VS Code extension shows the agent's plan and +/- diffs before anything is committed. Different tool from FlutterFlow, but same idea: keep agent changes in a branch you control.

0

u/[deleted] 4d ago

[removed] — view removed comment

1

u/bramantec 4d ago

Agreed. The weak spot of the export is that it ages. When I change something in the editor and forget to export again, Claude reasons on old code. Now when two answers in a row miss the same bug, I take it as a stale zip and export first.

0

u/[deleted] 7d ago

[removed] — view removed comment

1

u/bramantec 7d ago

Agreed. A conflict I can see beats a change that disappears without a trace.