tillwire Read the guide
Developers

Build beside the engine, not inside it.

Your service, theme or module talks to Tillwire through public doors only. Each door has a contract in the repository and a test that keeps it equal to the code.

a running store
# what a running store is made of
engine      one Go program
data/       one SQLite database
store.yaml  one file of settings
theme/      your templates and CSS
one port    the shop, /admin and /api/v1
no queue server, no cache server
The parts of one store. The engine is not public yet, so this site has nothing to download: it explains and shows.
How it starts

A demo store from three things.

The engine is not public yet. This is how little a store needs: one program, one data folder and one token for each service.

  1. One program

    The engine is one Go binary, built with Go 1.26.1 or later. The shop, the back office and the API are all in it.

  2. A seeded data folder

    A demo seed fills an empty store with a catalogue in about 45 seconds.

  3. A token for each service

    A service calls the API with a token that holds only the scopes it needs, such as orders.read. The token shows once, and the store keeps only its digest.

Try it

Call the API in your browser.

These are real answers of the engine, recorded from a demo store. Pick a call: you see the request, the status, the headers that matter and the body. Try the refusals too: every error has the same shape and a request id. Send the same write twice and see the engine do the work once.

This console needs JavaScript. The calls are in the API reference: every operation, its scope, its input and its answer.

Operations API

516 operations. One way to call them.

Open the API reference: every operation, its scope, its input and its answer
From the OpenAPI file and the integration guide, main on 26 November 2026
Operations516 working operations, 514 of them in 45 scopes: the same operations as /admin. A scope is an exact match.
DescriptionGET /api/v1/openapi.json, OpenAPI 3.1, with no token.
ErrorsOne body: error, message, code, field, request_id. Use code: it is stable and the list only grows.
RetriesIdempotency-Key on a POST; the answer is kept for 24 hours.
Paginglimit and after, with a Next-Cursor header and a Link header.
Rate limitsA one-minute window per token, 60 calls by default, with RateLimit headers.
StabilityOne version, /v1. Operations and fields are added, never removed.

The 45 scopes

  • orders.read
  • orders.payments.read
  • orders.write
  • quotes.write
  • catalogue.read
  • catalogue.write
  • forms.read
  • forms.write
  • announcements.read
  • promotions.read
  • promotions.write
  • reviews.read
  • reviews.write
  • mail.read
  • mail.write
  • payments.read
  • payments.write
  • content.read
  • content.write
  • subscriptions.read
  • subscriptions.write
  • customers.read
  • customers.write
  • shipping.read
  • shipping.write
  • store.read
  • store.write
  • stock.read
  • stock.write
  • events.read
  • webhooks.read
  • webhooks.write
  • giftcards.read
  • giftcards.write
  • giftcards.adjust
  • giftcards.import
  • giftcards.import-undo
  • suppliers.read
  • suppliers.write
  • credit.read
  • credit.write
  • credit.grant
  • credit.take-back
  • rules.read
  • rules.write

A write scope does not give the read scope of the same group: ask for each scope you need.

Events

42 events. Read them or receive them.

Read the feed at GET /api/v1/events when your service cannot take calls, or register a webhook. Each webhook is signed with HMAC-SHA256, tried 8 times, logged and can be replayed.

Orders

orders.read
  • order.placedAn order was confirmed and waits for its payment
  • order.paidAn order was paid
  • order.packedAn order was packed
  • order.shippedAn order was shipped, or the shipment was corrected
  • order.deliveredAn order was delivered
  • order.cancelledAn order was cancelled
  • order.refundedAn order was refunded in full
  • order.part_refundedA part of an order was refunded
  • invoice.reminder_sentAn overdue reminder for an account invoice was sent
  • order.editedThe owner edited a placed order
  • order.exchangedAn exchange of goods was accepted
  • order.stock_readyThe last wait of a paid order was covered: its stock is there
  • order.slot_changedStaff gave an order another delivery slot, or took its slot away
  • document.issuedAn order issued a tax invoice or a credit note, with its printed number and seller

Shipments

orders.read
  • shipment.in_transitA shipment is on its way, for the first time
  • shipment.out_for_deliveryA shipment is with the driver, for the first time
  • shipment.ready_for_collectionA shipment is at its pickup point or locker
  • shipment.deliveredA shipment was delivered

Catalogue

catalogue.read
  • product.createdA product was added
  • product.updatedThe owner or an integration edited a product or a variant
  • product.review.approvedA person approved a product’s review
  • product.review.sent_backA person sent a product’s review back with a note
  • product.review.look_againAn approved product changed, and a person must look again
  • product.review.photo_askedA person asked for a new photo of a product
  • product.review.photo_withdrawnA person withdrew a product’s photo requests with no new picture
  • product.review.retiredA person approved a product’s retire
  • product.unretiredA retired product was put back
  • picture.approvedA version of a picture was approved
  • picture.rejectedA version of a picture was rejected
  • picture.version_requestedA picture tool was asked for a new version
  • schedule.appliedA scheduled publish or unpublish was done
  • schedule.refusedA scheduled publish or unpublish was refused, with the reason
  • product.review.note_taken_backA person took a product’s open send back notes back with no edit
  • variant.sku_changedThe SKU of a variant changed, with the old and the new SKU

