From atum-workflows
Vercel deployment pattern library — deploy Next.js / Remix / Nuxt / Astro / SvelteKit / Vite apps to Vercel's edge network. Covers vercel.json config, environment variables (Development / Preview / Production scopes), custom domains and SSL, ISR and on-demand revalidation, edge functions vs serverless functions, image optimization, analytics and speed insights, cron jobs, storage integrations (KV, Postgres, Blob, Edge Config), monorepo deployment with turborepo or pnpm workspaces, and rollback strategies. Use when deploying a web app to Vercel for the first time, configuring environments, setting up custom domains, optimizing functions, debugging build failures, or setting up CI/CD with Git-based deploys. Differentiates from platform-agnostic deployment skills by focusing on Vercel-specific features (ISR, Edge Config, Speed Insights, Vercel KV). Complements deploy-railway, deploy-fly, deploy-cloudflare for multi-platform agencies.
npx claudepluginhub arnwaldn/atum-plugins-collection --plugin atum-workflowsThis skill uses the workspace's default tool permissions.
Vercel est la plateforme par défaut pour Next.js (maintenue par Vercel) et une excellente option pour Remix / Nuxt / Astro / SvelteKit / Vite.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Vercel est la plateforme par défaut pour Next.js (maintenue par Vercel) et une excellente option pour Remix / Nuxt / Astro / SvelteKit / Vite.
# Install CLI
npm install -g vercel
# Login
vercel login
# Link un projet local
cd my-project
vercel link
# Deploy preview
vercel
# Deploy production
vercel --prod
vercel.json — config type{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "pnpm build",
"installCommand": "pnpm install",
"framework": "nextjs",
"regions": ["cdg1"],
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Frame-Options", "value": "SAMEORIGIN" },
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "Strict-Transport-Security", "value": "max-age=63072000; includeSubDomains; preload" }
]
}
],
"redirects": [
{ "source": "/old-blog/:slug", "destination": "/blog/:slug", "permanent": true }
],
"crons": [
{ "path": "/api/cron/daily-digest", "schedule": "0 9 * * *" }
]
}
| Scope | Usage |
|---|---|
| Development | vercel dev localement (via vercel env pull) |
| Preview | Déploiements PR et branches non-main |
| Production | Déploiement sur la branche main + domaine personnalisé |
# Ajouter une var
vercel env add DATABASE_URL production
# Puis coller la valeur
# Pull les vars locales
vercel env pull .env.local
Règle critique : préfixer avec NEXT_PUBLIC_ les vars accessibles côté client. Les autres restent server-only.
// app/blog/[slug]/page.tsx (Next.js App Router)
export const revalidate = 3600 // revalidate every hour
// Ou on-demand
// app/api/revalidate/route.ts
import { revalidatePath, revalidateTag } from 'next/cache'
export async function POST(request: Request) {
const { secret, path } = await request.json()
if (secret !== process.env.REVALIDATION_SECRET) {
return new Response('Unauthorized', { status: 401 })
}
revalidatePath(path)
return new Response(JSON.stringify({ revalidated: true }))
}
Déclencher depuis un webhook CMS (Sanity, Strapi, Payload) pour invalider le cache à la publication.
// Edge Function (V8 isolate, global)
export const runtime = 'edge'
export async function GET() {
return new Response('Hello from edge')
}
// Serverless Function (Node.js, par région)
// Pas de runtime = défaut 'nodejs'
export async function GET() {
return Response.json({ data: await fetchFromDb() })
}
Quand utiliser edge : auth, geolocation, A/B testing, redirects, simple JSON (< 4 MB response, < 30s timeout). Quand utiliser serverless : accès DB via driver, lourd compute, libraries Node-only (fs, crypto natif).
import Image from 'next/image'
<Image
src="/hero.jpg"
alt="Hero"
width={1920}
height={1080}
priority // si au-dessus du fold
sizes="(min-width: 1024px) 100vw, 100vw"
/>
Vercel optimise automatiquement en WebP/AVIF, crée les srcset, cache au edge. Gratuit jusqu'à 5000 images uniques / mois sur le plan Hobby.
npm install @vercel/analytics @vercel/speed-insights
import { Analytics } from '@vercel/analytics/react'
import { SpeedInsights } from '@vercel/speed-insights/next'
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<Analytics />
<SpeedInsights />
</body>
</html>
)
}
Gratuit avec quota pour les projets Hobby.
| Produit | Usage |
|---|---|
| Vercel KV (Redis) | Sessions, rate limiting, caches simples |
| Vercel Postgres | DB relationnelle managée (via Neon) |
| Vercel Blob | Upload de fichiers (images, PDFs, vidéos) |
| Edge Config | Feature flags, redirects, config ultra-rapide (read-only en edge) |
// Vercel Blob example
import { put } from '@vercel/blob'
const blob = await put('invoices/inv-123.pdf', pdfBuffer, {
access: 'public',
contentType: 'application/pdf',
})
console.log(blob.url) // https://xyz.public.blob.vercel-storage.com/invoices/inv-123.pdf
// vercel.json à la racine
{
"buildCommand": "turbo build --filter=@app/web",
"installCommand": "pnpm install",
"ignoreCommand": "npx turbo-ignore @app/web"
}
Puis créer un projet Vercel par app du monorepo et lier chacun au même repo avec un Root Directory différent.
# Via CLI
vercel domains add example.com
# Assigner à un project
vercel alias set <deployment-url> example.com
Configurer le DNS chez le registrar :
A record → 76.76.21.21CNAME → cname.vercel-dns.comVercel provisionne SSL automatiquement via Let's Encrypt.
# Lister les derniers deployments
vercel list
# Promouvoir un deployment ancien en production
vercel promote <deployment-url>
Ou via l'UI : Project → Deployments → ... → Promote to Production.
vercel.json → utiliser uniquement vercel env addcdg1 ou fra1 pour EUframework dans vercel.json pour un projet custom → Vercel ne détecte pas les bonnes settingsrevalidate = 0 en production sur une page à fort trafic → rebuild à chaque requête, coût explosifdeploy-railway (dans ce plugin)deploy-fly (dans ce plugin)deploy-cloudflare (dans ce plugin)deploy-eas, deploy-app-store, deploy-play-store