Incident timeline

    ← All articles

    Comparison

    Vercel vs Prongo for a monorepo with a backend and database

    Vercel is excellent for frontends. Here is where a full-stack monorepo with an API, workers and a database fits better on a container-based platform.

    · 3 min read

    In short

    • Vercel's unit is a project (usually one frontend), Prongo's is the whole repo
    • Stay on Vercel for frontends, consider a monorepo platform when the repo is a system
    • Mixing both is a perfectly fine setup

    Vercel is one of the best products in web hosting, and if you have a single Next.js or static site, you should probably stay there. This article is about a different situation: a monorepo with several services that must work together, such as a frontend, an API, a background worker and a database.

    The question is not “which is better”. It is “what is the unit you deploy?”

    The core difference: the unit of deployment

    On Vercel the unit is a project, and a project is usually one frontend app. In a monorepo you create one Vercel project per app, each pointing at its own root directory. That works well for several frontends.

    On Prongo the unit is the repository. A single prongo.yaml describes every service, how they depend on each other, and in what order they come up.

    Side by side

    You needVercelProngo
    A static site or one Next.js appExcellentWorks fine
    A backend with its own runtimeServerless functionsAny container, long-running
    A database next to your appVia integrations, billed separatelyOne more service in the yaml
    Background workers and queuesNot the core modelA service like any other
    Whole monorepo in one deployOne project per appThe repo is the unit
    Deploy order between servicesYou coordinate itResolved from depends_on

    Always check each vendor’s current docs, since both change quickly.

    Where Vercel is the better choice

    • You have a frontend-only or mostly-frontend project.
    • You rely on its edge network, image optimisation or preview comments on pull requests.
    • Your backend is small enough to live comfortably in serverless functions.
    • You want the deepest possible Next.js integration, since Vercel builds it.

    Where a monorepo platform fits better

    • Your API is a real server: WebSockets, long requests, a Go or PHP service, or something you already containerised.
    • You need a worker that runs continuously.
    • You want the database to be just another service defined next to the code, deploying in the right order.
    • You are tired of keeping three dashboards’ environment variables in sync. With one project you set a secret once and link services with {{ api.url }}.

    A realistic example

    A shop with a Next.js frontend, a Go API and Postgres. On Vercel the frontend is a natural fit, and the API and database live somewhere else, so you now have two platforms, two sets of secrets, and a hardcoded API address. On Prongo the whole thing is one file:

    project: shop
    
    services:
      database:
        image: postgres:16
        port: 5432
    
      api:
        build: ./apps/api
        port: 8080
        depends_on: [database]
    
      web:
        build: ./apps/web
        port: 3000
        depends_on: [api]
        env:
          API_URL: "{{ api.url }}"

    The honest summary

    Use Vercel for frontends. Consider a monorepo platform when the repository is a system rather than a site. You can also mix: some teams keep the marketing site on Vercel and put the services elsewhere. More comparisons, including Docker and Kubernetes, are on the compare page, and how to deploy a monorepo walks through the setup.

    Frequently asked questions

    Can Vercel deploy a monorepo?

    Yes. Vercel supports monorepos by creating one project per app, each pointing at a different root directory. Each project is configured and deployed on its own.

    Can Vercel host a long-running backend or database?

    Vercel is built around frontends and serverless functions that run per request. Long-running servers, background workers and databases are typically run elsewhere or through add-on integrations.

    Is Prongo a Vercel replacement?

    Not for every project. For a single Next.js site, Vercel is hard to beat. Prongo targets repos with several services, such as an API, a worker and a database, that need to deploy together.

    Which is cheaper for a full-stack monorepo?

    It depends on usage and current pricing, which both sides change. Compare the current plans for your actual traffic. Prongo is free during its beta.