@alexandreamormino/plugin-entity-manager-backend
v1.0.1
Published
Backend plugin for managing Backstage catalog entities with CRUD operations and validation
Maintainers
Readme
Entity Manager Backend Plugin
Backend plugin for managing Backstage catalog entities with CRUD operations, schema validation, and automatic catalog synchronization.
Installation
cd packages/backend
yarn add @alexandreamormino/plugin-entity-manager-backendRegister in packages/backend/src/index.ts:
backend.add(import('@alexandreamormino/plugin-entity-manager-backend'));On startup, the plugin creates its database table if it doesn't exist, registers API routes at /api/entity-manager/*, and sets up a catalog entity provider that syncs managed entities.
Configuration
All configuration is optional. Add to app-config.yaml:
entityManager:
enabledKinds:
- Component
- API
- Resource
- System
provider:
schedule:
frequency: { minutes: 5 }
timeout: { minutes: 3 }
schemas:
Component: schemas/component.schema.json
templates:
Component: templates/component.yamlSchema and template paths are resolved relative to the backend working directory (process.cwd()).
API
Base path: /api/entity-manager
| Method | Endpoint | Auth required |
|--------|----------|---------------|
| GET | /health | — |
| GET | /config | — |
| GET | /schemas | — |
| GET | /schemas/:kind | — |
| GET | /templates | — |
| GET | /templates/:kind | — |
| POST | /validate | — |
| POST | /entities | entity.manager.entity.create |
| GET | /entities | entity.manager.entity.list |
| GET | /entities/:kind/:name | entity.manager.entity.read |
| PUT | /entities/:kind/:name | entity.manager.entity.update |
| DELETE | /entities/:kind/:name | entity.manager.entity.delete |
Permissions
CRUD routes enforce the corresponding permission from @alexandreamormino/plugin-entity-manager-common. See the root README for an example permission policy.
Development
yarn workspace @alexandreamormino/plugin-entity-manager-backend test
yarn workspace @alexandreamormino/plugin-entity-manager-backend lint