Express Adapter
@monque/management-express is the first Management Adapter. It is a thin Express package
that mounts the oRPC OpenAPI HTTP handler from @monque/management, passes Express-derived
request context into Management hooks, and serves OpenAPI JSON for the mounted API.
The adapter does not define Management routes, schemas, operation IDs, capabilities,
authentication, Dashboard assets, or Swagger/Scalar UI. Those responsibilities stay with
@monque/management, the host application, or future packages.
Installation
Section titled “Installation”@monque/core, @monque/management, express, and mongodb are peer dependencies.
Mounting
Section titled “Mounting”When mounted at /monque, the Management API is served under /monque/api/v1/*.
Authentication remains host-owned: mount authentication or session middleware before the
Management router. See
createManagementExpressRouter()
and
ManagementExpressRouterOptions
for the full adapter API.
OpenAPI JSON
Section titled “OpenAPI JSON”The adapter serves OpenAPI JSON generated by @monque/management. By default it is exposed
at /openapi.json relative to the mount path:
Configure the OpenAPI path and server URL when the public mount differs from the Express route:
Set openApi: false when the host application should expose the document itself. The
context option accepts a
ManagementExpressContextFactory
when authorization or payload serialization needs request-specific state.
Adapter Roadmap
Section titled “Adapter Roadmap”Express is the first adapter because it proves the Management Adapter boundary with a common Node.js HTTP framework. Future framework-specific management packages should follow the same shape:
- depend on
@monque/managementinstead of redefining routes or schemas - mount the oRPC OpenAPI HTTP handler as an opaque handler
- pass framework request context into Management authorization and payload serialization hooks
- leave authentication to the host application
- serve adapter-owned OpenAPI metadata such as server URL and OpenAPI JSON path
Future Ts.ED management support should ship as a separate Management Adapter package such
as @monque/management-tsed. The existing @monque/tsed package stays focused on
dependency injection, decorators, and scheduler lifecycle integration.