Project knowledge for configuring Vercel Services in this Next.js and FastAPI starter. Use when editing vercel.json, adding services, debugging frontend-to-backend routing, or explaining Vercel Services local development and deployment.
npx skills add https://github.com/vercel-labs/nextjs-fastapi-chat-app-starter --skill vercel-services
This starter deploys a Next.js frontend and FastAPI backend as one Vercel project using Services. Keep the repo as a single deployable unit with shared environment variables, one deployment URL, and path-based routing.
frontend/, Next.js, mounted at /.backend/main.py, FastAPI, mounted at /api.fetch("/api/chat"); do not hard-code localhost or a separate backend domain.@app.post("/chat") is reachable at /api/chat because Vercel adds the service prefix.Define services in the root vercel.json with experimentalServices and mount:
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"experimentalServices": {
"frontend": {
"entrypoint": "frontend",
"framework": "nextjs",
"mount": "/"
},
"backend": {
"entrypoint": "backend/main.py",
"framework": "fastapi",
"mount": "/api"
}
}
}
When creating or repairing Services config, use mount and update all service entries consistently.
frontend, backend) unless the repo structure changes.framework when the framework should not rely on auto-detection (nextjs, fastapi, express, etc.).memory, maxDuration, includeFiles, and excludeFiles only for service-specific needs./api to FastAPI; Services routing should own that path prefix.experimentalServices.Run all services together from the repo root:
vercel dev -L
Use -L / --local so local development does not require authenticating to Vercel Cloud. In Devbox/Sandbox preview flows, follow the devbox-preview skill for the correct bind address and published port.
/api/chat 404s, confirm the backend service prefix is /api and the FastAPI route is /chat, not /api/chat.vercel dev, not a standalone Next.js dev server.experimentalServices exists in root vercel.json.Take vercel-labs/vercel-services from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.