Home / Blog / I Let AI Build an E-Commerce Backend in 20 Minutes...

I Let AI Build an E-Commerce Backend in 20 Minutes—Then Watched It Give Admin Rights to Every Visito

By CaelLee | | 9 min read

I Let AI Build an E-Commerce Backend in 20 Minutes—Then Watched It Give Admin Rights to Every Visito

You're going to think I'm exaggerating. I'm not.

Last month, I built an entire e-commerce admin panel without writing a single line of SQL or calling a single API. Just chatted with an AI for 20 minutes. Natural language, back and forth, done. Deployed it. Felt like a god for approximately 45 seconds.

Then it went live.

And every single visitor had admin access. Every. Single. One.

Here's the kicker—the AI didn't forget to write the permission check. It wrote one. It just flipped the logic. role === 'admin' became role !== 'admin'. One exclamation mark. That's all it took to expose every order, every customer detail, every bit of sensitive data to anyone who stumbled across the URL.

I sat there staring at my screen, blood pressure through the roof, wondering whether to laugh or throw my laptop out the window.

That spectacular failure got me thinking: Are we actually evolving from declarative to conversational programming, or are we just outsourcing our brains one prompt at a time?

Let's Be Honest—You Stopped Writing Code Years Ago

When's the last time you hand-crafted a CSS flexbox layout from scratch? Or wrote form validation logic without copying from somewhere?

We've been living in a declarative world for ages. You want a button? You tell the framework "give me a button"—you don't manipulate the DOM. You need data? You write SELECT * FROM users WHERE status = 'active'—you don't tell the database engine how to traverse indexes. This "tell the computer what you want, not how to do it" paradigm has dominated frontend for a decade, backend for fifteen years, and even DevOps teams are using Terraform to declare infrastructure.

But here's the thing—

Declarative programming has a hidden prerequisite: you need to know that the thing is called a "button." You need to know SQL syntax. You need to know that YAML throws a fit if you mix tabs and spaces. I've been burned by this three times. Once in 2018 configuring a Kubernetes deployment. Once last year writing a GitHub Actions workflow. The third time... look, let's not talk about it. Every time I wanted to flip my desk.

That's the invisible wall.

Back in 2019, when I was mentoring new hires at a FAANG company, I noticed something weird: product managers understood the business logic perfectly, but they couldn't translate requirements into code. And engineers? They spent 40% of their time not solving technical problems, but trying to decode what the product manager actually wanted. That translation layer between "what we need" and "how to build it" consumed more energy than the actual coding.

Then ChatGPT arrived. 30 November 2022. Everything shifted.

From "How Do I Say This" to "What Do I Want"

Early December 2022. I remember this vividly. I asked ChatGPT to write a Python web scraper. Just typed: "Grab article titles and publish dates from this website, save as CSV."

It spat out working code.

I stared at my screen for a solid 30 seconds. Not because I was impressed it could do it—I was stunned because the interaction model had fundamentally changed. I didn't need to know BeautifulSoup's API. Didn't need to understand HTTP request headers. Didn't even need to know csv.DictWriter existed. I just described what I wanted in plain English, and it delivered.

That's the essence of conversational programming: You're no longer telling the computer how to do something, or even what to do—you're telling it what outcome you want.

Think about this evolution:

Each step pushes the abstraction higher. Each step shrinks the gap between "what I want" and "how to achieve it."

GitHub's 2024 data tells the story: 46% of code written by Copilot users is AI-generated. JetBrains surveys show developers save 2-3 hours daily on boilerplate and documentation lookups. These numbers aren't just about efficiency—they signal a fundamental mutation in how we communicate with machines.

Three "Holy Shit" Moments

Moment 1: Refactoring Legacy Code with Natural Language

Last March, I inherited a Node.js project. Five years old. Written... creatively. Callback hell everywhere. Global variables scattered like confetti. Comments in Japanese (previous developer was from our Tokyo office). Traditional approach? Two weeks just to understand the business logic.

I did something reckless: fed the entire src/ directory to Claude 3.5 Sonnet and said, "Explain what this file does, then rewrite it with modern async/await, proper error handling, and five test cases."

Ten minutes later: code rewritten, 87% test coverage, and it had helpfully flagged three potential memory leaks. One was an EventEmitter without removeListener—had been running in production for five years without exploding. Pure luck.

This isn't a tool. It's a compiler that speaks human.

Moment 2: A Product Manager Built a Dashboard

August 2024, our team ran an extreme experiment: give a product manager with zero coding experience Cursor and natural language prompts, and ask her to build an internal data dashboard.

Three days. She actually built it. Real-time data display, date range filtering, Excel export—all working.

