JS RPC and Entrypoints demos

This monorepo showcases two different examples of using RPC and Entrypoints in Cloudflare Workers.

  1. Public & Admin API Interfaces

    This is a comprehensive "to do" application example. It is composed of three different services, a D1 database, two web applications (one protected by Cloudflare Access), and two different Worker Entrypoints for different user role permission levels.

    Diagram of the public-admin-api-interfaces system

  2. Discord Bot

    Diagram of the discord-bot system

    This is a Discord bot, written as a Worker Entrypoint. It sketches a possible future where application integrations could be written as Worker Entrypoints, without needing to worry about boilerplate like routing or authentication (and instead, just with simple JavaScript hook-like functionality).

Learn more about the RPC system in Cloudflare Workers by reading the blog post.

Getting started

  1. Clone this repository: git clone https://github.com/cloudflare/js-rpc-and-entrypoints-demo.git && cd js-rpc-and-entrypoints-demo
  2. npm install in the root of this monorepo.
  3. cd into one of the applications, and open its README.md to learn more.

Documentation