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 https://www.contentful.com/ or https://graphcms.com/ – and if you still want a postgres db https://app.supabase.io/.
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