chatcraft.org
chatcraft.org copied to clipboard
Switch sharing to use remix
@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).
- Instructions for creating CF Pages app: https://remix.run/docs/en/main/future/vite#cloudflare
- The template for them is https://github.com/remix-run/remix/tree/1fc94dd3b6ee880d353c6971dbcf9078cb7e494a/templates/unstable-vite-cloudflare This is delightfully simple.
- https://chatcraft.org/api/share/tarasglek/xp5A6rszHiqroXp22E6Ap explains how to layout a basic server-side structure.
- 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.
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
@rjwignar looping myself in for awareness. I'd like to work on related issues once this is setup
https://blog.jim-nielsen.com/2024/two-tips-building-with-react-router/ useful post and the link to react router improvements too