chatcraft.org icon indicating copy to clipboard operation
chatcraft.org copied to clipboard

Switch sharing to use remix

Open tarasglek opened this issue 1 year ago • 3 comments

@humphd got me excited, so I had to figure out the remix.js mental model.

They mix server and client code as is hip. I wanted to understand how api routing works to see if we can use it as a server-side only framework (for my personal incremental understanding of how the stack is composed).

  1. Instructions for creating CF Pages app: https://remix.run/docs/en/main/future/vite#cloudflare
  2. The template for them is https://github.com/remix-run/remix/tree/1fc94dd3b6ee880d353c6971dbcf9078cb7e494a/templates/unstable-vite-cloudflare This is delightfully simple.
  3. https://chatcraft.org/api/share/tarasglek/xp5A6rszHiqroXp22E6Ap explains how to layout a basic server-side structure.
  4. I also found https://github.com/remix-run/examples/tree/main/sse-chat helpful

Overall looks very sane. Incremental migration from our current setup to remix looks downright trivial.

tarasglek avatar Feb 14 '24 10:02 tarasglek

The Remix YouTube channel has really good bite-sized videos showing how Remix works. In the past few weeks, they've done a few on the new CloudFlare Workers Vite support:

  • https://www.youtube.com/watch?v=B_vIp4xETl4

This playlist is also really good showing some interesting patterns:

  • https://www.youtube.com/playlist?list=PLXoynULbYuEApkwAGZ7U7LmL-BDHloB0l

humphd avatar Feb 14 '24 15:02 humphd

@rjwignar looping myself in for awareness. I'd like to work on related issues once this is setup

rjwignar avatar Feb 14 '24 16:02 rjwignar

https://blog.jim-nielsen.com/2024/two-tips-building-with-react-router/ useful post and the link to react router improvements too

tarasglek avatar Feb 22 '24 07:02 tarasglek