Consider using Feathers
This would be a big change, but it's worth at least considering as Feathers already includes almost everything that pubsweet-server
and pubsweet-client
need.
Essentially, each top-level API endpoint is a "service", with all the usual method handlers. These methods can be accessed from a REST endpoint or a websocket interface.
Each service has a schema, and there are adapters for many different databases.
One of the most useful features is the definition of a series of hooks that runs before each request handler.