Skip to content

TypeRuleProgramming language for finance and operations

As easy as a spreadsheet. More solid than an ERP.
Replace the spreadsheets your team can’t trust with one reliable system.

Our mission

Clarity over complexity. ​

The rules of a business belong to the people who run it. Not lost in a spreadsheet, not buried in an ERP.

The gap

Too fragile, or too heavy ​

Spreadsheets

Fast to start, fragile to run

A formula gets overwritten, a customer is typed twice, and nobody knows which file is right.

ERP and custom apps

Slow, costly, and still fragile

Months of consultants or custom code, and the rules end up buried where nobody can check them. Errors still get through.

TypeRule

Quick like a sheet, solid by design

Write a few files of TypeRule code. TypeRule does the rest: the database, the screens, and a check on every entry.

An example: from an orders spreadsheet to a working system ​

The spreadsheet

It works until it doesn't ​

Nothing stops a wrong value, and the mistakes surface weeks later, in the margin report.

  • Macros break when someone moves a column, and nobody knows until the numbers are wrong.
  • One person edits at a time. Everyone else waits, or works on a copy.
  • Copies travel by email, and they never agree.
  • No record of who changed a value, or why.
  1. 1The same customer, typed twice. Their total is split in two.
  2. 2Twelve pumps sold, eight in stock. Nobody noticed.
  3. 3A formula overwritten with a number. When the cost changes, this margin won't.
TypeRule

Write only the rules. The app builds itself as you save. ​

Write your data structure, your rules and your automations, all in one simple language that anyone can audit. Even AI can audit and write it.

typerule
entity Customer:
    name: Text
    orders: [Order] via customer

entity Product:
    name: Text
    cost: Money<EUR>
    price: Money<EUR>
    stock: Int where >= 0

entity Order:
    customer: Customer
    date: Date default today()
    lines: [OrderLine]
    state: enum(Draft, Confirmed, Shipped) default Draft

    revenue = lines.sum(l => l.amount)
    margin = lines.sum(l => l.margin)

    flow state:
        Draft -> Confirmed by confirm
        Confirmed -> Shipped by ship

    action confirm:
        require margin > 0, "Below cost: this order loses money"

    action ship:
        for l in lines:
            l.product.stock = l.product.stock - l.qty

entity OrderLine:
    order: Order parent
    product: Product
    qty: Int where > 0 default 1

    amount = product.price * qty
    margin = (product.price - product.cost) * qty

    check qty <= product.stock, "Not enough stock"
$ typerule dev
the app on http://127.0.0.1:8080
What TypeRule builds from it
Custom Interfaces and Dashboards

Design the interfaces visually, or in code ​

Drag key figures, boards, buttons and forms onto a grid, in the app. Every drop is written back to a file, reviewed in git with the rest.

Safe by Design

Every field you rename, every row you migrate, every mess you make: TypeRule keeps it straight ​

Rename a field, change a type, migrate years of data: TypeRule checks the whole system first. A change that would break something never goes live, a migration that fails changes nothing, and every change can be previewed and undone. So you can experiment without fear.

Discover why it’s safe

interfaces/sales/desk.tri
14cards: customer, revenue, margin
✗Order has no field margin. Did you mean gross_margin?
Checked at every step
  1. As you typein the editor
  2. On every savethe last working version keeps running
  3. In the terminaltyperule check, also in CI
  4. Before a deploya dry run on the live data
Permissions and Sign-in

Who sees what, and who does what, written as code ​

Roles, rules and hidden fields live in the model, next to the data. They apply everywhere: in the app, in the API and inside every action. Sign-in with a code sent by email and API tokens are already built in.

typerule
role Sales:
    read Customer, Product
    read, edit Order where o => o.created_by == me
    run Order.confirm where o => o.created_by == me
    hide Product.cost

role Warehouse:
    read Order, Product
    run Order.ship

role Manager is Sales:
    read, edit Order
    show Product.cost
✗permission denied: giulia cannot run Order.ship
  1. Everywherethe app, the API and every action
  2. Deny winsover any rule that allows
  3. Sign-in built incodes by email, API tokens
Audit and History

An audit trail you don’t have to build ​

Every value ever written is kept, with who changed it, when and why. The history is chained by hashes, so altering the past is detected. Ledgers are append-only, confirmed documents are frozen, and a bulk change needs the approval of a second person: the guarantees finance and compliance ask for, from day one.

See how it supports compliance

History of Product#24.price
1.00 EURanna2026-03-02 10:14created in the app
1.10 EURmario2026-11-20 09:00change raise_prices: Price list 2027: +10%, requested by mario, approved by lucia
1.00 EURmario2026-11-21 16:32revert of raise_prices, approved by lucia
$ typerule db verify
✓ hash chain intact, tables match the history (26 records)
  1. Append-onlynothing is updated or deleted
  2. Hash-chainedeach commit seals the one before
  3. Four eyesbulk changes need another user’s approval
Certified Metrics

One definition of margin, for the whole company ​

Ask three departments for the margin and you get three numbers: one counts drafts, one forgets returns, one uses last year’s costs. In TypeRule a metric is defined once, with an owner and a definition in plain words, and every report uses the same one.

It is certified: if a change anywhere in the model alters what it means, even a default far away, typerule check stops until it is approved again.

typerule
metric gross_margin(period: DateRange) -> Money<EUR>:
    label: "Gross margin"
    owner: "Finance"
    definition: "Price minus cost of shipped orders."
    value = Order
        .where(o => o.state is Shipped and o.date in period)
        .sum(o => o.margin)
