Caution
Code is provided as-is for reference purposes only.
Building a Webhook Data Service using Substreams. Goal is to allow users to create webhooks from a web interface and receive data from those webhooks in real-time.
We utilize SVIX to send webhooks data users. The management-api
stitches various services together to create and manage webhooks with a unified GraphQL API.
Here is a high-level overview of what different directories in this repository do:
web
: Web interface for creating and managing webhooks. Built with React,shadcn/ui
, Vite and Relay.management-api
: API that does the orchestration of webhooks, connects the web interface to the data service and manages the webhook lifecycle. Built on Cloudflare Workers, with GraphQL Yoga, Drizzle for Sqlite on D1erc721-substream
: A parametrized substream that tracks ERC721 token transfers for a given contract. Inspired from this example.substream-listener
: A Node.js service that subscribes an Event Stream from a Substream for a webhook user project and pushes the data to SVIX project configured for the User.substream-orchestrator
: A Node.js service abstraction on top of K8s API to manage orchestration of Substream Listener services.utils
: Shared utilities and types between the different services.deployments
: Pulumi code to deploy infrastructure and services to various providers.prometheus
: Local development Prometheus setup to monitor the services.grafana
: Local development Grafana setup to visualize the metrics from Prometheus.
- Install following
- Run
pnpm install
in the root of the repository to install dependencies. - Run
pnpm dev
in the root of the repository to start the development servers.