Skip to content
VercelLogotypeVercelLogotype
LoginSign Up

Next.js + FastAPI + Bindings Starter

A monorepo with a Next.js frontend and a private FastAPI backend.

DeployView Demo

Next.js + FastAPI + Bindings

This example shows a monorepo using Vercel Services with a Next.js frontend and a private FastAPI backend.

Demo

https://nextjs-fastapi-services-bindings.vercel.app/

How it works

The project is structured as a monorepo:

nextjs-fastapi-bindings/
├── backend/
├── frontend/
└── vercel.json

Services are configured in vercel.json:

{
"services": {
"frontend": {
"root": "frontend/",
"framework": "nextjs",
"bindings": [
{
"type": "service",
"service": "backend",
"format": "url",
"env": "BACKEND_URL"
}
]
},
"backend": { "root": "backend/", "entrypoint": "main:app" }
},
"rewrites": [
{
"source": "/(.*)",
"destination": { "service": "frontend" }
}
]
}

Vercel will route all requests to the frontend. Next.js API routes will be able to access the backend at BACKEND_URL.

Running Locally

vercel dev

Open http://localhost:3000 and try:

  • /api/hello (Next.js API route)
  • /svc/api/status (FastAPI via Next.js API route)

Learn More

  • Vercel Services - learn how services work on Vercel.
  • Next.js Documentation - learn about Next.js features and API.
  • FastAPI Documentation - learn about FastAPI features and API.
GitHub
Ownervercel
Repositoryexamples
Use Cases
Starter
Monorepos
Stack
Next.js
FastAPI

Related Templates

eve Sanity Copilot

A Slack-based Sanity copilot built on eve. It queries and edits content with GROQ, shapes schemas, manages releases, and drafts into Notion.
eve Sanity Copilot thumbnail

eve Chat Template

A persisted Next.js chat template for eve, built with shadcn/ui, Tailwind CSS, Streamdown, Better Auth, Drizzle, and Neon.
eve Chat Template thumbnail

Next.js Boilerplate

Get started with Next.js and React in seconds.
Next.js Boilerplate thumbnail

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • ConnectNew
  • PassportNew
  • eveNew

Core Platform

  • CI/CD
  • Content Delivery
  • Fluid Compute
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • Bot ID

Tools

  • Vercel DropNew
  • Vercel Agent
  • Vercel PluginNew
  • Agent Skills
  • Next.js
  • Domains
  • v0

Frameworks

  • eveNew
  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • xmcp
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDKNew
  • Queues SDKNew
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal (all documents)
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram
  • VercelVercel
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Passport
  • eve
Core Platform
  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains↗
  • v0↗
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community↗
EnterprisePricing
Contact
Log InSign Up
Dashboard

Products

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • Passport
  • eve

Core Platform

  • Security
  • Content Delivery
  • Fluid Compute
  • Observability
  • CI/CD

Tools

  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Domains↗
  • v0↗
Resources

Learn

  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce

Explore

  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community↗
Enterprise
Pricing
Sign UpLog In
Contact
DeployView Demo

Loading status…

Select a display theme: