Skip to content

Backend services ​

What you're doing ​

Adding backend code (Java, Python, Node.js or Go) to a plugin, running it as its own container, and controlling it from Studio.

Add the code ​

Choose the language that suits the job:

  • Java: Build, Add Java backend (starter)... writes a pom.xml, a plugin class (com.erp.plugins.<id>.<Name>Plugin) and a unit test, and sets mainClass in plugin.json. Edit files under Advanced, Java source in the Explorer. Studio compiles, tests, packages, deploys and controls it.
  • Python (FastAPI), Node.js (Express / TypeScript) and Go (standard library net/http): scaffold a runnable service project with platform-cli service-plugin:scaffold --id <id> --runtime python|nodejs|go --out <dir> [--port 8100], or the MCP tool erp_service_plugin_scaffold. The starter registers itself with the platform, sends heartbeats, reads the tenant and user from request headers and exposes a health endpoint. Node builds and tests run from Studio (Node: run); Python build and deploy buttons in Studio are Planned, so run its tests yourself and run the container yourself for now: it self-registers exactly like a Java service.

All three are reached at the same address, /api/v1/plugins/<your-plugin>/**.

Compile, test, package ​

Build, Compile Java, Run Java tests, Package Java. The jar stays on the build host and is never sent as JSON.

Deploy and control it ​

Deploy, Manage backend service... shows whether it runs, its health, version and live CPU and memory. You can:

  • Start, Stop, Restart (Stop keeps the container and its settings)
  • set CPUs (0.25 to 4) and memory (128 MB to 4 GB); these apply immediately
  • add environment variables (restarts it)
  • read the logs and run an earlier version

How requests reach it ​

When the service starts it registers itself with the platform and sends a heartbeat every 10 seconds. That adds a route /api/v1/plugins/<your-plugin>/** to the gateway, with the signed-in tenant and user attached. If it stops cleanly the route is removed and calls fall back to the platform proxy, which answers "temporarily unavailable" until it is back.

More than one region ​

Run one stack per region and give each the same PLUGIN_REGION=<region code> in its .env. A region without its own copy falls back to the platform proxy.

Check it worked ​

The dialog shows Running and Healthy; a call to /api/v1/plugins/<id>/... answers.

Common mistakes ​

  • Deploying before packaging: Deploy says to run Package Java first.
  • Changing memory below what the app needs: the container restarts repeatedly; read the logs.