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.
# 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
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.
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.
A seeded data folder
A demo seed fills an empty store with a catalogue in about 45 seconds.
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.
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.
Look at the header Idempotent-Replay: true: this answer is the first one again. The engine did not change the sale a second time.
This console needs JavaScript. The calls are in the API reference: every operation, its scope, its input and its answer.
516 operations. One way to call them.
| Operations | 516 working operations, 514 of them in 45 scopes: the same operations as /admin. A scope is an exact match. |
|---|---|
| Description | GET /api/v1/openapi.json, OpenAPI 3.1, with no token. |
| Errors | One body: error, message, code, field, request_id. Use code: it is stable and the list only grows. |
| Retries | Idempotency-Key on a POST; the answer is kept for 24 hours. |
| Paging | limit and after, with a Next-Cursor header and a Link header. |
| Rate limits | A one-minute window per token, 60 calls by default, with RateLimit headers. |
| Stability | One 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.
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.readorder.placedAn order was confirmed and waits for its paymentorder.paidAn order was paidorder.packedAn order was packedorder.shippedAn order was shipped, or the shipment was correctedorder.deliveredAn order was deliveredorder.cancelledAn order was cancelledorder.refundedAn order was refunded in fullorder.part_refundedA part of an order was refundedinvoice.reminder_sentAn overdue reminder for an account invoice was sentorder.editedThe owner edited a placed orderorder.exchangedAn exchange of goods was acceptedorder.stock_readyThe last wait of a paid order was covered: its stock is thereorder.slot_changedStaff gave an order another delivery slot, or took its slot awaydocument.issuedAn order issued a tax invoice or a credit note, with its printed number and seller
Shipments
orders.readshipment.in_transitA shipment is on its way, for the first timeshipment.out_for_deliveryA shipment is with the driver, for the first timeshipment.ready_for_collectionA shipment is at its pickup point or lockershipment.deliveredA shipment was delivered
Catalogue
catalogue.readproduct.createdA product was addedproduct.updatedThe owner or an integration edited a product or a variantproduct.review.approvedA person approved a product’s reviewproduct.review.sent_backA person sent a product’s review back with a noteproduct.review.look_againAn approved product changed, and a person must look againproduct.review.photo_askedA person asked for a new photo of a productproduct.review.photo_withdrawnA person withdrew a product’s photo requests with no new pictureproduct.review.retiredA person approved a product’s retireproduct.unretiredA retired product was put backpicture.approvedA version of a picture was approvedpicture.rejectedA version of a picture was rejectedpicture.version_requestedA picture tool was asked for a new versionschedule.appliedA scheduled publish or unpublish was doneschedule.refusedA scheduled publish or unpublish was refused, with the reasonproduct.review.note_taken_backA person took a product’s open send back notes back with no editvariant.sku_changedThe SKU of a variant changed, with the old and the new SKU
Stock
stock.readstock.lowA variant fell to its reorder level or below itstock.changedA stock movement changed a variant’s level at a location, one event for each movement
Gift cards
giftcards.readgiftcard.issuedA gift card was issued, one for each card a paid order soldgiftcard.redeemedAn order took an amount off a gift card
Supplier orders
suppliers.readsupplier_order.madeA supplier order was made for an ordersupplier_order.state_changedA supplier order changed its statesupplier_order.open_on_cancelled_orderAn order was cancelled or refunded in full while its supplier order is open; the store decides
mail.readcampaign.discardedA draft campaign that was never scheduled was discardedcontact_import.undoneThe undo of a contact import is done, one event for the import
Customers
customers.readcustomer.createdThe store kept an email address for the first timestatement.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.
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.
- 01
Your table
The engine runs it after its own migrations, in one transaction. Your names start with your prefix.
CREATE TABLE x_acme_notes_notes ( product_id INTEGER NOT NULL, note TEXT NOT NULL, author TEXT NOT NULL, created_at TEXT NOT NULL ); - 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.
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), }) }
- 03
Your screen
Read your table with
ext.Readin the request’s context. Answer HTML, and the engine puts it in its own admin page: its sign-in, its layout, its security headers.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) }
- 04
Your binary
A copy of the engine’s own main package with one more import line. Build it, and the module is in.
import ( "ecomlite/engine/internal/cli" _ "ecomlite/engine/acme" // the one new line )
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.
What you can change, and how.
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 APIYour own features in /admin
Your tables, screens, menu entries and staff rights, as a module in your fork.
engine/extYour own rules
Checks before a product goes live, holds on pictures, your part of a privacy erasure.
engine/extYour own services
Anything outside the engine: read and write with 516 operations, react to 42 events.
API and webhooksA new courier
Your own HTTP service on the courier protocol, proved with one certify command.
courier/1Payments, mail transports
Built into the engine. A new one is a change to the engine itself, with a conformance suite to pass.
Engine changeA 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 yetYour 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, AddToCartReact 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, SendMailEvery 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.OperationsYour 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.RegisterRouteCards, 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, RegisterListColumnA different admin layout
Module screens live inside the engine’s admin layout; the layout itself is the engine’s.
Not in ext v1.2From the extension API and the integration guide on main, 18 November 2026.
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.
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.