ucm-ts documentation

ucm-ts keeps your TypeScript in a codebase where every definition is stored by the hash of its code, as Unison does: renames are free, changes carry through or tell you, nothing gets rebuilt. On top of that you can build web apps whose server and browser parts ucm connects for you.

New here? Read the introduction, then follow your first codebase.

Start

Introduction
what ucm-ts is and why you'd use it
Install
getting ucm, making a codebase, setting up your editor
Tutorial: first codebase
write, add, change, rename, undo, test and document code (15 minutes)
Tutorial: first app
a web app with a database, server and browser code, no API layer (10 minutes)
Examples
a complete live polling app

Guides

Scratch files
the everyday loop: saving, changing, fixing what an update broke, renaming, undoing
Packages
using npm packages and Node builtins; how versions are pinned
Testing
writing tests, and why they only run when something changed
Writing docs
doc comments with links and runnable examples that follow your code
Finding code
by name, and by type
Importing a project
bringing an existing TypeScript project into a codebase
History and branches
diffs, undo, branches and merging
Sharing code
pushing and pulling between codebases, running code on another machine
Web apps
how ucm splits an app between server and browser
Server functions
requests, cookies, sessions, errors, streaming, HTTP endpoints
Data
typed tables, queries, changing a table's shape, transactions
Background jobs
queued and recurring jobs
Deploying
production builds, deploying and rolling back by moving a name
Editor
VS Code (and other editors): status, pages, apps, data

Reference

CLI
every command and flag
#ucm/server
every function server code can import
Files and folders
what ucm creates, and what to keep in version control
Compiler options
which tsconfig settings ucm uses or overrides

How it works

Hashing
what a definition is, how it's hashed, and identity
Storage and execution
the store, the generated modules, how code runs
Developing ucm-ts
the repository, its tests, self-hosting
Limitations
what isn't done yet

These pages describe what the code does now; they're updated in the same change as the feature they describe (see AGENTS.md (AGENTS.md)).

built from 5890e54f