by solardev · 3y ago · 0 comments
If you don't care about React (for its popularity) it might also be worth considering other frameworks.
I would remove as much of the backend as possible and store whatever I could on the edge and use serverless functions extensively (also built into Vercel and Next). Failing that, I would outsource the backend to a headless CMS or a managed database. I would abstract as much of it as possible instead of having to manage containers and VMs.
Javascript is incredibly powerful these days and the backend can often just be a dumb data store. Vercel is incredibly innovative and IMHO one of the two companies really pushing the Web forward (the other being Cloudflare).
My rationale is that this stack allows you to spend the vast majority of your code on business logic instead of infrastructure.
You can write each page in a few minutes, git push, and it's automatically built and hosted and cached. Stacks that used to take days to set up now takes mere minutes. It's so much better than it was even 4 or 5 years ago.
Next took me from hating React and JS to falling in love with it. I enjoy every new project I write in this stack, something I've never experienced before in any other language, frontend or back. It feels like the only stack that was designed with developer experience in mind. It's purpose built for web apps.
Also, many others and I would leverage a few extras. Typescript is practically a given these days, preventing a huge class of compilation and runtime bugs. Along with TailwindCSS for much improved styling, and NextAuth for auth.
And yeah, Next's built-in Typescript support is great. And not just TS, but dealing with the other parts of the buildchain that are traditionally a PITA to individually configure (the server, linter, bundler, package manager, etc.). Next sets it all up for you for ease of use and interop. It's beautiful.
Honestly, the real revolution at Vercel with NextJs in my opinion is the ability to easily use Edge functions now in any NextJs project. It's strange to me how so few developers use this, and understand how powerful the Edge is with Cloudflare. Even at Vercel itself they are focusing on the App folder and React Server Components (RSC). But, if you store everything at Edge and use Edge functions, everything is so incredibly fast, and easy to hook up/maintain that all the tooling around RSC is entirely useless.