Stock

stock.read
  • stock.lowA variant fell to its reorder level or below it
  • stock.changedA stock movement changed a variant’s level at a location, one event for each movement

Gift cards

giftcards.read
  • giftcard.issuedA gift card was issued, one for each card a paid order sold
  • giftcard.redeemedAn order took an amount off a gift card

Supplier orders

suppliers.read
  • supplier_order.madeA supplier order was made for an order
  • supplier_order.state_changedA supplier order changed its state
  • supplier_order.open_on_cancelled_orderAn order was cancelled or refunded in full while its supplier order is open; the store decides

Mail

mail.read
  • campaign.discardedA draft campaign that was never scheduled was discarded
  • contact_import.undoneThe undo of a contact import is done, one event for the import

Customers

customers.read
  • customer.createdThe store kept an email address for the first time
  • statement.sentAn account statement was sent to a client

From EventTypes in the operations contract on main. To read a type, a token needs events.read and the group shown.

Extend it

Add your own feature in four files.

An example: product notes for your staff. It gets its own table, its own screen in /admin, a place in the menu and its own staff right. No engine file changes, so the next upstream update merges cleanly.

  1. 01

    Your table

    The engine runs it after its own migrations, in one transaction. Your names start with your prefix.

    engine/acme/migrations/0001_notes.sql
    CREATE TABLE x_acme_notes_notes (
      product_id INTEGER NOT NULL,
      note       TEXT NOT NULL,
      author     TEXT NOT NULL,
      created_at TEXT NOT NULL
    );
  2. 02

    Your module

    Register the table, a staff right and the screen. A bad registration stops the start, so a mistake never reaches a buyer.

    engine/acme/module.go
    func init() {
      sql, _ := fs.Sub(files, "migrations")
      ext.RegisterMigrations("acme-notes", sql)
      ext.RegisterRight("acme-notes", ext.Right{
        Name: "edit", Group: "catalogue",
        Label: "Edit product notes",
      })
      ext.RegisterAdmin(ext.Module{
        Name: "acme-notes", Title: "Product notes",
        Right: "edit", Menu: true,
        Handler: http.HandlerFunc(notes),
      })
    }
  3. 03

    Your screen

    Read your table with ext.Read in the request’s context. Answer HTML, and the engine puts it in its own admin page: its sign-in, its layout, its security headers.

    engine/acme/notes.go
    func notes(w http.ResponseWriter, r *http.Request) {
      var n int
      err := ext.Read(r.Context(), func(tx ext.Tx) error {
        rows, err := tx.Query(r.Context(),
          "SELECT count(*) FROM x_acme_notes_notes")
        if err != nil { return err }
        defer rows.Close()
        if rows.Next() { return rows.Scan(&n) }
        return rows.Err()
      })
      if err != nil { http.Error(w, "no notes", 500); return }
      w.Header().Set("Content-Type", "text/html")
      fmt.Fprintf(w, "<p>%d notes for the team</p>", n)
    }
  4. 04

    Your binary

    A copy of the engine’s own main package with one more import line. Build it, and the module is in.

    engine/cmd/acme-shop/main.go
    import (
      "ecomlite/engine/internal/cli"
      _ "ecomlite/engine/acme" // the one new line
    )
The result

Your screen, inside the back office

At /admin/x/acme-notes/, in the admin menu for the people whose roles hold your right. Owners always have it.

An illustration of the example module. Module screens use the engine’s admin layout.

Extension points

What you can change, and how.

Yes

The whole shop front

A theme on the storefront contract: every page, every mail, all the CSS, and your own scripts in its assets.

Theme or API
Yes

Your own features in /admin

Your tables, screens, menu entries and staff rights, as a module in your fork.

engine/ext
Yes

Your own rules

Checks before a product goes live, holds on pictures, your part of a privacy erasure.

engine/ext
Yes

Your own services

Anything outside the engine: read and write with 516 operations, react to 42 events.

API and webhooks
Yes

A new courier

Your own HTTP service on the courier protocol, proved with one certify command.

courier/1
By an engine change

Payments, mail transports

Built into the engine. A new one is a change to the engine itself, with a conformance suite to pass.

Engine change
Not yet

A separate frontend app for buyers

A headless shop front with its own cart and checkout over an API is not in the engine yet. Buyers shop on the engine’s own pages, in your theme.

Not yet
Yes

Your own public pages and endpoints

A module serves every address under its own prefixes, such as /courses/: pages laid out in your theme, or JSON and files, with the signed-in buyer, inside the storefront’s guards. Its pages join the store’s search and sitemap, and it can put a line in the buyer’s cart with its own reference.

ext.RegisterPublic, RegisterSearch, RegisterSearchResult, RegisterSitemap, AddToCart
Yes

React to orders, run jobs, send mail

