Skip to content
AntFabric Corev1.0.0local

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 dev
3. Ship it pnpm antfabric plugin pack crm a checked, versioned .tgz
pnpm antfabric plugin add <file> into any other instance

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:

Terminal window
git clone git@git.geekyants.com:antfabric/antfabric-v2/core-v1.git antfabric-core
cd antfabric-core && fnm use && pnpm install
pnpm antfabric create ../my-app # --ref <tag> to pin a core release
cd ../my-app
pnpm dev:setup # .env, Docker services, database, seed

Your 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/.

Terminal window
pnpm antfabric plugin new crm --mobile # server, database, web, admin and phone screens
pnpm --filter backend db:migrate # its schema, role and permissions
pnpm dev # core + your plugin, hot reload

Everything 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.

Terminal window
pnpm antfabric plugin pack crm # checks, then dist/plugins/<id>-<version>.tgz
pnpm antfabric plugin add <file.tgz> # in another instance: unpacked, selected, wired in

All 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

Only the core team changes core: clone it, pnpm install, pnpm dev:setup, pnpm dev. See Local setup and Branches and merge requests.