Will Hubbard

Building a software factory

Lately, people have been talking a lot about the concept of a software factory. Usually that means agents inside an existing company, picking up tickets and shipping far more pull requests than the engineering team could on its own. I want to take the idea a step further and have the factory turn out entire new companies instead of pull requests.

Every week, a new batch of startups announces a Series A, and each announcement answers the hardest question in starting a company: does anyone actually want this? Companies usually raise a Series A on real revenue, so customers are already paying and investors have already checked the numbers. I have a scheduled task for an agent to read them, stack rank the companies by how vibe-codeable their products are, and keep the list in a shared note that gets re-ranked week over week.

Behind every great software product is the same boring one. Before a customer sees anything useful, someone has to build sign-up and login, teams and permissions, billing, email, security, and all the plumbing that holds it together. It’s the same work every time, and it’s the work people rush or skip when they’re trying to get something out the door.

I’ve been building a codebase to take that off the table. I call it SaaS Starter. It’s a complete foundation for B2B software, made for AI agents to build on, not people.

Each week, an agent picks an idea from the list and builds it on the starter, all the way to a working preview I can click through. Between the list and the starter, the riskiest question and the most repetitive work are both handled before I’ve made a single decision.

Series A announcements show where customers are already paying. Each week an agent ranks those companies by how vibe-codeable they are, and another agent builds a new product on SaaS Starter, with its own repository, database, tests and preview. Fixes that would help every product go back into the starter. At the end of each month, I decide which products to double down on and which to pause. Marketing and onboarding customers aren’t automated yet.

SaaS Starter: a complete B2B foundation

It’s a Next.js app for workspace-based B2B software, the kind of product where a company signs up, invites its team, and pays for seats. Out of the box it has:

  • Sign-up and login, with email magic links and Google and Microsoft sign-in.
  • Workspaces and roles. Every customer gets a workspace with owners, admins, and members. Invitations work by email or link, and people can belong to several workspaces and switch between them.
  • Billing, when I want it. Per-seat Stripe subscriptions that stay in sync as people join and leave. It defaults to free.
  • AI, when I want it. Chat, structured output, and scheduled automations, with a monthly budget for each workspace.
  • A way for other software to use it. A REST API and an MCP server, so customers can connect the product to Claude and use it from there.
  • The unglamorous parts. Multiple languages, dark mode, audit logs, health checks, and error monitoring.

Everything optional starts switched off. A new product turns on only what it needs, and the rest stays out of the way.

What it doesn’t have is a product. The landing page and dashboard are placeholders meant to be replaced. The first line of the instructions I give agents makes the point directly: a renamed landing page or a plan is not a completed app.

Built on what models already know

Every tool here is among the most widely used in web development, so it’s well represented in what AI models learned from, and when an agent hits a problem, thousands of people probably hit it first. I’d rather give an agent a popular tool it understands than a clever one it has to guess about.

  • Next.js, React, TypeScript, and Tailwind for the app itself. Next.js even writes its own note into the agent instructions, warning that “this is NOT the Next.js you know” and pointing to the docs for the installed version. The framework already assumes an AI is writing the code.
  • Supabase for the database and sign-in, and the choice I’d defend hardest. It puts Postgres, authentication, and row-level security in one place, with a full local copy in Docker, so an agent can apply changes and sign up test users on my laptop without touching anything shared.
  • Stripe for per-seat billing.
  • The Vercel AI SDK for AI features, so a product can switch between OpenAI, Anthropic, and Google models without a rewrite.
  • Resend, Trigger.dev, and Redis for email, background jobs, and rate limiting. Each one is optional for real: without Trigger.dev the work runs inline, and without Redis rate limiting falls back to the database.
  • Vercel for hosting, with a preview for every change.

A new product can start with nothing but a Supabase project and add the rest as the business needs it.

Secure and scalable on day one

The usual advice for a new startup is to move fast and fix the foundation later. When every hour is a human hour, spending weeks on permissions and rate limiting before you have a customer does feel like a waste.

Agents change that math. The foundation only has to be built once, in the starter, and every product after that inherits it. And the parts people put off are the ones that hurt most to add later.