$ typerule certify gross_margin --approved-by "m.bianchi (CFO)"
certified gross_margin: sha256:a1c018754ce6c703 (9 dependencies)
  1. Defined oncedashboards show it with a certified mark
  2. Owneda name, an owner, a definition in words
  3. Certifieda change of meaning needs approval
Environment Forks

Fork production, try anything, throw it away ​

Every branch gets its own environment, with sample data or a copy of production. Try a migration, a new rule or a new screen on real data: production never notices. Merge the code when it works, delete the branch when it doesn't.

productionorders.typerule.app
live
new-pricingnew-pricing--orders.typerule.app
fork · production data
fix-vatfix-vat--orders.typerule.app
preview · sample data
  1. Push a brancha preview of it, with its own link
  2. Fork from the consolea copy of the production data
  3. Delete the branchthe environment goes with it
Batteries included

TypeRule handles all of this for you ​

TypeRule EngineOpen source

The code: your rules, your data, everything underneath.

Data
  • Entity Relations
  • Formulas
  • Validation Rules
  • Money and Units
  • Ledgers
  • Certified Metrics
  • Frozen Records
  • Migrations
  • Bulk Import / Export
  • Archive
  • Hot / Cold Storage
Access and compliance
  • Authentication
  • Roles
  • Field-level Permissions
  • Signed History
  • Data Retention
  • Data Erasure (GDPR)
  • GDPR Data Export
Documents
  • Documents / Files
  • PDF Generation
  • Label Printing
  • Document Signing
Automation
  • Workflows
  • Timers and Deadlines
  • Events and Webhooks
  • Sending Emails / Messages
  • File Exchange
  • Talk to Other Systems
  • Backend API
Quality
  • Tests and Fixtures
  • Compile-time Checks
TypeRule StudioFree to use

Use it as it is, or build your own frontend on the API.

Interfaces
  • Custom Views and Boards
  • Apps and Dashboards
  • Custom Interfaces
Built to evolve

The builder is the tip of the iceberg ​

Start with screens built in the app. When you need more, build your own interfaces or connect any system through the API. Underneath, nothing changes: one truth, the same rules, permissions enforced by design.

One truth

Every screen, integration and agent works on the same data. No copies to reconcile.

The same rules

An order beyond the stock is refused, whoever sends it.

Permissions by design

Every API request runs as a user, with their rows and fields. No back door.

No coding required

Connect TypeRule to Claude or ChatGPT ​

TypeRule has an MCP server: connect your project to Claude, ChatGPT or any assistant that speaks MCP, and describe what you need in plain words. The assistant writes the rules, TypeRule checks every line and runs the tests, and nothing changes until you approve it.

Say it in plain words

“An order can’t be confirmed if it loses money.” The assistant turns it into a rule you can read.

Checked before it’s applied

TypeRule checks the code and runs the tests. The assistant gets every error with its line, and fixes it.

You approve every change

Nothing reaches your data until you say yes, and every change stays on record.

Works withClaudeChatGPTCursorany MCP client
Using an AI agent? Paste this into it
Read https://typerule.com/llms.txt, then help me build my app with TypeRule.
AI, with guardrails

Would you trust AI-written code to run your business? ​

AI writes a custom app
  • Thousands of lines nobody reviews
  • Money as floating-point numbers, rounded wherever it happens
  • Permissions checked in some places, forgotten in others
  • Schema changes tried out on production data
AI writes TypeRule
  • A few dozen lines you can read
  • Money and units are types, and rounding is explicit
  • Permissions written once, enforced everywhere
  • Migrations rehearsed on a copy of your data first
Who it's for

Built for the people who keep operations running ​

Engineering leads in growing companies

Thirty critical spreadsheets and four quick apps? Replace them with one system, without weeks of boilerplate.

Software houses and consultants

Deliver custom management software sooner, with fewer data bugs. Your client gets readable code, not a black box.

Operations and plant managers

The work around the ERP: production, returns, non-conformities, job costing. Where Excel is too fragile and the ERP too rigid.

And what TypeRule is not: 100 things it will not do

Use cases

What you can build ​

No need to replace your ERP on day one. Start where the spreadsheet hurts most.

Finance calculations

Commissions, budgets, cost allocations, cash forecasts.

Logistics

Stock, lots, picking and shipments.

Production

Work orders, progress and job costing.

Lab analysis

Samples, results within limits, certificates.

Timesheets

Hours by person and project, approvals, billing.

Quality

Non-conformities, returns, corrective actions.

Purchasing

Requests, approvals, suppliers, contracts.

Bookings

Machines, rooms, vehicles and people.

Hosting

Run it on your machines, or in our cloud ​

The same project runs anywhere. Keep it on your own servers, or let us run it for you.

Self-hosted · Open source

Your servers, your data

One command on your machines, with SQLite or PostgreSQL. Nothing leaves your network.

  • Runs on Linux, macOS, Windows or a container
  • Your database, your backups
  • Your identity provider for sign-in
Free, the TypeRule language is open source
TypeRule Cloud

We run it for you

Push your project and it's live. No servers to manage.

  • Deploy from GitHub or the command line
  • A preview for every branch
  • Continuous backups and custom domains
  • RPO 0: no saved change is ever lost
  • Environment forks: a copy of production to try anything on
  • Sign-in for your users, with no email server to set up
  • Teams, and two-factor sign-in for your account
Starting at €0/month
Try it for freeNo credit card required

Try it now. Nothing to install. ​

The sandbox runs the whole system in your browser. Change the rules, watch the app change, then download the project and run it with typerule dev.

Open the Sandbox runs in your browser

TypeRule: the books balance.