Those last 2 years, I’ve been exploring Next.js static and server-side rendering capabilities thoroughly. I am particularly interested in how to render private and personalized content, a scenario you often hit when creating SaaS applications.
For instance, you might want to render a page differently based on the language, but also on the user organization and role within the organization, preferred theme…
Most often, developers will fall back to client-side rendering or request-time server-side rendering for such contents. That’s a shame, because I think static rendering of private and customized content is actually perfectly doable in many scenarios.
I’ve written an article that describe how to do so: https://blog.vulcanjs.org/lets-bring-the-jamstack-to-saas-introducing-rainbow-rendering-ad1834fe62ff
To put it in a nutshell, if you put a gateway in front of your Jamstack app, you really unleash the power of this architecture.
However, I haven’t yet succeeded to implement this architecture with Next.js.
I am not completely satisfied with Next.js capabilities. The recent introduction of rewrites is a first good step, but it lacks a way to process requests in order to secure them. Most common scenario being checking if the user is authenticated ; Next.js provides no way to do it correctly server-side.
Now, I am trying to get an higher view of this problematic, independently of the underlying framework. That’s how I’ve ended up here at Redwood
- What’s your opinion on such an architecture, and the possibility to handle private and personalized content in a static manner?
- Do you think this architecture could be implemented with Redwood?
PS: sorry if I post it at the wrong place, technically this article is not specific to Redwood and more focused on Next.js, which I use professionally, but I really wish to get Redwood users stance on Jamstack+personalized content