Demo

Installation

Install @quan-erp/cli, scaffold a project with quan-erp new-project, start the base stack, then build and register your plugin.

1. Prerequisites

Install these before creating a project. You need Node.js for the CLI and plugin builds, and Docker for the base stack.

RequirementNotesInstall
Node.js 18+20+ LTS recommended — required for @quan-erp/cli and plugin npm installsInstall →
Docker Engine + Compose v2Runs Postgres, Redis, backend, and frontendInstall →
Supported OSmacOS, Linux, or Windows with Docker Desktop / WSL2
Disk & RAMEnough free space for images + volumes; ~4 GB RAM recommended for local compose

2. Install the CLI

The official Quark ERP CLI is published as @quan-erp/cli. After a global install, the primary command is quan-erp (aliases: quark-erp, erp).

SHTerminal
npm i -g @quan-erp/cli quan-erp help

3. Create a project

Scaffold a full Quark ERP workspace into an empty folder with quan-erp new-project. The CLI pulls the official template (https://github.com/TheParadance/quan-erp-node-template).

  • Run new-project from an empty directory
  • plugins/ — create your modules here (see plugins/sample-es)
  • base/ — docker-compose, available/installed plugins
  • .agents/ — Quark ERP skills & rules for AI-assisted development
TSTerminal
quan-erp new-project # optional: quan-erp new-project --version latest

4. Run the base app

Before the first start, set Firebase FCM on the backend in base/docker-compose.yaml (FIREBASE_CONFIG: '' for local/dev, or a single-line service-account JSON when push is required). Then start the local base Docker stack from the project root. This brings up Postgres, Redis, backend, and frontend.

YAMLbase/docker-compose.yaml (backend environment)
FIREBASE_CONFIG: ''
TSTerminal
quan-erp base:dev # equivalent: docker compose -f base/docker-compose.yaml up -d

5. Configure your plugin

Copy patterns from plugins/sample-es, or scaffold with quan-erp new. name in module.metadata.json must match the folder name. Package names must be @quan-erp-plugins/<name>-backend|frontend.

JSONmodule.metadata.json
1{ 2 "name": "sample-es", 3 "type": "", 4 "pluginVersion": "1.0.0", 5 "description": "Sample plugin", 6 "moduleEntryObject": "Module", 7 "requiredBasedVersion": "1.0.0", 8 "pluginDependencies": {} 9}
TSOptional — new plugin
quan-erp new # or: quan-erp new-plugin

6. Build / watch with the CLI

From the project root, watch syncs into base/available-plugins/.

TSTerminal
quan-erp watch sample-es # or one-shot production build quan-erp build:prod sample-es

7. Register the plugin in local DB

Insert a module row on local/dev Postgres only (credentials from base/backend/.env or compose). Never seed UAT/prod.

SQLSQL
INSERT INTO module ("name","displayName","description","unInstallable","module_entry_object","plugin_version","dependencies","base_version","version") VALUES ('sample-es','Sample ES','Sample plugin',true,'Module','1.0.0','{}','1.0.0',1);

Next steps

  • Read Folder structure and CLI
  • Install the plugin from the ERP UI (moves it to installed-plugins)
  • Continue with Backend / Frontend documentation