Blog

Writing about tcm: Unison's content-addressed codebase model, for plain TypeScript. RSS feed

The Client/Server Boundary

Every full-stack app has a line running through it: some code runs on the server, some runs in the browser, and a network sits between them. Most tools make you draw that line yourself.

Code Validation

One thing that representing your code as a graph of values unlocks is far more incremental builds. Packages, files, folders and apps are a poor way to tell whether a piece of code needs to be checked again.

Why Files

The core idea behind tcm is that there are no files: your code is stored in a database (called a codebase). But that raises the question: why do we store code in files at all?

Introducing tcm

tcm is a new way to store TypeScript. Instead of a folder of text files, your code lives in a codebase: a database of code. Each function, type and constant is stored on its own, under the hash of its code. Names are kept apart from the code, as labels that point at those hashes.