Platform Overview
Architecture
The Mosterd Platform is a multi-tenant SaaS engine. Each tenant has its own isolated data store and is linked to a Git repository that contains the tenant's data model.
When a tenant is created, the platform reads the Git repository and loads the data model. The data model defines what kinds of objects exist in the system, what properties they have, and how they relate to each other.
The platform provides:
- A REST API for all CRUD operations, queries, and script execution
- A web application with list views, detail views, and forms — generated from layout and view definitions
- A reactive database that stores all tenant data
- Authentication and authorization via OAuth2
As a builder, you only interact with the platform through two things:
- A JSON-based data model in a Git repository
- The platform's configuration UI for tenant setup
How the data model is loaded
When a tenant is initialized, the platform:
- Reads
index.jsonfrom the root of the Git repository - Resolves all imported class definitions (referenced by their qualified name)
- Converts files written in an older definition format to the current one
- Merges any extension classes with the classes they extend
- Checks the whole model: unknown properties, references to fields, scripts and files that do not exist
- Activates the model — or, when it has errors, refuses it and keeps the previous model active
When the model is updated, the platform reloads it automatically via a repository webhook (Bitbucket and GitHub are supported), or manually from the platform UI. See Versioning and Compatibility for how errors are reported and how older files are converted.
Tenants and repositories
A single Git repository can serve multiple tenants. Each tenant is linked to a specific repository and branch. This makes two things possible:
- Multiple customers, one codebase — different customer tenants all point to the same
mainbranch and run an identical data model. - DTAP environments — separate tenants for development, test, staging, and production each track a different branch. Model changes are validated in earlier environments before being promoted to production.
See Git Repositories for details on webhooks and branch configuration.
The commons library
The platform ships with a set of built-in classes called commons. These classes are always available, regardless of what your repository defines. Your classes can inherit from commons classes or extend them.
See Commons Reference for the full list of built-in classes.