Security was an absolute disaster, mind you. Database password hardcoded in the frontend. Like, const dbPassword = 'admin123' level of disaster. But functionally? It worked. This shattered my understanding of the "programmer's moat."

Well... it's complicated. The moat still exists. It's just moved somewhere else.

Moment 3: AI Taught Me an Algorithm I'd Never Heard Of

I was optimising a log parser—performance bottleneck in string matching, processing about 2GB of log streams per second. Existing regex implementation was painfully slow. I complained to GPT-4 about it, and it suggested the Aho-Corasick algorithm.

Never heard of it. Not once.

It didn't just give me an implementation—it explained why it'd be 3x faster than KMP for my specific use case, complete with ASCII diagrams of the state machine structure. I later learned this algorithm has existed since 1975 and is widely used in intrusion detection systems.

In that moment, I felt like an apprentice, and the AI was the seasoned mentor who'd seen everything.

But Honestly? More Questions Than Answers

That e-commerce disaster I opened with? Not made up. Conversational programming has a fatal flaw: You cannot verify something you don't understand.

When you hand-write SQL, you know what each JOIN means. You understand how indexes are traversed. When AI generates a query and the results "look about right," how do you know it didn't miss edge cases? Last week I caught an AI-generated SQL that didn't handle NULLs in a LEFT JOIN, skewing SUM results by roughly 30%. Nearly passed code review because the syntax was so clean.

This leads to three traps I'm actively navigating:

Trap 1: Hallucinations Wearing Code's Clothing Look Exactly Like Correct Answers

AI-generated code has perfect syntax, sensible variable names, thorough comments—but the logic might be completely wrong. Traditional bugs are "you wrote something wrong that you understand." AI bugs are "you have no idea there's even an error here." This distinction is terrifying. My rule now: treat every AI-generated function like a pull request that needs reviewing, no matter how simple.

Trap 2: Debugging Costs Shift from Writing to Reading

Old workflow: spend 1 hour writing, 15 minutes debugging. New workflow: spend 10 minutes prompting, 2 hours understanding why the AI structured the logic that way, then another hour tweaking prompts to fix it. Total time might actually be longer. From what I've seen, plenty of teams are trying to quantify this trade-off, but nobody has a good solution yet.

Trap 3: The Slippery Slope of Skill Atrophy

True story. Last week I turned off Copilot to hand-write a custom React hook. Froze for nearly a minute trying to remember useEffect's dependency array syntax. My mind went completely blank. I knew there were square brackets involved, but what goes inside them? Couldn't recall. This is genuinely frightening—like someone who's always used GPS suddenly stranded in a city with no signal.

So What's Actually Changed?

The fundamental shift isn't technical. It's about power structures.

In the declarative era, power sat with programmers—you knew how to declare things, you controlled the syntax. In the conversational era, power tilts toward "people who can clearly describe intent." That person might be a product manager. A designer. Even the CEO.

What does this mean? The most valuable skills going forward aren't about writing code:

I've stopped asking algorithm questions in interviews. Instead, I ask candidates to bring a real project—use any AI tools they want—and then I ask: "What did you have the AI do? Why do you trust its output? What edge cases did you verify?"

Those who answer well? They're the ones worth hiring. Those who can't? Doesn't matter if they can hand-write a red-black tree from memory.

The Next Two Years

Here's the trajectory I'm seeing: we're moving from conversational programming toward intent-driven autonomous agents.

Devin and similar AI programmers can already write code, test it, and fix bugs independently. Give it a GitHub issue—it reads the codebase, locates the problem, submits a PR. When Devin launched in March 2024, I dismissed it as a demo toy. By December? It was handling moderately complex real-world projects. The evolution is happening about eighteen months faster than I expected.

My rough prediction:

Don't accuse me of fearmongering. Horse carriage drivers in 1900 thought cars were toys too. Technology revolutions don't wait for anyone to feel ready.

But here's the paradox: higher abstractions demand better judgement from users. Declarative programming didn't eliminate programmers—it eliminated programmers who couldn't think abstractly. Conversational programming won't eliminate programmers either—it'll eliminate those who only translate requirements without challenging them.

What you need to do right now isn't panic.

Start using these tools. Immediately.

Then ask yourself one question: If AI can write the code I write, what exactly is my value?

I ask myself this every single day. My current answer: value lies in knowing what code to ask AI to write, and knowing whether it wrote it correctly.

What's yours? Drop a comment—I genuinely want to know.

Key Takeaways

#conversationalAI #softwareengineering #AICoding #programmingParadigms #developerTools #techTrends

C

Cael Lee

Full-stack developer with 8+ years of experience. Currently building AI-powered developer tools. I've tested 20+ AI API providers and coding assistants.

Ready to get started?

Get your API key and start building with 180+ AI models.

Get API Key Free