DEV Community

gewumind
gewumind

Posted on

Build a Device Management Backend Without Rebuilding the Whole Back Office

Problem

You have a shelf of hardware — edge gateways, temperature and humidity sensors, industrial cameras, controllers, barcode scanners — running at a client site, and you need a back office to manage it. Nothing dramatic: a list of devices, their current status, who changed what, and an API a gateway can call to report in.

The device table itself takes an afternoon. What takes a sprint is everything around it:

  • Who can delete a device, and who can only view status?
  • When a device moves into maintenance, does someone have to approve it?
  • How does a third-party gateway authenticate, and what is it allowed to call?
  • Where are the call logs, so you can answer "which app hit which endpoint yesterday"?
  • How does the ops person get "how many devices are online versus in maintenance" without writing SQL by hand?

For a solo developer or a five-person team, that surrounding list is the whole project. And it keeps recurring: every client project, every new fleet of devices, you rewrite authorization, auditing, permission checks, and reporting from scratch.

Why it happens

A device module looks like one table and four CRUD endpoints. The back office it needs is a small system of its own.

Authorization is the first wall. The page has buttons, the API has paths, and the menus have entries. If you check only one layer, you have a hole: a role can see the menu but get a 403 on the endpoint, or worse, get a 200 on an endpoint it should not touch.

Then the operational part. Status is an enum, and someone has to keep those values in one place instead of scattering them across front-end code, back-end code, and test data. Statistics are reports. Approvals — a device moving into maintenance, a purchase of a new gateway — are a state machine with branches and notifications.

Off-the-shelf options rarely fit the gap. A full IoT platform brings device shadow, protocol parsing, and OTA pipelines: infrastructure shaped for fleets you do not have, not for a back office that manages a few hundred boxes. An enterprise CMMS is built for large maintenance organizations with dedicated IT. So the small team's default is the same as it has always been: hand-write the plumbing, ship it, and move on to the next project.

The problem is not the device module. The problem is that every device module drags along the same back-office foundation.

The foundation

GewuMind Boot is an AI-driven low-code backend container: HTTP endpoints written as scripts, pages maintained as component files, and menus, dictionaries, roles, and config managed online. Clone it and you get a usable backend in three steps — a baseline of 45 system tables plus built-in menus, roles, dictionaries, config, and page components — instead of an empty scaffold.

Three parts of that baseline matter most for a device management back office.

Authorization in three layers. Role management enforces menu, button, and API permissions together, so a role that sees a button is a role that can call the endpoint behind it. Menu management is the skeleton of routes and permission codes, and the data dictionary keeps enum values — device status, device type, whatever you add — in one place that front-end and back-end both read from.

Reports you define, with presets to start from. The platform ships report definitions plus nine built-in examples covering the common shapes: list, crosstab, Chinese-style, detail with subtotal, conditional formatting, nested detail, multi-sheet, merged rows, and column header extension. Every one of them can be exported to Excel. Your "online versus maintenance" view is a report definition over your device table, not a dashboard you code.

Open APIs for third parties. Application management gives each third-party app its own appKey/appSecret — the secret is shown only once, at creation. You authorize endpoints per API path and HTTP method, with per-endpoint rate limiting. The third party exchanges its credentials for a token and calls your endpoints from there. Every call is logged — app, endpoint, latency, status code, IP, timestamp — which you use for auditing and for tuning those rate limits later. A hardware gateway pushing status into your back office is exactly the integration target this is built for.

Two more pieces cover the operational layer. A workflow engine — conditional branches, CC, tier-by-tier rejection, per-node grouped approval, with the runtime living entirely inside your project rather than in an external engine — handles the approval flows a back office quietly needs, from "device into maintenance" to procurement, with four preset flows (leave, contract, procurement, cross-department) as starting points. And MQTT/Kafka integration gives you message channels: device messages in and out, queue produce and consume, callable directly from endpoint scripts. A channel, not a protocol stack — more on that below.

And you can extend all of it without a team. You install gewumind-skill into Claude Code, Cursor, or opencode, describe the requirement in natural language, and the agent walks it through requirement → design docs → code generation → publish, pausing for your confirmation at each stage. The artifacts are plain files — SQL, endpoint scripts, page components — equivalent to hand-written code and editable anytime. A failed publish can be rolled back.

Example

The demo-device module, shown in the EP02 video "Let the agent write a device management module", illustrates what comes out of that pipeline.

The device table holds code (which must not repeat), name, model, status — online, offline, or maintenance — and purchase date. Five preset devices ship with it: an edge gateway, a temperature-humidity sensor, an industrial camera, a controller, and a barcode scanner.

Four endpoints cover the daily work:

  • Paged list with keyword and status filters
  • Save for create and update
  • Delete, a soft delete
  • Stats — total plus per-status counts — guarded by the device:stats permission code. That code belongs to this demo module's stats endpoint, not to the platform built-ins; permission codes are declared where the endpoint lives, which is the point.

After publish, the module is immediately usable from the UI: the menu appears, the pages render, and role permissions apply to every button and call.

The request that produced it fits in one line:

Build a device management module with gewumind-boot: device registration,
heartbeat monitoring, firmware version management; publish to localhost:9089
Enter fullscreen mode Exit fullscreen mode

You describe the target, the agent produces design docs and then code — files you can read and edit like anything else — and the publish step puts it on the running backend.

What to look for

If you are evaluating a foundation for this kind of back office, the boundaries matter as much as the feature list.

It is not a full IoT platform. There is no device shadow, no protocol parsing, no built-in OTA or firmware upgrade orchestration. MQTT and Kafka are message channels here: send/receive and queue produce/consume from your endpoint scripts. If your edge devices speak a proprietary protocol that must be decoded in the cloud, or you need firmware rollout logic, that is a separate system to build or buy.

It is not enterprise CMMS. The device module is a business layer generated on top of the foundation. The platform provides the plumbing — authorization, dictionary, reports, approvals, open APIs, message channels — and you own the device model and the workflows around it. If you are looking for a large maintenance organization's toolset, or a hosted multi-tenant SaaS product, this is not it.

The licensing is Open Core, and the split is specific. The core is Apache-2.0. A set of enterprise capabilities — including the workflow engine, MQTT, Kafka, SSO, and the AI assistant, ten in total — are enabled by an offline commercial license key; the key does not change the Apache-2.0 licensing of the source. Without it, those capabilities run in a 30-day trial and then downgrade to the base edition, with offline verification and no network calls. So do not read the Apache-2.0 badge as "everything is free forever." If your plan needs MQTT or SSO long-term, confirm the licensing mode before the trial ends.

Generated code is real code. Because the pipeline outputs plain SQL, endpoint scripts, and page components, the device module above is auditable, editable, and diffable like hand-written work. If a tool hands you a black box instead, that boundary disappears.

Three questions sort the candidates: does the permission model cover menus, buttons, and APIs together? Are reports definitions with working presets, exportable to Excel? And can a third-party gateway get its own credentials, scoped per endpoint, with every call logged?

CTA

If you need a device management back office without rebuilding the foundation underneath it, take a look at GewuMind Boot.

Top comments (0)