yanta

How Yanta Works

built into yanta

An agent writes a document. You want to show it to someone. Today that means pasting a file into Slack, where it arrives already dead – no address of its own, stale the moment anyone edits their copy, unreadable on a phone, gone in a month.

Yanta gives that document a living URL instead. You push a file and a link comes back. The link opens a real page – typography, tables, working diagrams – that anyone can read and the right people can edit, in the browser, with no account and no app to install.

This page is one of those pages. The prose is Markdown you could click into and rewrite. The diagrams below are not pictures of how it works; they are small programs written into this very file, running in your browser as you read. That is the whole idea: a document allowed to compute.

This page is its own proof

At the very bottom is a colophon – when this page was last edited, and the version it is showing you. There is no separate published copy, and no database you cannot see. What you are reading is the document itself.

One door

A document can be written three ways: typed in the browser, pushed from a terminal, or changed by an agent over plain HTTP. All three arrive through one door – a single stateless app – and each one leaves behind a new version in the store. Pick a writer and follow it through:

warming…

Reading a public page needs no door at all – it is simply served. Writing has exactly one path, and that single path is what makes the next part safe.

Nothing is ever overwritten

Every time you save, Yanta writes a brand-new copy of the document and moves a single pointer to it. The previous copy stays exactly where it was. So a page’s history is just its older versions, sitting there for free – and a save can never quietly erase what came before.

That also settles the hardest question in any shared document: what happens when two people save at once. The answer is that the second save is told, not guessed. Try it – have a teammate save after you:

warming…

The save built on an old version does not win and does not lose – it is asked to reload and try again on top of what is there now. A conflict you can see beats an overwrite you cannot. This is the calm shape of collaboration: edit, save, reload if you raced someone. Two cursors in one sentence at the same instant is a thing Yanta can grow into later; it was never worth putting a fragile always-on server at the center to get it.

The URL is an address, not a key

There are no accounts, so the URL carries no secret. It is just an address – paste it into Slack, a doc, a screenshot, and nothing leaks, because the page’s authority is not in the link. The authority is one thing you type: the page’s password. Type it once and that browser may edit the page; that is the whole permission system.

Whether a stranger can read the page is a separate switch with two positions. Public means the bare URL reads, and the page joins search. Private means the bare URL reads nothing – a reader has to type the password too. Editing always needs the password, public or private. Turn the switch and try the password:

warming…

The one password is kept the only sane way: never in plain text, and never in a URL. It is human-chosen and therefore weak, so Yanta runs it through a deliberately slow hash and puts a rate limit in front of every attempt – a guesser gets a handful of tries an hour against a hash that costs real time to check, never a fast offline crack of a fingerprint and never a secret sitting in a link. Rotate the password and every browser that had typed the old one is locked back out at once.

slow hash×rate limit    a guesser’s budget\text{slow hash} \times \text{rate limit} \;\gg\; \text{a guesser's budget}

A page you can read is decided by a switch; a page you can change is decided by something you type. Neither is ever a string in the address bar.

Words for hands, code for agents

Prose stays Markdown – the part a person edits by clicking. Anything that has to be alive is a small program written beside the prose, in the same file. The writers’ diagram above, the version demo, the chart below: none of them is a special “chart block” or “diagram block.” Each is a few dozen lines a reader never has to see and an agent edits like any other code.

The data is its own file. The grid below is a CSV that lives with the page; the chart underneath reads the same CSV. A person edits numbers in the grid, an agent edits the file, and the picture redraws either way.

weekterminalbrowseragents
05-0414619
05-1118724
05-1822931
05-25191433
06-01271540
06-08311847

warming…

The split is the product in one picture: a person owns the numbers, an agent owns the drawing, and a plain file sits between them.

Where it all lives

The whole system is three parts, and only two of them hold anything:

partholdsruns
the appnothingstateless, redeployable at will
the storeevery version of every documentmanaged object storage
the databasewhich version is current, the link fingerprints, the dialmanaged Postgres

Nothing durable lives on the running app. Redeploy it, or throw the whole thing away and stand up a new one, and not one document notices – because no document was ever kept there. The machine is only a lens. The words are somewhere safer, and they were never hostages to it.

Try it on this page

Everything above is running here, now. Type this page’s password and it becomes an editor in place – click into a sentence and type, then Save, and the version line below ticks over. The little programs keep running while you edit the words around them, because their source is simply more of the document, waiting for your agent.

A shared document should be allowed to compute. That is the whole bet. You are looking at it.

The house style for writing pages of your own – MDX, instruments, design tokens – is Writing for Yanta.

yanta · this page ships with the site