Developers

Build on Mastura without changing it, and publish what you make for other companies. Pick the lightest way that does what you need.

Four ways to build on it

WayWhat it isRuns code in the server?Licence of your work
Extension packA file of data: workflow rules, reports, document templates, input form settings, numbering and a dashboard layoutNoYour choice
ThemeA file of colours and corner shapeNoYour choice
Outside appYour own program that uses the API and webhooksNo, it runs elsewhereYour choice
Core contributionGo code added to the system itselfYes, after reviewAGPL v3

Packs, themes and outside apps can’t run code inside someone’s installation, so installing one can’t break it or read data it wasn’t given. A pack’s workflow rules arrive switched off, and the installer reviews what it adds before agreeing. An outside app only gets what its API key’s user is allowed.

The API and webhooks

  • API keys act as a user, with that user’s permissions, read only or read and write. Only the key’s hash is stored, and the key is shown once.
  • Endpoints under /api/v1/ for accounts, contacts, items, journal entries, invoices, leads and the CRM, returning JSON.
  • Webhooks send a signed JSON post (X-Signature: sha256=…) of each record saved on the pages you choose, retried once if it fails.

File formats

Each file names its format and version, and a system refuses a version it doesn’t know. Later versions only add fields; a change that breaks old files gets a new version number.

FileFormatVersion
Extension packnbs-pack1
Themenbs-theme1
Trade document between partnersnbs-trade1

Publishing in the Marketplace

Every installation has a Marketplace where admins switch modules on and off and install packs and themes. Each pack and theme is published under a publisher, a company or an individual, whose name goes with it. A shared catalog of packs and themes from other developers is planned, along with publisher accounts and paid listings.

The documentation

The developer documentation covers the architecture, packs, themes, trade files, the API with a reference generated from the code, webhooks and publishing. It’s under the Apache License 2.0, so you can use its examples in your own work. See the licence.