Git Repositories
Your data model lives in a Git repository. The platform supports Bitbucket and GitHub repositories, as well as internal repositories hosted by Mosterd.
Repository structure
At a minimum, your repository must contain an index.json file at the root:
my-project/
├── index.json
├── employee.json
├── company.json
└── employment-agreement.json
Each class is defined in its own JSON file. The index.json file declares which classes are part of your project.
See Repository Structure for full details.
Branches
A tenant is linked to a specific branch in your repository. Because each tenant independently chooses which branch to track, you can freely map branches to environments:
| Branch | Environment |
|---|---|
develop | Development tenant |
test | Test tenant |
staging | Staging tenant |
main | Production tenant |
The number of environments and the branch names are entirely up to you. This lets you validate model changes in earlier environments before promoting them to production.
Multiple tenants from one repository
Several tenants can point to the same repository. This is useful for SaaS products where each customer is a separate tenant but all run on the same data model. Tenant A and Tenant B both read from main, while a shared development tenant reads from develop.
When you need to give a specific customer a customization, you can create a fork or a dedicated branch for that tenant without affecting the others.
Automatic reload via webhooks
When you push a commit to a branch, the platform can automatically reload the data model for all tenants linked to that branch — no manual action needed. Configure a webhook in your repository to point to the platform's webhook endpoint.
Both Bitbucket and GitHub webhooks are supported. The platform processes the push event and triggers a model reload for the affected tenants.
You can also reload the data model manually from the platform UI at any time.
Connecting a repository
When creating a tenant, you select:
- A VCS source — the Git provider (Bitbucket, GitHub, or internal)
- A repository — the specific repository within that provider
- A branch — the branch to read the model from
The platform then reads index.json from the root of the selected branch and resolves all class imports.
Internal repositories
Mosterd-hosted internal repositories are used for the commons library and for platform-managed content. As a builder, you typically work with Bitbucket or GitHub repositories.