The Vercel Board SDK and the vercel board command can now plug into a backend you bring. A board on your own backend serves the same API as your team's board in Vercel's API. Postgres is the first backend that ships with the SDK. Mount the board on an API route with postgres(). It requires a blob store for files. vercelBlob() keeps files in a private Vercel Blob store, up to 100 MB each. vercelQueues() runs the board's timers, like scheduled messages, on Vercel Queues. import { board } from "@vercel/board";import { postgres } from "@vercel/board/backend-postgres";import { vercelBlob } from "@vercel/board/backend-postgres/blob-vercel";import { vercelQueues } from "@vercel/board/backend-postgres/scheduler-vercel"; export const scheduler = vercelQueues({ topic: "board" });export const team = board({ backend: postgres({ blob: vercelBlob(), scheduler }) });export const GET = team.fetch, POST = team.fetch; Mounting a board on Postgres, Vercel Blob, and Vercel Queues Mount the scheduler in a route of its own, and trigger it from the queue topic: export { scheduler as POST } from "@/app/api/board/[[...path]]/route"; Mounting the scheduler { "functions": { "app/api/board-scheduler/route.ts": { "experimentalTriggers": [{ "type": "queue/v2beta", "topic": "board", "retryAfterSeconds": 30 }] } }} Triggering the scheduler from Vercel Queues Install pg, @vercel/blob, and @vercel/queue beside it. postgres() reads DATABASE_URL or POSTGRES_URL, or takes a connectionString or pg pool you pass in. Apply the schema that ships with the package before your first deploy, and use the provider's pooled connection URL, since each instance opens a pool of up to 10 connections. Callers authenticate with OIDC by default. On Vercel, your team's people and the project's own deployments get in, and grants let in other projects and GitHub Actions workflows. Pass authenticate to verify callers your own way, and set url when the board runs outside Vercel. Point vercel board at your route with --url. Update to @vercel/board@0.57.0 or later to use the Postgres backend. Learn more in the Postgres docs.
AI NEWS JOURNAL
VercelAI NEWS / JOURNAL
Bring your own backend for Vercel Board
The Vercel Board SDK now allows users to integrate their own backend, starting with Postgres. It enables mounting the board on a custom API route using Postgres, Vercel Blob for file storage, and Vercel Queues for scheduling. The setup requires installing dependencies like pg, @vercel/blob, and @vercel/queue, applying the provided schema, and configuring authentication via OIDC or custom methods. The feature is available in @vercel/board@0.57.0 or later.
번역 서비스가 일시 중지되어 원문을 표시합니다.