Protocol Architecture
The protocol is composed of on-chain and off-chain components. We will get into details on both next:
Off-chain architecture
Frontend
The frontend of this dApp was built with React. It interacts with the backend server using API calls and with the protocol smart contracts using ethers library. Here's a breakdown of the frontend environment:
- Deployment URL: The deployed frontend application is accessible at https://alliancebridge.io/.
Important Notes:
-
The production frontend is built with minified and optimized code for improved performance.
-
Environment variables specific to the production environment are configured and not included in the Git repository for security reasons.
Backend Server Environment
The backend server is a Node.js application, using express, responsible for handling business logic, redis interactions, and communication with blockchain nodes. Here's a breakdown of the backend server environment:
-
Deployment Location: The backend server is deployed on https://backend.alliancebridge.io/.
-
API Documentation: The API reference documentation for the backend server can be found at Backend Reference.
-
Environment Variables: The backend server relies on environment variables to define configurations such as redis connections, API keys, and blockchain network settings. These variables are managed securely on the deployment platform.
Important Notes:
-
The backend server code in the Git repository might not reflect the exact production configuration due to the use of environment variables.
-
Access to the backend server itself is restricted for security reasons. Interaction with the backend happens solely through the documented API endpoints.
SDK
The Nexera Interoperability Protocol SDK provides an abstraction layer that simplifies the complexity of the Nexera Interoperability Protocol, allowing developers to focus on building their applications. By providing easy-to-use tools and libraries, enables developers to add custom messaging functionality to their dApps, making it possible to send specific messages to the different supported chains.
The SDK is composed by a core part with the main Teleport functionality, and allows the addition of SDK modules, to interact with the dApp specific SDK. Developers can create custom modules and add them to the SDK to provide additional functionality for the specific dApps. By Default, the official Nexera dapps SDK modules are added.
To use the Nexera Interoperability Protocol SDK, developers need to instantiate the SDK using the SDK factory. The factory allows developers to configure the modules that should be instantiated and the chain to which they want to connect. Once the SDK instance is created, developers can use it to interact with the Nexera Interoperability Protocol and the specific dApps.
More information on the SDK reference can be found at SDK Reference.
On-chain architecture
The Nexera Interoperability Protocol consists of the following on-chain components (contracts):
- Teleport.
- ProviderSelector.
- CCIPProviderAdapter.
- MPProvider.
- DApps (ERC20, ERC721, ERC1155 routers, among others).