|
1 |
| -This is a collection of packages for use with [Remix](https://remix.run), or any web framework you choose. |
| 1 | +This collection of packages empowers you to build modern web applications with maximum interoperability and portability, leveraging the power of web standards. Whether you're using [Remix](https://remix.run) or another framework, these tools are designed to seamlessly integrate into your workflow. |
2 | 2 |
|
3 |
| -It is laying the foundation for the next major release of Remix. |
| 3 | +This repository is laying the groundwork for the next major evolution of Remix. |
4 | 4 |
|
5 | 5 | ## Philosophy
|
6 | 6 |
|
7 |
| -Each package in this repository has a [single responsibility](https://en.wikipedia.org/wiki/Single-responsibility_principle). |
| 7 | +Our core philosophy is simple: **build on web standards, embrace single responsibility.** |
8 | 8 |
|
9 |
| -To maximize interoperability between packages, we build on web standards. Where standards are missing or incomplete, we augment them in unobtrusive ways to minimize the chance of incompatibility. |
| 9 | +Each package in this repository: |
| 10 | +- Adheres to the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle). |
| 11 | +- Prioritizes web standards to ensure maximum interoperability and portability across JavaScript runtimes. |
| 12 | +- Augments standards unobtrusively where they are missing or incomplete, minimizing incompatibility risks. |
10 | 13 |
|
11 |
| -A few examples of web APIs that we use on the server include: |
| 14 | +This approach means the JavaScript you write is **portable by default**. These packages work seamlessly across [Node.js](https://nodejs.org/), [Bun](https://bun.sh/), [Deno](https://deno.com/), [Cloudflare Workers](https://workers.cloudflare.com/), and other environments. |
| 15 | + |
| 16 | +We leverage server-side web APIs like: |
12 | 17 |
|
13 | 18 | - [The Web Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) instead of Node.js streams
|
14 | 19 | - [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instead of Node.js `Buffer`s
|
15 | 20 | - [The Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) instead of the Node.js crypto library
|
16 | 21 | - [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) and [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) instead of some bespoke runtime-specific API
|
17 | 22 |
|
18 |
| -You get the idea. The benefit of writing JavaScript like this is that it's portable between various runtimes. Unless explicitly noted, all packages in this repository work on any JavaScript runtime you might be using: [Node.js](https://nodejs.org/), [Bun](https://bun.sh/), [Deno](https://deno.com/), [Cloudflare Workers](https://workers.cloudflare.com/), etc. |
| 23 | +The benefit? Code that's not just reusable, but **future-proof**. |
19 | 24 |
|
20 | 25 | The goal is that these packages should be useful for anyone who is building for the web. If you're using [Remix](https://remix.run), we've designed it from the start to work with web standards. If you're using some other framework, you should easily be able to integrate these tools into your workflow as well without going full-blown Remix. If you're building your own framework, we hope you'll be able to build on this foundation as well.
|
21 | 26 |
|
22 | 27 | ## Packages
|
23 | 28 |
|
24 |
| -We currently publish the following packages: |
| 29 | +Discover our growing suite of tools: |
| 30 | + |
| 31 | +- [fetch-proxy](packages/fetch-proxy): Seamlessly construct HTTP proxies with the familiar `fetch()` API – ideal for API gateways or abstracting microservices. |
| 32 | +- [file-storage](packages/file-storage): Robust key/value storage tailored for JavaScript `File` objects, simplifying file management. |
| 33 | +- [form-data-parser](packages/form-data-parser): An enhanced `request.formData()` wrapper enabling efficient, streaming file uploads. |
| 34 | +- [headers](packages/headers): A comprehensive toolkit for effortlessly managing HTTP headers in your JavaScript applications. |
| 35 | +- [lazy-file](packages/lazy-file): Optimize performance with lazy-loaded, streaming `Blob`s and `File`s for JavaScript. |
| 36 | +- [multipart-parser](packages/multipart-parser): High-performance, streaming parser for multipart messages, perfect for handling complex form data. |
| 37 | +- [node-fetch-server](packages/node-fetch-server): Build Node.js HTTP servers using the web-standard `fetch()` API, promoting code consistency. |
| 38 | +- [tar-parser](packages/tar-parser): A fast, streaming parser for tar archives, designed for efficient data extraction. |
| 39 | + |
| 40 | +## Why Choose These Packages? |
25 | 41 |
|
26 |
| -- [fetch-proxy](packages/fetch-proxy): Easily build HTTP proxies using the `fetch()` API |
27 |
| -- [file-storage](packages/file-storage): Key/value storage for JavaScript `File` objects |
28 |
| -- [form-data-parser](packages/form-data-parser): A `request.formData()` wrapper with streaming file upload handling |
29 |
| -- [headers](packages/headers): A toolkit for working with HTTP headers in JavaScript |
30 |
| -- [lazy-file](packages/lazy-file): Lazy, streaming `Blob`s and `File`s for JavaScript |
31 |
| -- [multipart-parser](packages/multipart-parser): Fast, streaming parser for multipart messages |
32 |
| -- [node-fetch-server](packages/node-fetch-server): Build HTTP servers for Node.js using the web `fetch()` API |
33 |
| -- [tar-parser](packages/tar-parser): Fast, streaming parser for tar archives |
| 42 | +- **Web Standard-Focused:** Write code that's portable across Node.js, Deno, Bun, Cloudflare Workers, and more. |
| 43 | +- **Single Responsibility:** Each package is focused and does one thing well, making them easy to understand and integrate. |
| 44 | +- **Interoperable:** Designed to work together, and with your existing tools, thanks to their adherence to web standards. |
| 45 | +- **Future-Proof:** By building on web standards, your codebase remains adaptable and resilient to ecosystem changes. |
| 46 | +- **Remix Ready (and Beyond!):** While born from the needs of Remix, these packages are valuable for any web developer or framework author seeking robust, standard-compliant tools. |
34 | 47 |
|
35 | 48 | ## Using with Remix v2
|
36 | 49 |
|
37 | 50 | If you're trying to use these libraries with Remix v2, you'll need to [enable "Single Fetch"](https://remix.run/docs/en/main/guides/single-fetch#enabling-single-fetch) first. This tells Remix to use Node's built-in fetch primitives (`Request`, `Response`, `Headers`, etc.) instead of a broken polyfill we shipped in earlier versions of Remix.
|
38 | 51 |
|
| 52 | +## Quick Start |
| 53 | + |
| 54 | +Each package is available on npm and can be installed using: |
| 55 | + |
| 56 | +```bash |
| 57 | +npm install <package-name> |
| 58 | +``` |
| 59 | + |
| 60 | +Then, import and use as needed in your project. Refer to individual package `README` files for specific usage instructions. |
| 61 | + |
| 62 | +All packages are published in both modern ESM and legacy CJS formats for maximum compatibility with both existing and new projects. |
| 63 | + |
| 64 | +## Contributing |
| 65 | + |
| 66 | +We welcome contributions! If you'd like to contribute, please feel free to open an issue or submit a pull request. See [CONTRIBUTING](https://github.com/mjackson/remix-the-web/blob/main/CONTRIBUTING.md) for more information. |
| 67 | + |
39 | 68 | ## License
|
40 | 69 |
|
41 | 70 | See [LICENSE](https://github.com/mjackson/remix-the-web/blob/main/LICENSE)
|
0 commit comments