Hooks on paid, cancelled and refunded orders that never undo the order, jobs on the engine’s worker, and transactional mail the engine draws.

ext.RegisterOrderHook, RegisterJob, SendMail
Yes

Every operation, from your module

Call the store’s operations in process with no token, as a member of the team, each call checked against that member’s rights and logged.

ext.Operations
Yes

Your own routes in the API

A module serves JSON routes under /api/v1/ext/<module>, called with a bearer key that holds the right’s scope, with a rate limit shared with the engine’s calls and an entry in the OpenAPI file.

ext.RegisterRoute
Yes

Cards, buttons and columns in the admin

A module adds a card, a button, a menu entry or a list column to the engine’s own screens, as data that the engine draws in its own components.

ext.RegisterPanel, RegisterAction, RegisterMenuLink, RegisterListColumn
Not yet

A different admin layout

Module screens live inside the engine’s admin layout; the layout itself is the engine’s.

Not in ext v1.2

From the extension API and the integration guide on main, 18 November 2026.

engine/ext · version 1 with the 1.1 and 1.2 additions

A fork with its own modules.

Keep your code in its own folder and never edit engine files. Each module registers in init. With nothing registered, the engine does not change; a test proves it.

your-fork/
├─ engine/                upstream: never edited
│  ├─ ext/               the one public surface
│  └─ internal/          no promise
├─ engine/acme/          your modules
└─ engine/cmd/acme-shop/ your main package
RegisterMigrationsYour own SQL tables, under your own name prefix.
RegisterAdminYour own /admin screens, inside the engine’s sign-in and layout.
RegisterRightStaff rights that roles hold like any other right.
RegisterEraserYour part of a privacy erasure, in the same transaction.
RegisterApprovalCheckRead-only checks before a product goes live.
RegisterPictureHoldHold a picture from the shop, with a reason.
RegisterPictureImporterBring a product’s pictures from your own source when the product import names your importer.
RegisterMailingSendCheckCheck a marketing mailing when it is scheduled, and stop it with your reason.
Write, ReadYour own transactions, through the engine’s single writer and read pool, with a guard on every statement.
RegisterPublicPublic pages and endpoints under your own prefixes, laid out in the theme; a page that is the same for every guest may be cached (CachePublic).
RegisterOrderHookYour part of a paid, cancelled or refunded order, in a savepoint that never undoes it.
RegisterJobYour jobs on the engine’s worker, once or at an interval, tried again on failure.
SendMailTransactional mail from blocks, which the engine draws; no HTML from the module.
OperationsThe store’s operations in process, as a member of the team.
RegisterSearch, RegisterSearchResult, RegisterSitemapYour pages in the store’s search page, with the full count of each part if you give it, and in /sitemap.xml.
RegisterBlockA block of data (title, text, link, image) that the theme places on its pages.
AddToCartA line in the buyer’s cart from your public page, with your own reference, such as a booking number.
HasRight, ForbidCheck a right inside your /admin screen, and answer with the engine’s refusal page.
RegisterRouteYour own JSON route at /api/v1/ext/<module>, called with a bearer key, listed in openapi.json.
RegisterSettingsYour own settings, declared once and kept in store.yaml.
RegisterPanel, RegisterAction, RegisterMenuLink, RegisterListColumnYour card, button, menu entry and list column on the engine’s own /admin screens, as data the engine draws.
RegisterCodeGeneratorYour code for a new SKU, which the engine checks and never changes.
RegisterAccountPage, RegisterAccountLinkA page for a signed-in buyer inside the account, with a menu item; the engine keeps the sign-in gate.
RegisterCommandA command for the store’s owner to run from the shell, with engine module run.
WordsSay an error in the store’s language, from the engine’s own catalogue.
RegisterNotShippedName a list of your own table: its products are sold and never packed, weighed, quoted or delivered.
RegisterProductHook, RefuseProductHear every save of a product, from any path, in the save’s own transaction, and refuse it with your words.
RegisterCheckoutHold, RefuseCheckoutYour check of every order the engine places, from every path, in the order’s own transaction: hold a seat or a slot, or refuse the order with your words.
RegisterSupplierSenderSend supplier orders to a supplier’s own system in place of the mail, and keep its reference.

Rules a module can count on

  • A bad registration stops the start, so a broken module never serves a buyer.
  • A check, a hold and the code generator each get 2 seconds and read-only access.
  • A module that is late, fails or panics fails closed: the act is refused.
  • Your tables live in the same database, so backups and restores include them.
  • Rights of a module that is gone are removed from every role.

The module path is ecomlite/engine/ext today. It changes when the engine takes its new name; this page will show the new path then.

Rules

The rules that keep updates clean.

Never read or write the engine’s database from your service. Use the API.

Never rely on message text, page HTML or field order. Use code and the contract.

Never put a secret in store.yaml or in git. Use the environment or a file.

A module that keeps personal data registers an eraser.

Source: docs/INTEGRATING.md and engine/ext on main, 18 November 2026. The guide is in the engine repository.