Remix Cloudflare Workers Do Boilerplate screenshot

Remix Cloudflare Workers Do Boilerplate

Author Avatar Theme by Himorishige
Updated: 23 Nov 2022
9 Stars

Turborepo boilerplate for Remix on Cloudflare workers with DO + KV

Categories

Overview:

The Remix Starter Kit is a Turborepo boilerplate designed for building applications using the Remix framework on Cloudflare workers with DigitalOcean and Session KV. It provides a set of tools and technologies such as Remix, Turborepo, Cloudflare Workers, Durable Objects, Workers KV, Tailwind CSS, ESLint, Prettier, and Playwright.

Features:

  • Remix: A powerful framework for building web applications.
  • Turborepo: A tool for managing monorepos using a single configuration file.
  • Cloudflare Workers: A serverless platform for running JavaScript applications at the edge.
  • Durable Objects: A serverless stateful computation system provided by Cloudflare Workers.
  • Workers KV: A distributed key-value store provided by Cloudflare Workers.
  • Tailwind CSS: A utility-first CSS framework for quickly building modern web interfaces.
  • ESLint: A pluggable linting utility for JavaScript and JSX.
  • Prettier: An opinionated code formatter that supports a variety of programming languages.
  • Playwright: A Node.js library for automating browser actions.

Installation:

To install the Remix Starter Kit, follow these steps:

  1. Append kv's id and preview_id to packages/worker/wrangler.toml:
kv_namespaces = [
  { binding = "SESSION", id = "<kv's id>" },
  { binding = "PREVIEW", id = "<preview_id>" }
]
  1. CI/CD: Append account_id to packages/worker/wrangler.toml.

  2. Append Cloudflare API Token to GitHub Actions Secrets (CF_API_TOKEN).

  3. Development:

    • Run package install example at the root of the repository.
  4. Deploy Turborepo:

    • Set up Remote Caching for Turborepo by linking it with your Vercel account. Run the following command from the root of your turborepo:
npx turborepo link-cache

Summary:

The Remix Starter Kit is a comprehensive boilerplate that combines various technologies and tools to provide a solid foundation for building web applications. With Remix as the core framework, developers can leverage features such as Turborepo, Cloudflare Workers, Durable Objects, Workers KV, Tailwind CSS, ESLint, Prettier, and Playwright to create robust and performant applications. The installation process is straightforward, and users can also take advantage of Remote Caching (Beta) to share cache artifacts across machines and improve team collaboration and CI/CD workflows.