If you’d like a custom web application with generative AI integration, visit losangelesaiapps.com
I’ve been checking websites for some AI development agencies recently, and I’ve noticed that many of them list the same three frameworks on their websites. Sometimes it’s only two of them, but usually all three:
-
Vercel
-
Next.js
-
React
It seems like there’s something of a chain reaction going on, leading in both directions. A developer might learn to code with React, move on to a full-stack solution with Next.js, and then deploy with Vercel. Or maybe they heard about Vercel from a Twitter influencer, and then moved on to developing their web application with Next.js, which of course uses React.
Although Vercel can be used to deploy all kinds of apps, they seem to push Next.js the most. You could say that Vercel is the default deployment platform to use when building with Next.js (and vice versa). And this is because they’re both backed by the same company. This VC-backed company has great marketing. And this company doesn’t want you to self-host your own applications. From Vercel’s website:
Vercel is the native Next.js platform, designed to enhance the Next.js experience.
Next.js is a fullstack React framework for the web, maintained by Vercel.
While Next.js works when self-hosting, deploying to Vercel is zero-configuration and provides additional enhancements for scalability, availability, and performance globally.
Notice how closely tied these 3 frameworks are to each other. Together they form a sort of ecosystem, as every web framework naturally does through the defaults that they push. But one must wonder whether React, Next.js and Vercel are the best ways to build and deploy a web application in 2024. Are there any downsides to going with this ecosystem? How hard is self-hosting, really?
Paying the Middleman
Any decent businessperson knows that you need to reduce your reliance on middlemen. Nothing is free, everyone wants a piece of your pie. And Vercel is one of the biggest middlemen out there, legendary on Twitter for shockingly high monthly bills for “serverless” hosting. One user on Twitter recently estimated that migrating from a self-hosted VPS to Vercel would increase costs on the order of $30,000 per month.
What’s the alternative? Self-hosting. At Los Angeles AI Apps, we use Kamal to deploy our web applications directly to a VPS (or to your own hardware!). It handles zero-downtime deploys, rollbacks, deploying multiple apps to a single server, even SSL certificates. And it’s very simple to use, assuming a basic understanding of Docker and SSH. This trend is starting to catch on, with offerings such as Coolify, Dokku and Docker Swarm making self-hosting dead simple. Granted, these won’t give you everything that Vercel does out of the box (CDN, Monitoring and Analytics), but they’ll easily get you 80% of the way there. Saving 10-1000X on cloud bills has never been easier, despite what Vercel might have you think.
Middlemen all the way down
It doesn’t stop there. Suppose you wanted to use Next.js with a Postgres database. For an app of any significant size, you’ll likely need an ORM. But Vercel provides an SDK, not an ORM. One of the ORMs they point you to is Prisma, which they assure you is a “next-gen ORM” (whatever that means). I encourage you to follow the link and look at the futuristic-looking landing page. At the top, you’ll see a word that’ll be very familiar with if you’ve ever taken a tour of the React-industrial complex:
At this point, my friends in the Rails community are letting out an audible gasp. That’s right, this ORM has a Pricing page. Don’t worry, I’m sure they offer a very generous free tier!
Passing along the Costs
When hiring a product team to develop your next application, you should ask the team how they’re building and hosting the app. Are they using Vercel, Next.js and React? If so, they are probably passing the cost on to you in the form of higher hosting or maintenance fees. Consider going with an agency like Los Angeles AI Apps that hosts applications directly on a VPS through low-cost providers like Hetzner.
And for developers: mind the defaults. If your deployment platform, web framework, or ORM has any of the usual buzzwords (“Solutions, Products, Pricing”), consider a different, less grifty ecosystem. Ruby on Rails is one ecosystem that is not VC-backed, and by default pushes you towards free, open-source software. Laravel and Django are two others that come to mind, although recently there have been some concerning developments in Laravel-land. Learn to use free and open source tools that get you 80% of the way there, rather than relying on an ecosystem of middlemen.