loco-rs / loco

🚂 🦀 The one-person framework for Rust for side-projects and startups
https://loco.rs
Apache License 2.0
5.21k stars 218 forks source link

Add HTMX Support #342

Closed ryankopf closed 9 months ago

ryankopf commented 9 months ago

Feature Request

HTMX is great and hugely up-and-coming in the frontend world. HTMX is a powerful tool that allows us to enrich our web applications with dynamic content, without the complexity of a full-blown JavaScript framework. This addition would streamline the development process, significantly reduce the learning curve for new developers, and enhance the overall user experience.

Key Benefits:

jondot commented 9 months ago

Thanks @ryankopf As much as I was able to gather, htmx is indeed closest to what Rails has today with Turbo. Would you like to submit some draft or PR that showcases how it all should work?

ryankopf commented 9 months ago

I've created a PR that is necessary to start on this. https://github.com/loco-rs/loco/pull/344

My PR renames "SaaS App" to "React Frontend". This is necessary so that when I go to create the HTMX frontend, it will make idiomatic sense what all the options are.

In the future, imagine generating a project will look like this:

What would you like to build?
> Stateless App
> API-Only App
> React Frontend
> HTMX Frontend
jondot commented 9 months ago

Thanks Ryan ❤️ , moving this to discussion (after I reviewed the PR)