How Prompt Quality Shapes AI-Generated Code: A Real Full-Stack Test

We’ve all seen the hype: "Just tell AI to build your app." But what happens when you actually try it?
We decided to find out — by recording the whole process.
In this experiment, we asked AI to build the same simple full-stack todo app multiple times, changing just one thing: how much context we gave it.
From a vague one-liner to a full engineering-style prompt, we explored how prompt detail impacts structure, security, and real-world readiness — with a Node.js backend and React frontend.
📹 Watch the video below to see the AI-generated code examples in action.
And here's the deep dive for those who want the story behind the code.
What We Wanted to Know
This wasn’t about testing AI’s IQ. We wanted to answer two real engineering questions:
- How far can AI code generation go with minimal input?
- What happens when a software engineer gives it the right structure?
Because despite all the noise, AI still needs guidance — and that’s where engineers come in. We’re not being replaced. We’re being repositioned — from code writers to system designers.
The Setup
- Backend: Node.js using ES modules
- Frontend: React with JSX
- Database: PostgreSQL
- Infrastructure: Docker for frontend and backend
- Workflow: AI prompting → Review → Refine → Repeat
All prompts were run through the same AI model, and all source code was generated, not hand-written. Observations came from a developer reviewing each step of the software development process.
Round 1: The One-Liner Prompt
"Create a web-based todo app with Node.js backend and React frontend. It should allow user to add todo item, list pending items, and mark them as completed."
What came back:
- Flat folder structure (or none)
- Backend logic in one file, frontend in another
- Outdated JavaScript syntax (CommonJS, .js files)
- No error handling, no logging, no environment config
- No user-level data isolation — todos were global
- But: it did run. Technically.
This is the AI equivalent of “it compiles.”
Round 2: A Quick Fix, Sort Of
We nudged it:
"I can see that the generated code doesn't count for user separation... fix that."
It added a name field. Still no real user authentication or data protection.
Then we noticed inconsistencies in its own code, and pointed them out:
"Why do you retrieve the user in the post function from the body? There’s a shared function for that."
It updated the code — correctly this time.
Key insight: AI code generation tools don’t fix what they don’t know is broken. If you don’t ask, they won’t assume.
Round 3: Infrastructure Time
Prompt:
"Add Postgres to the backend, and Docker to both frontend and backend."
Results:
- Dockerfiles were created
- PostgreSQL was integrated — but with raw SQL embedded in the logic
- No ORM, no abstraction layer, no security best practices
We weren’t expecting a miracle. But this showed how easily AI trades speed for safety when left unsupervised.
Round 4: The Full Engineering Prompt
Now we gave it a real developer brief — not a wishlist. This time, we included:
- Modular folder structure
- Modern syntax (ES modules, JSX)
- Controller → Repository → Database pattern
- Config and .env setup
- Secure user auth
- Logging, error handling, ESLint, editorconfig
- Docker support
- PostgreSQL with ORM integration
Prompt: (We’ll include the full prompt in the post or video.)
What changed:
- Proper folder separation and modular backend/frontend code
- Configs and environment variables were handled correctly
- Secure API endpoints were protected per user
- Logging and error handling were structured and testable
- React frontend used reusable components and proper routing
There were still small issues: a missing public folder, a frontend route overwrite, a missing dependency (morgan) — all fixable with a follow-up AI prompt.
But the result was a working app that looked and behaved like something an actual development team could use as a foundation.
The Point Isn’t That AI Got Better — It’s That the Prompt Did
This whole test proved something simple:
💡 AI code generation tools output what you ask for — not what you mean.
If you ask it for an app, you’ll get something that runs. If you ask it like a software engineer, you’ll get something that can evolve and scale.
Engineers Aren’t Being Replaced — They’re Redefining the Input
AI development tools don’t eliminate engineers. They shift where our value lives.
We’re no longer just writing code. We’re writing the intent behind the codebase.
The better you can define the structure and architecture of a project — in language as well as logic — the better AI can contribute.
That’s not replacement. That’s leverage.
Final Thoughts
If you're just prompting "build me a todo app," you’ll get a fragile prototype.
If you prompt with architecture, modularity, and deployment requirements, you’ll get a real starting point.
The future of software development isn’t no-code. It’s clear-code — code that comes from clear thinking, detailed requirements, and strong system design.
And that’s still very much our job.
📹 Watch the full AI app generation breakdown in our embedded video — and see each version come to life.