The biggest is keeping customers’ data apart. All of a product’s customers live in the same database, so a single missing filter can show one customer’s records to another. So the starter settles it up front, twice. Every route goes through one shared gate that handles sign-in and roles, and every table with customer data has row-level security, so even if an agent’s new feature forgets a filter, Postgres won’t return another workspace’s rows. A browser test signs up real users and confirms one workspace can’t see another’s data.

A request from a user in Workspace A first goes through a shared gate in the app, which checks sign-in and role and takes the workspace from the server, not the browser. Then row-level security in Postgres returns only Workspace A’s rows, even if new code forgets a filter. Workspace B’s rows are never returned.

Indexed Postgres, stateless servers, and background jobs that run outside the request should carry a product to something like 100,000 paying customers before the foundation becomes the problem, and a product that big can afford to solve whatever comes next.

Designed for agents, not humans

An editorial illustration of a small workshop at night where robots rank ideas on a corkboard, then build miniature storefronts on identical wooden bases along a conveyor belt, each one more finished than the last. Finished buildings line the shelves, and a desk with a closed laptop and a calendar waits at the end of the line.

Most starter kits are written for a developer who reads the README once and then relies on judgment. An agent starts fresh every session, takes instructions literally, and will confidently do the wrong thing if the right thing isn’t obvious. So the starter is built around that reader:

  • One front door. A short instructions file that Claude Code and Codex both read automatically. (I used the same trick for my family tree.) Its first question is which job the agent is doing: improving the starter, starting a new product, or continuing one. Mixing those up is how a new product ends up wired into the old one’s database.
  • Rules as code. Wherever possible, scripts enforce the rules instead of prose. Checks fail if a route skips the security wrapper or leaves out a translation. An agent might forget a paragraph of instructions, but it can’t get past a failing check.
  • Guardrails for real mistakes. Agents reuse whatever is lying around, including an old config file pointing at someone else’s database, so the setup script refuses inherited credentials. Even the important limits in the code come with a note explaining why, because an agent that doesn’t know why a number is what it is will eventually “fix” it.
  • Clear lines on autonomy. Spending money, resetting a database, contacting customers, or deploying to production need my approval, and everything else is the agent’s call. Its reports have to keep four states apart: implemented, verified locally, deployed, and verified live. Saying something works when it was only built is the failure I most want to rule out.
  • Memory for the next agent. Every product keeps a one-page brief: what was decided, what works, what’s blocked, and the next step. As I wrote in my post about personal agents, an agent I’ve given a job needs to remember it still has the job tomorrow.

Agents will keep getting better at writing code, but I don’t think that makes a foundation matter less. A solid, opinionated starter is the difference between a demo and something I’d trust with a customer’s data.

Mining ideas with proven demand

Before ranking, the weekly agent filters out the companies that can’t be built with software alone. For each one that’s left, it notes what the company does, what customers pay, how hard it would be to build, and where there might be room for a better product. A few weeks in, there are 19 ideas on the list.

Each company on the list is a market someone else has already proven. The agent’s job is to find where that company’s product falls short, whether it’s too complicated, too expensive, or built for someone bigger, and build a better competitor.

Building a new company every week

Once a week, an agent looks at the top of the list, picks whichever idea it thinks is strongest, and builds the whole company itself: a new repository from the starter, a brief, a call on who the customer is and what will make its version better, the product with real data and permissions, tests, and a browser check of the core workflow. Nobody hands it a spec, and nobody signs off on each step.

My own involvement is as small as I can make it. At the end of each month, I look at what got built and decide which companies to double down on and which to pause. Deciding what to build, setting up the foundation, and building and testing the product used to take most of the human time in starting a company. Agents now handle all of that.

Every product shares the same structure and checks, so an agent that knows its way around one knows its way around all of them. And when a fix in one product would help every product, it goes back into the starter, so the next one starts a little better than the last.

From building to selling

The first half of the loop works today: finding ideas, ranking them, and building a real first version. The second half, marketing each product and onboarding its first real customers, isn’t on autopilot yet, and that’s where the hard parts of a company have always been. Still, going from an idea to a working product I can show someone now takes about a week instead of months, so I can test far more ideas than I could before.

Over the next few months, the factory will settle into a steady rhythm of one new company a week. Then I’ll hand agents what comes after the build: marketing each product, onboarding its first customers, and supporting them from there.

SaaS Starter is a private repository for now. If you’d like to try it yourself, email me at hello@willhubbard.com with your GitHub username and I’ll add you.