One shared base, private code on top: who maintains what.

A company built on Factory Zero runs on two kinds of code. The shared part is an open-source base that every venture compiles from, and we maintain it once for all of them. The private part is what makes the company itself, and it lives in that company's own repository with its own database. The line between the two decides who patches what.

By Nick van der Meij · Published

Listen to this post

A container terminal at night, its cranes and stacked containers reflected in the water.
Photo: Martin Damboldt, Wikimedia Commons, public domain (CC0), recoloured.

In short

  • Shared code is the open-source Cratefield harness: modules for the things every product needs, under the MIT licence.
  • Private code implements the same public interface and passes the same conformance tests. It is pulled in by a pinned version tag and never published.
  • Each venture is its own worker with its own database, secrets and domain. Ventures do not share a deployment.
  • A fix to the shared base reaches a venture as a version bump that is reviewed and deployed with a recorded rollback.

§1 · SHARED

What is shared: the parts no company should write twice.

Every product needs people to sign up, mail to arrive, a captcha to stop bots, a database with migrations, and a way to take payment. None of that is what makes one company different from another.

Those parts live in the Cratefield harness, an open-source Rust base. Each one is a module. A module never talks to a vendor directly. It asks for a database or a mailer, and an adapter for a specific service answers. That is why the same sign-up module runs unchanged whether the mail goes out through one provider or another.

The base is public and MIT licensed. Anyone can read what their company runs on, including the decision records that explain why it is built this way.

§2 · PRIVATE

What stays private: the company itself.

The code that encodes how one business works is not shared. It sits in that company's repository, beside the single file that lists which shared modules the company uses.

A private module is built the same way as a public one. It implements the same public interface and has to pass the same conformance tests. The only differences are where it lives and how it is pulled in: by a version tag from a private repository, and it is never published. The harness does not know or care which of its modules are private.

The result of compiling the two together is one worker for one venture, with its own database, its own secrets and its own domain. There is no shared deployment that many companies sit inside.

Shared at build time, separate at run timeOne shared base and each venture's private code are compiled together. The result is one worker with its own database per venture. BUILD TIME · SHAREDRUN TIME · SEPARATE Shared basepublic · MIT sign-ups waitlist content mail captcha payments storage migrations Venture Aprivate codepinned versions compile One workerown database · own secrets · own domain Venture Bprivate codepinned versions compile One workerown database · own secrets · own domain Venture Cprivate codepinned versions compile One workerown database · own secrets · own domain A fix lands once in the shared base. Each venture moves to it by changing a version number.
What is shared and when. The base is compiled into each venture, and nothing is shared once the ventures run.
Shared basePrivate code
ContainsSign-ups, waitlist, content, mail, captcha, payments, storage, migrationsThe product logic, rules and screens of one company
Lives inThe public harness repositoryThe venture's own repository
LicenceMITThe company's own
Patched byFactory Zero, once, for every ventureWhoever owns that venture's code
Reaches production asA reviewed version bumpA normal change to the venture
DataNone. The base holds no customer data.One database per venture

§3 · UPGRADES

How a fix travels from the base to a venture.

A venture pins exact versions of the modules it uses. Nothing changes underneath it. When the base is fixed or improved, the venture moves by changing those version numbers, and the change goes through the same gate as any other.

  1. The base ships a release. It has passed its own tests on two databases and the conformance kit.
  2. An agent bumps the venture. It works in a branch, reads the changelog for each module that moved, and repairs whatever the compiler reports.
  3. The venture's checks run. Format, lint, tests and the WebAssembly build, plus the assembly check that refuses modules which do not fit together.
  4. A person reviews and deploys. The version being replaced is recorded with the command to return to it, and a smoke test runs against the live worker.

Because every venture is built from the same parts, step two is nearly the same work each time. On 16 November 2026 that let us move 13 production workers across 12 ventures to a new release in one afternoon. The full account is in AI made building software cheap. Maintaining it is the hard part.

§4 · TRADE-OFFS

Why not one big platform that everyone lives in.

The usual way to share software between companies is a multi-tenant platform: one deployment, one database, a column that says whose row is whose. Upgrades are easy, because there is only one thing to upgrade. Everything else gets harder. One bad query crosses a boundary. One outage takes everyone down. Leaving means an export.

We share at build time and separate at run time. That costs something: an upgrade is twelve deploys, not one. We pay that with agents and a repeatable brief. In return a venture's data never sits in the same database as another's, and a venture can be sold or moved as a unit, because it already is one.

Pinned versions are also a deliberate cost. A venture that is not upgraded stays on what it had, bugs included. Somebody has to decide to move it. We would rather have that be a decision than a surprise.

§5 · FOR CLIENTS

What this means if we build your company.

Through venture as a service we build a company's first version on the same base our own ventures run on. You get your own brand, product, customers and data boundaries. The common parts under them are the shared modules, which we already maintain for every venture in the registry.

What is still yours to look after is the part that is only yours. The base is there so that part can stay small.

One limit to be plain about: the hosted product that would run all of this for outside teams without us, Cratefield, is planned and not built. Today the upgrades described here are run by Factory Zero.

QUESTIONS

Questions people ask about this.

If the base is shared, can another company see my code or data?
No. Sharing happens at build time. Your backend is compiled from the shared modules plus your own code into a separate worker, with its own database, secrets and domain. Nothing is shared when it runs.
Who fixes a security problem?
If it is in a shared module, we fix it once and every venture on that module moves to the fixed version. If it is in code written only for your company, it is fixed in your repository.
Am I locked in?
The shared base is MIT licensed and public, and your venture is an ordinary Rust project that depends on it. The same crates also build as a native binary for a server, though today every venture runs on Cloudflare Workers.
Do upgrades happen without me knowing?
No. A venture pins exact versions. Moving to a new release is a change in the venture's repository that is reviewed before it is deployed.

SOURCES

Where the numbers come from.

  1. ADR 0003: Compile-time composition, one Worker per venture, Cratefield, 5 September 2026.
  2. ADR 0005: Crate naming and distribution, Cratefield, 5 September 2026.
  3. The Cratefield harness, Cratefield. MIT licence.

KEEP READING