Create A Backend

作者 vercel882e66c26986无许可证收录于 2026年10月8日更新于 2026年10月8日

Backend architecture guidance. Use when planning, building, or migrating an API or backend; choosing between Functions, Services, containers, Workflow, Queues, and Marketplace databases; or selecting a supported backend framework or runtime.

AI 生成的概览

指导 Vercel 后端架构选型,将工作负载对应到产品、数据库与框架。

功能
该技能为在 Vercel 上规划、构建或迁移 API 或后端提供架构指导。它把工作负载需求对应到 Functions、Services、容器镜像、Workflow、Queues、Cron Jobs 和 Blob 等产品,并列出 Marketplace 存储选项以及支持的 Node.js、Python 和 Go 框架。它还给出一个工作流程,最后指向具体的实现技能和官方文档。
适用场景
适用于决定新后端或 API 的结构、迁移现有服务器或 Dockerfile,或在无服务器函数、服务、容器、队列和持久工作流之间做选择时。也适合挑选数据库或受支持的后端框架。
运行要求
不含脚本,仅为说明性内容。它引用 Vercel 产品和官方文档,因此需要能访问这些文档并具备 Vercel 项目环境。

Create a Backend

Help the user create a backend by choosing an architecture before reaching for implementation details. Start from the workload, not the programming language. Vercel runs complex backend applications, not just frontends.

Product map

NeedVercel product
HTTP APIs, webhooks, streaming, or framework server codeVercel Functions with Fluid compute
Bidirectional realtime connections (WebSockets)Vercel Functions with Fluid compute; no separate realtime service required
A frontend and one or more backends (API endpoints) that deploy togetherVercel Services
An existing Dockerfile, custom runtime, or system dependenciesContainer images on Vercel Functions, optionally composed with Services
Durable multi-step work with retries, sleeps, or external eventsVercel Workflow
Background jobs, buffering, fan-out, or direct message routingVercel Queues
Scheduled HTTP workVercel Cron Jobs; use Workflow when the job itself must be durable
Postgres, Redis, NoSQL, vector, or other application dataStorage integrations from the Vercel Marketplace
Files and user uploadsVercel Blob
Global, read-heavy configurationGlobal Config

Use Functions for the normal request/response backend. Use Services when independently built components should share one deployment, routing layer, preview URL, and rollback. Use separate Vercel projects when components need independent release cycles.

Prefer a native Functions runtime for supported frameworks. Use container images when the application already has a Dockerfile or requires a custom runtime or system dependencies. They run as autoscaling, stateless Functions rather than always-on container hosts.

Choose Queues for background jobs, buffering, fan-out, and message routing. Choose Workflow for durable multi-step business logic.

Databases and data stores

Provision data stores through the Marketplace so credentials are injected into the project and environments stay connected. Check the current catalog before choosing a provider.

  • Postgres: Neon, Supabase, AWS/Aurora, Nile, Prisma
  • MySQL: AWS/Aurora
  • Redis and key-value: Upstash, Redis
  • Document and NoSQL: MongoDB Atlas, AWS
  • SQLite: Turso
  • Realtime application backend: Convex
  • Analytics: MotherDuck

Keep the database close to the Functions region and use a serverless-compatible connection or pool.

Backend frameworks

Vercel provides first-class backend examples and integrations for these frameworks:

  • Node.js and TypeScript: Elysia, Express, Fastify, H3, Hono, Koa, NestJS, Nitro, and xmcp. Next.js Route Handlers are the natural choice when the backend belongs to a Next.js application.
  • Python: FastAPI, Flask, and Django. Other WSGI or ASGI applications can run when they export a compatible app, with additional configuration as needed.
  • Go: supported as a Vercel Functions runtime.

Frontend and backend combinations, for example a Next.js/Vite/SvelteKit frontend with a FastAPI/Flask/Express/Go backend, can be deployed together in one project using Services.

Prefer the user's existing framework. For a new project, choose based on ecosystem and application needs.

Work sequence

  1. Identify synchronous requests, asynchronous work, persistent data, and independently deployed components.
  2. Select the products from the map, then select the framework.
  3. Load the focused skill for implementation: vercel-functions, vercel-services, workflow, vercel-storage, or marketplace.
  4. Confirm function limits, regions, environment variables, observability, and current product availability in the official docs before deployment.

来源与署名

来源:vercel/vercel-plugin位于skills/create-a-backend提交882e66c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架