05 · Architecture · From How to Scale Your Vibe-Coded SaaS

Does my vibe-coded app need a rewrite or microservices?

By Carl Saguinsin · Fractional CTO & Product EngineerUpdated 18 November 2026

Almost certainly not yet. The right question is not "do we need microservices?" but "what is failing, or what failure can we not afford?" If reports are late because one query is slow, splitting the app into services adds cost without fixing the query. Rewrite or split only when you can name the constraint the change removes and show the evidence that the constraint exists.

Architecture is the set of decisions that makes future changes easier or harder. A clean-looking folder structure is not proof that a system is healthy. I look for clear ownership of business rules, stable boundaries, and a deployment path the team understands.

Pass one: draw the current system

Show the browser, the API, the database, the authentication provider, background work, files, payments, hosting, and observability. Label which component owns each important decision. If two components both decide who can see a record, you have found your first finding.

Pass two: trace one change

Pick a realistic feature request. How many places need editing? What tests protect the journey? Where do duplicated rules or circular dependencies make the change risky? The answer tells you more about the architecture than any diagram.

Pass three: choose a modest improvement

Extract a module, document an API contract, add a test seam, or simplify a workflow. Use a migration only when its benefit outweighs the new operational cost. Save the one-page system map, the change trace, a decision record, and a trigger for revisiting the design.

How I would architect a SaaS today

If I were starting a typical SaaS today, I would aim for the simplest design that makes the important promises testable. These are decisions, not a universal blueprint.

  • One application first. A well-structured app with modules for accounts, billing, and the core product is easier to operate than many services. Split a service only when team ownership, deployment needs, or a measured scaling limit justify the overhead.
  • One primary database with explicit ownership. Model customer accounts, memberships, and permissions early; enforce authorization on server-side paths; add constraints for critical invariants; review indexes against real queries. If the product is multi-tenant, test isolation across APIs, jobs, caches, storage, and exports, not only the dashboard.
  • Managed infrastructure where it saves time. Reputable hosting and identity the team can operate, with separate environments, least-privilege credentials, automated deployment, backups, logs, and rollback. The provider name matters less than whether we can see, change, and recover the system.
  • Async work for slow or retryable jobs. Reports, emails, imports, and AI calls belong outside the user's request path. Each job needs an idempotency strategy, bounded retries, failure visibility, and a way to handle poison messages.
  • An observable core journey. Trace the customer action that pays the bills, record errors and latency, and set a few alerts tied to user impact. A dashboard nobody checks is decoration.
  • A safe release habit. Small changes, automated tests around money and permissions, a staging check, feature flags where useful, and a rollback plan. As the team grows, write down architecture decisions so the next engineer understands why.

My CTO rule, and the decision card I use

Buy complexity only when you can name the constraint it removes. Every new service, queue, cache, or platform gives you a capability and a new failure mode.

Before a meaningful technical change, write six short lines: customer problem; current evidence; options; trade-offs; smallest reversible step; success and rollback measures. If you cannot fill in the evidence line, the next task is usually measurement, not migration.

Architecture review prompt

Map the current system and trace how [feature] is implemented across components. Identify coupling, duplicated business rules, missing boundaries, and deployment complexity, with file evidence. Offer three options: keep as is, make a small refactor, or make a larger architectural change. For each, estimate impact, risk, migration effort, and the evidence that would justify it. Do not recommend microservices or a rewrite by default.

Questions founders ask

When do microservices actually make sense?

When separate teams need to own and deploy separate parts independently, or when one component has a measured scaling limit the rest of the system does not share. A founder with one team and one database has neither, and gets the failure modes without the benefit.

Should I rewrite the generated code in a "proper" framework?

Only if you can name what the rewrite fixes that a targeted refactor cannot. A rewrite costs months, stops feature work, and reintroduces every bug you already fixed. Trace one change through the current system first. Most of the time a few extracted modules and some tests get you what you wanted.

My codebase is a mess. Where do I start?

Draw the system on one page, trace one realistic feature request through it, and fix the single worst thing that trace exposed. Then repeat. Architecture improves one decision at a time, and a mess with tests around money and permissions is a safer place than a clean rewrite without them.

The whole guide, free

Fourteen pages. Five audits. One prompt.

Everything on these pages, plus the AI fast-track prompt that turns the guide into a 30-day plan for your own product. Put your email in and it's in your inbox in a minute.

Free, 14 pages, in your inbox in a minute. One short note a week after that.