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

This example shows a monorepo using Vercel Services with a Next.js frontend and a private FastAPI backend.
https://nextjs-fastapi-services-bindings.vercel.app/
The project is structured as a monorepo:
nextjs-fastapi-bindings/├── backend/├── frontend/└── vercel.jsonServices 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.
vercel devOpen http://localhost:3000 and try:
/api/hello (Next.js API route)/svc/api/status (FastAPI via Next.js API route)