๐Ÿ’ปServerless backend

Worker base serverless, globally accessible edge implementation of OpenAPI 3 compatible APIs

Serverless APIs with Cloudflare Workers

GoPlausible leverages Cloudflare Workers to provide a scalable and efficient serverless API infrastructure. By utilizing Cloudflareโ€™s global edge network, GoPlausible APIs operate with ultra-low latency, ensuring that users experience rapid response times regardless of their location. The serverless nature of Cloudflare Workers eliminates the need for managing traditional server infrastructure, allowing for automatic scaling and fault tolerance out of the box. This setup enhances security, reduces operational costs, and enables seamless integrations across the Algorand blockchain, making it an ideal choice for decentralized applications built on the Plausible protocol.

GoPlausible dApp Architecture

  1. Frontend - GoPlausible dApp (SPA, PWA):

    • The GoPlausible frontend is a Single Page Application (SPA) and Progressive Web App (PWA), providing a seamless user experience across devices.

    • The dApp directly communicates with two key components:

      • Cloudflare Worker API: Handles serverless API requests for backend functionality.

      • Nodlely.io Service Endpoints: Connects directly with the Algorand blockchain to interact with on-chain data and perform transactions.

  2. Backend - Cloudflare Worker API:

    • Serverless APIs are hosted on Cloudflare Workers to scale and manage backend operations.

    • For each user interaction, the Cloudflare Worker API simultaneously:

      • Calls the GoPlausible Main Contract: This is done in parallel to user requests to maintain control, provide attestations, and verify contract logic.

      • Groups Transactions (TXNs): Ensures that user requests and attestation logic are within the same transaction group to ensure atomicity and correctness.

  3. Algorand Blockchain:

    • GoPlausible Main Contract: This smart contract is responsible for managing the global state and validating the interactions that take place through the API and frontend. It ensures that every operation is attested and properly tracked.

    • PLAUS Contract: A separate smart contract is created for each PLAUS issuance (Verifiable Credential Issuance). Each PLAUS contract contains the logic to assess claims made for that particular proof, enabling flexible, decentralized validation mechanisms.

Last updated