Redwood as an SSG as well as generator customization

I just watched Rob’s YouTube videos on Redwood and I am super stoked on the direction that it is heading! There are a couple of things I would personally love to see!

SSG functionality:
In the videos, it talks about using Heroku (:nauseated_face:) for the DB. Since they go from free to holy-crap on their DB prices real quick…that scares me to even play around with. I’d feel exponentially more comfortable with that if the DB was accessed only when the site is built or during the other C~R~UD operations. Alternatively, I think there could be a decent benefit to spend some time building the “One Click” installs at VPC providers like Vultr, Digital Ocean, etc.

Generator Customization:
When I was building a lot of sites in ASP.NET MVC they provided a template, but you could easily provide your own T4 template. This was awesome when you were working on a site that you knew you’d be using the generators a lot for! You spend some time up front and then the generator generates an output that is what you want to end up with!

The generator customization isn’t a blocker for me personally, but I really would like to see some form of static asset generation before I go about building something that might see some real traffic!

1 Like

You can have a look at Prerender proposal – the thread has some considerations for accessing any data resource during that site build time.

But, you don’t have to deploy with a database. Your API could still define services and communicate with or – and if you still want a postgres db

There is an issue open where people are collecting some ideas to help make the generators more customizable:

And some discussion on Discord

if it could pass in your own template, would that help?

yarn redwood generate component --template my-uikit.js.template

What you’re describing here is a serverless DB like Fauna, which you can use with Redwood if you set up your own connection and queries. (Note: currently this has only been done as a proof of concept.)

The Tutorial uses Heruko for 2 reasons: the free option and ease of setup. But I can’t say I know of anyone using a Heroku DB for production. One alternative that’s been low cost and performant is Digital Ocean. See a thread here.