Skip to content
New Project

Vite + FastAPI Starter

A monorepo with a Vite frontend and a public FastAPI backend.

DeployView Demo

Vite + FastAPI

This example shows a monorepo using Vercel Services with a Vite frontend and a public FastAPI backend.

Demo

https://vite-fastapi-services.vercel.app/

How it works

The project is structured as a monorepo:

vite-fastapi/
├── backend/
├── frontend/
└── vercel.json

Services are configured in vercel.json:

{
"services": {
"frontend": { "root": "frontend/", "framework": "nextjs" },
"backend": { "root": "backend/", "entrypoint": "main:app" }
},
"rewrites": [
{
"source": "/svc/api/:path*",
"destination": { "service": "backend" }
},
{
"source": "/(.*)",
"destination": { "service": "frontend" }
}
]
}

Vercel will route requests to the backend service for URL with paths starting with /svc/api/ and to frontend for all other URLs.

Running Locally

vercel dev

Open http://localhost:3000 and try:

  • /svc/api/status (FastAPI route)

Learn More

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

Related Templates

eve Software Factory

Software factory built on eve: AI agents work each stage of the development loop, and people make the judgment calls.
eve Software Factory thumbnail

eve Sanity Copilot

Give your team a Sanity copilot in Slack. It runs GROQ, edits schemas, manages releases, and asks before it touches production.
eve Sanity Copilot thumbnail

eve Personal Agent

Fork your own personal agent. One identity across web, Slack, and iMessage, with memory you can import, edit, and approve.
eve Personal Agent thumbnail
DeployView Demo