This repo is configured to deploy a Vite static site and a Python FastAPI API on Vercel.
- Frontend:
web/built by Vite toweb/dist - API: FastAPI app in
app/server.py, exported viaapi/index.py
- Push this repo to GitHub/GitLab/Bitbucket.
- Import the repo in Vercel and accept defaults. Vercel will detect
vercel.json.
Set these in Vercel Project Settings → Environment Variables:
VERCEL_URL: Provided by Vercel automatically. Used for CORS allowlist.
If your agents require credentials (e.g., Google), add them too.
- Build command:
npm ci --include=dev && npm run build - Output directory:
web/dist - API routes:
/api/*→ Python serverless handlerapi/index.py
npm install
npm run dev # Vite at 5173, proxies /api to localhost:8000
uvicorn app.server:app --reload --port 8000- Serverless writes go to
/tmp(ephemeral). We writedeploy_output.mdthere. - CORS allowlist includes localhost and your
https://<project>.vercel.appdomain.