Skip to content

Plugin Structure ​

Every plugin has the same basic layout on all three platforms: one folder per version, plus an optional database/ folder.

my-plugin/
├── 1.0.0/                  ← one folder per version
│   ├── setting.json        ← manifest (required)
│   ├── script.js           ← registers pages, widgets, translations (required)
│   ├── index.vue           ← starter component from mot create
│   ├── widget.vue          ← dashboard widget (EA / SA, optional)
│   ├── setting.vue         ← settings page (optional)
│   ├── main.js             ← backend routes (EA only, optional)
│   ├── README-EN.md        ← store listing, English
│   ├── README-AR.md        ← store listing, Arabic
│   └── logo.png            ← plugin icon
├── 1.1.0/                  ← add a new folder for each release
└── database/
    └── my-plugin/
        └── data.json       ← initial data (optional)

Only setting.json and script.js are required. You don't need a src/ folder, because .vue files sit directly in the version folder. As the plugin grows, group related files into feature folders such as bills/ or suppliers/.

The key files ​

FileWhat it does
setting.jsonManifest: name, version, platform type and entry files
script.jsRuns when the app starts. Registers pages, widgets, menu entries, roles and translations
*.vueYour UI, written with Vue 3 and PrimeVue
main.jsEA only. Backend routes with Express or NestJS (reference)
README-EN.md / README-AR.mdWhat the store shows on your plugin's page (format)
database/<name>/*.jsonStarting data for your plugin

setting.json ​

json
{
  "id": "unique-plugin-id",
  "name": "my-plugin",
  "type": "EA",
  "version": "1.0.0",
  "versionNumber": "0",
  "script": "script.js",
  "main": "main.js",
  "assets": "assets",
  "packages": [
    { "name": "nodemailer", "version": "6.9.2" }
  ],
  "init": true,
  "user": 1
}
FieldDescription
idUnique plugin identifier
namePlugin name, which is also the folder name
typeEA, SA or OS
versionVersion string. Must match the version folder name
versionNumberCounter that goes up with each release
scriptFrontend entry file
mainBackend entry file (EA only)
assetsAssets folder
packagesnpm packages that main.js needs (EA only). They are installed on build
init, userSet by the platform

The platform guides list every field: EA, SA and OS.

Reading and writing data ​

PlatformHow
EAapp.database() in main.js, or the plugins/database endpoint from Vue
SA / OSapi.database() from the api module (local JSON)

New versions ​

To release an update, copy the latest version folder (for example 1.0.0/ → 1.1.0/), then update version and versionNumber in setting.json and add a changelog entry to the README files.