-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: towards a single template master generation -- with options. #864
Comments
I like the 3 options. Personally i barely see use cases for the lightweight service but i dont think it hurts. In terms of Ui i dont like the frontend option. I know Loco is supposed to be opinionated but just shipping some random react starter just dosent feel good to me and adds a ton of additional maintance if done correctly. I think a simple step by step guide to add a frontend in the Docs would be a better choice. This would also make the whole decision about "auto generated admin / login / etc" a lot easier. Love the options for HTML or HTMX |
Sillyvan makes a good point. One question I have, is React the only frontend option? If not, is the simple step by step guide to add a frontend to the docs applicable to other choices? |
I can spring in here. the answer is it depends So first up your classic SPA aka React, Vue, Svelte etc do all work. As long as you can run a command which ends up building an html file + js + the rest. Basically like the good old days where you dropped ur build folder in some FTP. With Loco we can easily just serve the HTML file which does all the magic for us. No additional work required. On the other hand if you want to use the so called "metaframeworks" so Next, Remix, Nuxt, SvelteKit etc it dosent make sense to have them inside ur Loco. Those frameworks will require Node on the server to render ur HTML for you etc. You CAN do this and its not bad! BUT its a standalone App which can talk with Loco over the network with a Rest API or what ever. Back to your question. I really dislike writing docs but if someone ends up making a good one i would happily help to add all the common frameworks myself Maybe we could even get away with just showing the user to edit their vite/rspack config and choosing the build folder to be /frontend |
The codebase should be as lean as possible, which puts the weight on the document. Sillyvan, like you, I find coding much more fun than documenting. What does make a good document to you, one that will provide a rich user experience? I think it should be easy for newbies to understand, while at the same time informative for those who are more technical. Thoughts? |
In my opinion a "newbie" should just stick to the templating engine (server assets) if you dont know how a frontend framework works, you will end up a lot slower. And the ones that do know how to use it will not struggle if they know that loco just serves their static output. |
My vote is to make Tera and server-side rendering the default and then have guides in the docs on adding in client-side assets. In regards to keeping one starter, we could keep a lean starter that has data api routes, rendered views, mailer, and a singular model (as an example?). Adding in Auth, Tasks, Workers, and other things could be done on the CLI though an AuthGenerator, WorkerGenerator, and so on. This does have the downside of having to maintain the generators (which could be tough) but could allow for having a single starter template. |
We'd like to move to a single master starter template, but have all major options available for users.
By evolution and iteration, we've learned that there are 3 types of starters:
Unlike Rails and Devise and their relationship, we've added User auth to API and SaaS by default. We think it's OK to leave it there, and have users just delete it when they don't need it.
We'd like to create a way for us to maintain just one starter, but to preserve the level of safety and testing we have today (which is great, we simply go into a starter project and test it out as a living thing).
Rails has rails-templates, and some custom way of specifying a starter -- which I'm not sure how maintainable it is for a small team of maintainers.
In addition we may need to introduce some unification or infrastructure at the Loco side to support better testing for various starter templates.
We'd like to get some feedback:
Any other feedback or ideas are welcome
The text was updated successfully, but these errors were encountered: