Another JAMStack Framework?

Published on Oct 12, 2020

I love Gatsby and NextJs, but I don't like being tied down to their respective back-end infrastructure to handle advanced back-end use cases like incremental pre-rendering to reduce build time. The pricing is ridiculous when you compare it to a traditional cloud hosting plan.

What full-stack web developers need is a NodeJS framework that takes a MERN stack (MongoDB + Express + React + Node) and makes it JAMStack compatible. BlitzJS already showed it's possible, but the underlying use of NextJS is problematic, as I previously explained.

We desperately need a tool to have the best of both worlds. Serverless is all you need when you have a medium-sized static website or a fast-changing app that doesn't require SEO, but you still need a server to manage complex configurations. That's one of the reasons why JAMStack didn't replace more traditional frameworks like Ruby on Rails, Laravel, Django, or ExpressJS.

On the opposite side, we can't afford to keep using traditional web infrastructures requiring more resources and providing less optimal user experiences. Information technologies emit as much CO2 as the aviation industry, so reducing every website and app data footprint will have a positive impact on everyone.

The framework of the future will be light-weight, fast to learn, develop with, build, and load, and easily deployed to any green hosting provider at a fraction of the standard industry costs. Opinionated and convention-based, but flexible when you need it to be.

The way I see it today, it would be a mix of Node for static file generation, Express to handle APIs and data access, Nginx to serve static content, and Preact to create interactive user interfaces. The rendering approach would be based on isomorphic rendering with Preact code transformed into static HTML files and hydrated on the client-side. The Express web server should never serve HTML itself and leave it to Nginx, since Nginx is written in C and will thus be much faster and more energy-efficient than Express to do that.