Typestate

Describe a backend in English. Get a real one.

You write what the system should do in plain English. Typestate compiles it to type-checked code, versions every change, and deploys it to a live URL.

The English stays the source of truth. The code is a derived artifact you never have to read, and can always regenerate.

What it looks like

An entity is a sentence:

An invoice with a customer name, a total amount in
euro cents, and a paid flag that starts false.

So is a flow:

Given a customer name and a total, reject totals
under 1 euro, create an unpaid invoice, and
return it.

That compiles, type checks, and deploys. The schema, the migration, the route and the validation all follow from the words.

The pieces

Entities
The data you store. Typestate derives the schema and works out the migration when the description changes.
Flows
One operation each: the input, the steps, the validations, what comes back, and what happens when it goes wrong.
Endpoints
HTTP routes bound to flows, with access rules and rate limits stated the same way.

What the platform handles

  • Storage, migrations, and per-row access policies
  • End-user signup, sign-in, and sessions
  • API keys, rate limits, and scheduled work
  • Versioning, diffs, and reviewed releases to production

A flow contains business logic and nothing else. That separation is what keeps the English short enough to stay accurate.

Releasing

Development takes anything, at any time. Production takes a changeset: a recorded set of changes, with the diffs and the schema work laid out, that a person reads and approves. Edit anything it covers and the approval stops being valid, so what ships is always what somebody agreed to.

How it works in more detail

Status

Typestate is in private development. If you want to follow along or try it early, get in touch.