Instances
An instance is one organisation’s own AntFabric: its own database, users, sign-in providers, branding and plugins. Organisations never share an instance — one organisation per deployment.
The instance file
Section titled “The instance file”# instances/<id>.yaml: an organisation's instance (core's own local.yaml lists only Example)id: acmename: Acmebranding: { appName: Acme, primaryColor: '#E8553D' }targets: [web, desktop, mobile]plugins: - af.chat # added from its own repository (plugin clone or plugin add) - af.salesCodegen turns it into the registries every app builds from, and writes a composition lock
(instances/<id>.lock.json, committed): plugin versions, manifest digests and dependency ranges, so
a build is reproducible. AF_INSTANCE=instances/<id>.yaml selects another file.
What runs for one instance
Section titled “What runs for one instance”| Part | Job |
|---|---|
| API | Core and every selected plugin’s routes |
| Workers | Notification delivery, plugin workflows and schedules |
| Migration runner | Core and plugin migrations, one lock per instance |
| PostgreSQL | One database: core tables + a schema and role per plugin |
| Redis | Presence, socket fan-out, rate limits, SSO state |
| Object storage | One bucket |
| Apps | User app, App Admin; the desktop and phone apps point at its API |
The App Manager
Section titled “The App Manager”The App Manager is the control plane above instances (API on :3100, app on :5175, its own
database). One App Manager runs many instances; it is not part of any of them. For a new
organisation it writes the instance file (instances/managed/<id>.yaml), builds and starts the
instance’s containers, and creates its first superadmin with a one-time activation link.
Each instance has its own App Admin for the organisation’s administrators: users, roles, sign-in, notifications, plugin settings, storage and audit.
Removing an instance
Section titled “Removing an instance”Two stages, on purpose — an organisation’s data is at stake:
- Disable. Its apps stop and nobody can sign in. Data is kept.
- Remove. Allowed only after the grace period (
DECOMMISSION_GRACE_DAYS, default 30 days). Until then the instance can be enabled again. Removal takes a final backup, then removes every resource in reverse order of creation; the backup stays until the super admin deletes it.
Emergency access
Section titled “Emergency access”The App Manager can issue a signed, single-use recovery code for an instance (≤ 5 minutes). The instance verifies it and creates a temporary superadmin with one session of at most an hour, closed automatically.