Skip to content

DEIP Off-chain server is available to all portals connected to the DEIP Network.

Notifications You must be signed in to change notification settings

casimir-one/backend

Repository files navigation

Casimir Off-Chain Server

Casimir Off-chain server is a part of the off-chain cluster. In addition to rendering and storing read models, it also displays them immediately to the end-user. Essentially, the server functions as a proxy between the blockchain and the front-end. A signed user transaction is sent to the server, then to the blockchain. This allows the creation of the correct read model and authentication of the user.

Casimir Off-chain server is blockchain agnostic and can be used with any blockchain. It is available to all portals connected to the Network, which makes it a universal server.

The server is based on Command Query Responsibility Segregation (CQRS), which maximizes its performance, scalability, and security. It is also connected to the file storage system. Therefore, local storage and SMTP server storage can both be used. MongoDB is used to store the read models.

Local Development

  1. See the repo with docker template configuration. Go through the "Backend and Frontend development on local environment" section

  2. Start the server in dev mode using the local config:

DEIP_CONFIG=local npm run dev
  1. If you need to work with Casimir packages that the server depends on, you can link your local Casimir packages repo by running the following command. This will allow you to develop both Casimir packages repo and Casimir server repo locally without packages re-publishing.
npm run linkModules

Environment

  • Command-handlers process commands that come from the front-end. Command-handler sends the command to the blockchain and writes read models.
  • Config — environment variables required to run the server.
  • Environment constants.
  • Controllers — front-end API endpoints.
  • Dar — supported third-party texture editor for content creation.
  • Database. MongoDB is used to store read models.
  • Default templates.
  • Server errors.
  • Event-handlers process events after command executing.
  • Supported events.
  • Forms — form processors.
  • Middlewares — a set of intermediate steps that request takes before entering the controller.
  • Schemas are used to write read models.
  • Subsidiary scripts.
  • Internal services are used for data handling.
  • A file storage system. Local storage and SMTP server storage can both be used.

About

DEIP Off-chain server is available to all portals connected to the DEIP Network.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages