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
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.
§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 base | Private code | |
|---|---|---|
| Contains | Sign-ups, waitlist, content, mail, captcha, payments, storage, migrations | The product logic, rules and screens of one company |
| Lives in | The public harness repository | The venture's own repository |
| Licence | MIT | The company's own |
| Patched by | Factory Zero, once, for every venture | Whoever owns that venture's code |
| Reaches production as | A reviewed version bump | A normal change to the venture |
| Data | None. 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.
- The base ships a release. It has passed its own tests on two databases and the conformance kit.
- An agent bumps the venture. It works in a branch, reads the changelog for each module that moved, and repairs whatever the compiler reports.
- The venture's checks run. Format, lint, tests and the WebAssembly build, plus the assembly check that refuses modules which do not fit together.
- 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.
- ADR 0003: Compile-time composition, one Worker per venture, Cratefield, 5 September 2026.
- ADR 0005: Crate naming and distribution, Cratefield, 5 September 2026.
- The Cratefield harness, Cratefield. MIT licence.
KEEP READING
- 01AI made building software cheap. Maintaining it is the hard part.An agent can write a working backend in an afternoon. Keeping it patched and secure is the real cost. How one shared base keeps our ventures maintained.
- 02Why we write agent-built backends in Rust.Agents write most of our code. Rust moves the checks that matter to build time, where an agent cannot talk its way past them. What it catches, and what not.