Skip to content
AntFabric Corev1.0.0local

Set up and add plugins

You never edit core. You get a core instance of your own and put plugins into it; everything you write lives in plugins/<name>/.

You need Node 26.13.0, pnpm 10.15.0, Docker running and SSH access to git.geekyants.com.

Terminal window
# 1. Get core (it carries the devkit)
git clone git@git.geekyants.com:antfabric/antfabric-v2/core-v1.git antfabric-core
cd antfabric-core
fnm use && pnpm install
# 2. Create your own instance beside it
pnpm antfabric create ../my-app # core's main; --ref <tag> once core has release tags
cd ../my-app
pnpm dev:setup # .env files, Docker services, database, seed

my-app is core cloned at one commit, with a fresh git history and a fingerprint of every core file. From here on, work in my-app.

You have Command What happens
Nothing yet: a new plugin pnpm antfabric plugin new crm (--mobile for phone screens) plugins/crm from the template, selected in instances/local.yaml and linked
A plugin repository (Chat, Sales, …) pnpm antfabric plugin clone git@git.geekyants.com:antfabric/antfabric-v2/plugins/chat.git Cloned into plugins/chat as a real folder with its own .git, and selected
A repository you cloned into plugins/ yourself pnpm antfabric plugin select <folder> Selected, installed, codegen run
A packed plugin (.tgz someone sent you) pnpm antfabric plugin add ~/Downloads/af.crm-0.1.0.tgz Checked (format, checksum), unpacked into plugins/, selected
Only another plugin’s contract types (e.g. Sales calling Chat without Chat) pnpm antfabric plugin add ~/Downloads/af.chat-contracts-1.0.0.tgz @antfabric-contracts/chat in plugins/chat/contracts, without Chat

Then, every time you add one:

Terminal window
pnpm --filter backend db:migrate # the plugin's schema, role and permissions
pnpm dev # API + workers + user app (:5173) + App Admin (:5174)

The plugin appears in the menu of every app it has screens for.

Do Command or place
Write code Only inside plugins/<name>/
Commit and push (repository plugins) From the plugin’s folder: cd plugins/chat && git commit … && git push
Check core is untouched pnpm antfabric check (the pre-commit hook runs it too)
Check the plugin pnpm plugins:check --boot; pnpm --filter @antfabric-plugin/<name> run typecheck, run lint, run test
End-to-end tests pnpm --filter backend test:e2e: core’s suite plus the selected plugins’ test/*.e2e-spec.ts (Testing)
After changing a controller or DTO pnpm api:spec
Share a version pnpm antfabric plugin pack <name> → dist/plugins/<id>-<version>.tgz and <id>-contracts-<version>.tgz
Take a plugin out pnpm antfabric plugin remove <id> (--delete removes its folder too; its data stays in the database)
  • One pnpm dev at a time. A core checkout and your instance use the same ports (3000, 5173, 5174): stop one before starting the other.
  • No symlinks. pnpm and Nx skip symlinked folders: always clone or add into plugins/.
  • Without --ref you get core’s main. Once core has release tags, pin one with --ref v<x.y.z>.
  • Installing a release by version (pnpm antfabric plugin add af.chat@0.1.0, from the plugin repository’s package registry with GITLAB_TOKEN) works once releases are published; they are not automated yet, so use a clone or a file.

Next: Your first plugin to build one, Plugin repositories for how repositories, tests and releases fit together, and the Devkit for every command.