Gateway Relay Architecture

A bird's eye view of the components that go into making the Gateway Relay function.

Gateway Relay Frontend

The Gateway Relay Frontend makes calls to the Gateway Relay API for the functionality it provides. The frontend houses only the components seen to the end user, and all of the Gateway Relay logic, such as gaining credits, setting payment methods, and sending relay transactions are all handled and facilitated by the Gateway Relay API.

There is an open roadmap item to rework this frontend to be server-side rendered, rather than client-side, to learn more about this, click here.

Gateway Relay API

The Gateway Relay API handles all of the logic related to the functionalities of Gateway Relay, as well as acts as a decoupling layer between the frontend and all of the dependencies. The Gateway Relay API is the only thing that can read from or write to Stripe or the Gateway Relay Backend.

On the functionality side, the Gateway Relay API contains endpoints related to the following groups of functionality:

  1. Cron job endpoints (undocumented)

Gateway Relay Database

The Gateway Relay Database stores all of the information necessary for performing the functionality related with the Gateway Relay platform. No personal information is stored, aside from the user's UP address. All payment information is stored within Stripe, and never gets stored in the Gateway Relay Database.

Stripe

Stripe is Gateway Relay's payment processing tool. All information regarding a user's payment information, as well as their active subscriptions and subscription amounts are stored here.

Stripe also calls a webhook on the Gateway Relay API in order to notify it of successful subscription payments, as well as subscription cancellations.

Pipedream

Pipedream is Gateway Relay's cron job executor. Pipedream is responsible for calling a few internal and undocumented endpoints responsible for the following functionalities:

  1. Deleting stale modifiers (runs every minute)

  2. Updating user experience (runs every 24 hours)

  3. Resetting user check in amount (runs every 24 hours)

Last updated