← blog

From Vibe Coding to Engineering: Knowing When a Fun Project Needs Real Infrastructure

  • #sweat-equity
  • #testing
  • #ai
  • #process

Vibe Coding Was the Point

I’ve spent a big part of my career in QA, so I know what a proper release process looks like. When I started building Sweat Equity, my personal health and workout tracker, I skipped almost all of it on purpose.

It was a fun project. I had an idea for an application I wanted to use, and AI coding tools let me turn it into working software quickly. I’d pick a feature, build it with an AI coding assistant, try it out, and move on to the next one. There was no release pipeline, and I was deploying straight to production. For one person playing with an idea, that was the right trade-off. Building heavy infrastructure around an experiment that might not last a week is its own kind of bad judgment.

But a fun project doesn’t stay one forever. Sweat Equity grew real features, real sign-ins and a real database. It became something I wanted to keep building on and show people. At some point, the question stops being “does this work?” and becomes “can this keep changing safely?” Vibe coding answers the first question and engineering answers the second. The skill is noticing when you’ve moved from one to the other.

For me, that moment had a clear trigger: a major architectural change.

The Rewrite Made the Line Obvious

Sweat Equity used a traditional multi-page architecture. Every click between pages triggered a full page load, rebuilding the whole interface and reloading its resources. On Windows, that also meant the system’s white cursor flashed over my custom one on every click, and I couldn’t fix that without changing how navigation worked.

I wanted the header, footer and menus to stay in place while only the page content changed. The rewrite would affect far more than navigation, though. It would change how each page’s JavaScript started up, how event handlers were managed, and how everything was cleaned up when you left a page.

You can’t vibe code that safely. You can make the new navigation work while quietly breaking everything around it, and you won’t know until someone hits it.

So I assessed the project the way I would at work. There were 392 tests covering the API, business logic, authentication, the database and page rendering. Three were failing because of how the test setup interacted with my local configuration. Those tests were a good start for a side project, but they weren’t enough for this change, for a reason any QA person would spot right away.

None of them ran the application in a real browser.

They could verify that the HTML contained the expected elements, but not that a button actually worked. And about two-thirds of the code was the JavaScript in those pages, which was exactly what the rewrite would change. There was also no routine coverage measurement, no automated pipeline, and no separation between development and production.

None of that had mattered while it was a fun project. All of it mattered now.

Building the Supporting Infrastructure First

So the rewrite waited, and the infrastructure went first. This is the order I’d insist on at work, and I’d simply been giving myself a pass on it until the project earned better.

Instead of asking an AI assistant to implement the architecture and then checking whether things still worked, I defined how the result would be verified before any of it was built. I broke the work into epics and small, independently verifiable stories with acceptance criteria, and reviewed the results before moving on to the next one. That’s how I work every day as a Product Owner, and AI tools don’t change the need for it. If anything, they raise it, because code now arrives faster than anyone can check it by hand.

  1. A reliable baseline. First, the existing suite had to pass consistently, so I could tell old problems from new regressions.
  2. Real-browser tests. I chose Playwright with Python, so browser tests fit into the existing pytest workflow. These tests launch a real browser, click through the application and check what actually happens. Any JavaScript error or failed request automatically fails the test.
  3. Python and JavaScript coverage. Coverage isn’t proof that software is correct, but it does show which code the tests have run and where to look next.
  4. Automated checks on every push. Running tests by hand is easy to neglect when you’re moving fast. GitHub Actions now runs the suite on every push against a throwaway Postgres database, and the build fails if coverage drops by more than half a point.
  5. Separating development from production. I had been developing directly on main, the branch Vercel deploys to production. A separate dev branch meant I could save unfinished work without shipping it, and nothing reached main until I approved it.

What the Fun-Project Phase Had Been Hiding

This is the expected cost of skipping the process, and it arrived as soon as the browser tests went in. They found real bugs before the rewrite even started:

  • In the Log Workout window, the delete checklist deleted the workouts you hadn’t ticked. Ticking everything deleted nothing.
  • On laptop-sized screens, the same window could end up underneath the header and footer, so you couldn’t click Save.
  • “Unsaved changes” prompts had no working way to close without saving.

None of those would have shown up in the old suite. The first one is the kind of bug that quietly destroys someone’s data, which is fine in a toy and not fine in a product.

Then I Did the Rewrite

With the safety net in place, I split the rewrite into stages: mark which parts of each page change, build a lifecycle so pages clean up after themselves, convert one page at a time, then add navigation, transitions and a stress test.

The lifecycle mattered most. When a full page load no longer wipes everything, nothing cleans up for you. Every listener, chart and timer has to be removed when you leave a page, or they pile up. So each page got a test that restarts it 20 times in place and checks that nothing accumulates. A final stress test makes 35 page changes, mixing clicks, Back, Forward and refreshes, and compares the result against a fresh page load, screenshot by screenshot.

It caught more real bugs along the way:

  • Saving Settings on the Workouts page blanked the workout table, because of a function that had accidentally been global all along.
  • The Weigh-ins table view’s styling had never been applied, because of a nested element nobody had noticed.
  • Slow responses could arrive after you’d left a page and write into the next one. That’s a brand-new class of bug, created by the rewrite itself, and exactly what I was worried about.

The server still renders complete pages, so refreshes and direct links work as before, and anything unexpected falls back to a normal page load. And the white cursor is gone.

This shipped as version 4.0.

The Results

Capability Where I started After the test overhaul At release
Total tests 392 479 610
Browser tests 0 60 157
Python line coverage Not routinely measured 99% 99.1%
JavaScript line coverage Not measured 82% 84.5%
Tests on every push No Yes Yes
Build fails if coverage drops No Yes Yes

The release column includes the 4.1 update, which added a separate sandbox database so development no longer touches real data.

These numbers need context. 99% Python coverage doesn’t mean 99% of the application’s behavior is correct, and running 84.5% of the JavaScript doesn’t mean every interaction has been tested. The value isn’t the percentage. It’s the bugs found, and being able to change things without crossing my fingers.

One more practical lesson: the full suite takes close to 30 minutes on my machine, because it talks to a remote database, and only about six in CI with a local one. Where you run your tests changes how quickly you hear about problems.

It’s Not Finished, and That’s Worth Saying

When I audited the project against the standards I now hold it to, plenty was still missing. There are no phone-size tests yet. There’s no linting. And the 4.1 release made one gap impossible to ignore: one test failed intermittently on main, and Vercel deployed the release anyway. A rerun passed, but it showed me that what I have today is CI, not CI/CD, so tests still can’t stop a bad deploy.

That’s the next thing I’m fixing. Until it’s proven, I won’t claim it. The full list is in the project’s public roadmap.

What I Took Away

Vibe coding wasn’t a mistake here. It’s what got Sweat Equity built, and I’d start the next experiment the same way. The mistake would be treating that as a way to run something people depend on.

The real skill is knowing which one you’re doing, and noticing when it changes. My signals were a rewrite too risky to do by feel, real sign-ins and data, and wanting to put my name on the result.

AI tools make that line easier to miss. They’ll happily keep producing code long after a project needs more than code. Someone still has to decide what the system should do, work out what could break, and define how to check the result. That’s the requirements and quality work I’ve done for years, and it matters more with AI, not less.

The goal was never to stop vibe coding. It was to know when a project has outgrown it, and to build what it needs next.