Start here: how the framework works
AntFabric is a framework: a core that gives every product sign-in, people, files, live updates, notifications and background work, and plugins that bring the product features. You don’t change core; you get a core instance of your own and build plugins in it.
1. Set up core pnpm antfabric create ../my-app your own core instance (core's main for now)2. Build a plugin pnpm antfabric plugin new crm plugins/crm, selected and running with pnpm dev3. Ship it pnpm antfabric plugin pack crm a checked, versioned .tgz pnpm antfabric plugin add <file> into any other instance1. Set up core
Section titled “1. Set up core”You need Node 26.13.0, pnpm, Docker and access to the core repository. Get the devkit from a core checkout, then create your instance beside it:
git clone git@git.geekyants.com:antfabric/antfabric-v2/core-v1.git antfabric-corecd antfabric-core && fnm use && pnpm install
pnpm antfabric create ../my-app # --ref <tag> to pin a core releasecd ../my-apppnpm dev:setup # .env, Docker services, database, seedYour instance is core cloned at one commit with a fresh git history. create fingerprints every core
file: pnpm antfabric check, plugin pack and the pre-commit hook refuse while a core file is
changed, so your work stays in plugins/.
2. Build a plugin
Section titled “2. Build a plugin”pnpm antfabric plugin new crm --mobile # server, database, web, admin and phone screenspnpm --filter backend db:migrate # its schema, role and permissionspnpm dev # core + your plugin, hot reloadEverything you write is in plugins/crm/: plugin.yaml declares what the plugin offers (menu
entries, permissions, routes, events, workflows), and the shell shows it in every app. Next:
Your first plugin, Screens,
Server.
3. Ship it
Section titled “3. Ship it”pnpm antfabric plugin pack crm # checks, then dist/plugins/<id>-<version>.tgzpnpm antfabric plugin add <file.tgz> # in another instance: unpacked, selected, wired inAll commands: Devkit.
Walk-through: from an empty folder to a packed plugin
Section titled “Walk-through: from an empty folder to a packed plugin”Every command in this walk-through was run for real: create an instance, add a Notes plugin, see codegen wire it into each app, test it, pack it, and watch the guard refuse a change to core. The left side is the terminal, the right side the instance folder with what each step touched.
Open the walk-through full screen
Simulator: what happens to your plugin inside core
Section titled “Simulator: what happens to your plugin inside core”Once a plugin is in plugins/, core takes it from the instance file to a running app. Pick plugins
for an organisation on the left, then click Next (or use the arrow keys) to follow them through
eight steps. Try the scenarios: a plugin that needs another, a missing contract, an old contract
version. Forecast is a made-up plugin that shows a hard dependency; Chat and Sales live in their own
repositories, and Example ships with core.
Open the simulator full screen
| Step | What happens | Read more |
|---|---|---|
| 1. Pick | instances/<id>.yaml lists the organisation’s plugins |
Instances |
| 2. Read | Codegen reads every plugins/*/plugin.yaml |
Plugins |
| 3. Check | Required plugins present, contract versions compatible; a broken combination stops here | Contracts |
| 4. Order | Required plugins first; contracts are soft links | Plugins |
| 5. Generate | Imports of only the selected plugins, in each app’s git-ignored *.generated.ts files |
Generated code |
| 6. Build | Each bundler compiles only what is imported | Clients |
| 7. Deploy | One database schema and role per plugin, migrated in order | Data |
| 8. Run | The API, workers and apps register each plugin at start-up | Core services |
Working on core itself
Section titled “Working on core itself”Only the core team changes core: clone it, pnpm install, pnpm dev:setup, pnpm dev. See
Local setup and Branches and merge
requests.