The diagram above illustrates the different elements of Restspace and how they connect.
In the centre is the Restspace Server Instance. This is built on Deno and is a web server runtime. It is similar to an MVC framework like Express, however controllers (units of code which compute the response for a request on a certain url path) are not written as part of a code base. Instead they are plug-in service components which are loaded at runtime based on a JSON manifest which defines where the source can be read from and a set of configuration values. These components are structured similarly to controllers in Express and as such, Restspace can do anything an Express server can do.
The service components are loaded from the Component Catalogue. Components in the catalogue can be hosted on any url. The core Restspace library will include a set of approved components which will be hosted using IPFS so that consumers can rely on the component code being permanently available.
Under Component Catalogue there are two key groups of services. The Auth System includes components which work together to manage authentication. Generally any Restspace instance will require at least the User Data and Auth components. The former stores user data as extensible JSON, the latter handles generation and verification of JWT tokens for simple token-based authentication. Also we have Wallet Connect for generic wallet-based authentication and a Metamask component specifically to handle Metamask. Another component can handle generic OAuth registration and login for web 2 identity providers.
Notification / Messaging
Under Notification / Messaging we have a couple of services to manage web3 and web 2 notifications. EPNS handles cross-chain notifications generated by smart contracts, but requires a stake to be submitted to generate a notification channel in order to avoid spam and to incentivise subscribers. Pub/sub is a generic component for conventional pub/sub messaging systems.
The adapter catalogue contains adapters which connect the same service component to a variety of different infrastructure services or APIs which serve a similar function, so that a consistent API to that functionality is available within Restspace. Some examples are shown, for instance Data Adapters connect to different kinds of infrastructure which can provide a key value store. Chain adapters connect to different blockchains via a cache database used for rapid access for the data stored on a blockchain node.
Workflows in Restspace are also called pipelines. A special service component runs pipelines based on description files which specify a series of urls of service components (or in fact external urls) to be called in turn, the response data from one being sent as a request to the next. Pipelines can be triggered by other service components, or directly by web requests. Examples are given of triggers from an Timer service component, as a result of the Discord service component being notified of a message in Discord, or from an EPNS channel in turn triggered by some smart contract action.
The Server Instance presents an API which can be consumed by any client, the example of a custom web app is shown. The web app can itself be hosted and served from the API.
Restspace provides two management UIs.
The Low Code UI allows for management of service components configuration directly and for manipulation of data stored in service components with editors. This UI requires some technical knowledge of HTTP requests, JSON and JSON schema, and possibly HTML and HTML templates.
The No Code UI allows for a workflow-oriented construction of pipelines of services. It is simple enough for non-technical ops works to be able to use. A visual editor canvas has service components dragged onto it and connected into pipelines.