VE

vercel-architecture-variants

Selects and applies validated Vercel architecture blueprints based on project scale and traffic needs.

Install

mkdir -p .claude/skills/vercel-architecture-variants && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8773" && unzip -o skill.zip -d .claude/skills/vercel-architecture-variants && rm skill.zip

Installs to .claude/skills/vercel-architecture-variants

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Choose and implement Vercel architecture blueprints for different scales
72 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Implement static site blueprints for CDN-served content
  • Structure full-stack Next.js projects with serverless APIs
  • Configure API-only backends with CORS support
  • Manage monorepo deployments using Turborepo
  • Scale enterprise applications with multi-zone micro-frontends

How it works

It provides five distinct architectural blueprints ranging from static JAMstack sites to multi-zone micro-frontends, each optimized for specific team sizes and traffic patterns.

Inputs & outputs

You give it
Project scale and team size requirements
You get back
Validated Vercel architecture blueprint and configuration

When to use vercel-architecture-variants

  • Select an architecture for a new marketing site or web app
  • Structure a multi-project Vercel deployment
  • Decide between monolith and microservice patterns
  • Plan a migration path for an existing codebase

About this skill

Vercel Architecture Variants

Overview

Choose the right Vercel architecture based on team size, traffic patterns, and technical requirements. Covers five validated blueprints from static site to multi-project enterprise deployment, with migration paths between them.

Prerequisites

  • Understanding of team size and traffic requirements
  • Knowledge of Vercel deployment model (edge, serverless, static)
  • Clear SLA requirements

Instructions

Variant 1: Static Site (JAMstack)

Best for: Marketing sites, docs, blogs, landing pages Team size: 1-3 developers Traffic: Any (fully CDN-served)

project/
├── public/           # Static assets
├── src/
│   ├── pages/        # Static pages (SSG)
│   └── components/   # React components
├── vercel.json       # Headers, redirects
└── package.json
// vercel.json
{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "Cache-Control", "value": "public, max-age=3600, stale-while-revalidate=86400" }
      ]
    }
  ]
}

Key decisions:

  • No serverless functions needed
  • All pages pre-rendered at build time
  • ISR for pages that update periodically
  • Cost: minimal (mostly bandwidth)

Variant 2: Full-Stack Next.js (Most Common)

Best for: SaaS applications, dashboards, e-commerce Team size: 2-10 developers Traffic: Low to high

project/
├── src/
│   ├── app/
│   │   ├── api/           # Serverless API routes
│   │   ├── (marketing)/   # Static public pages
│   │   └── dashboard/     # Dynamic authenticated pages
│   ├── lib/               # Shared utilities
│   ├── components/        # UI components
│   └── middleware.ts      # Edge auth + routing
├── prisma/                # Database schema
├── vercel.json
└── package.json
// vercel.json
{
  "regions": ["iad1"],
  "functions": {
    "src/app/api/**/*.ts": {
      "maxDuration": 30,
      "memory": 1024
    }
  }
}

Key decisions:

  • Mixed rendering: SSG for marketing, SSR for dashboard
  • API routes in app/api/ for backend logic
  • Edge Middleware for auth (runs before every request)
  • Database in same region as functions

Variant 3: API-Only Backend

Best for: Mobile app backends, microservices, webhook processors Team size: 1-5 developers Traffic: API-driven

project/
├── api/                   # Serverless functions (one per route)
│   ├── users/
│   │   ├── index.ts       # GET/POST /api/users
│   │   └── [id].ts        # GET/PUT/DELETE /api/users/:id
│   ├── webhooks/
│   │   └── stripe.ts      # POST /api/webhooks/stripe
│   └── health.ts          # GET /api/health
├── lib/                   # Shared utilities
├── vercel.json
└── package.json
// vercel.json
{
  "regions": ["iad1", "cdg1"],
  "rewrites": [
    { "source": "/v1/(.*)", "destination": "/api/$1" }
  ],
  "headers": [
    {
      "source": "/api/(.*)",
      "headers": [
        { "key": "Access-Control-Allow-Origin", "value": "https://myapp.com" },
        { "key": "Access-Control-Allow-Methods", "value": "GET,POST,PUT,DELETE" }
      ]
    }
  ]
}

Key decisions:

  • No frontend — pure API
  • CORS headers for cross-origin access
  • Version routing via rewrites (/v1/*/api/*)
  • Multi-region for global API latency

Variant 4: Monorepo with Turborepo

Best for: Multiple related apps, shared component libraries Team size: 5-20 developers Traffic: Varies per app

monorepo/
├── apps/
│   ├── web/               # Main website (Vercel project 1)
│   │   ├── src/
│   │   ├── vercel.json
│   │   └── package.json
│   ├── docs/              # Documentation site (Vercel project 2)
│   │   ├── src/
│   │   ├── vercel.json
│   │   └── package.json
│   └── admin/             # Admin dashboard (Vercel project 3)
│       ├── src/
│       ├── vercel.json
│       └── package.json
├── packages/
│   ├── ui/                # Shared component library
│   ├── config/            # Shared ESLint, TS config
│   └── utils/             # Shared utilities
├── turbo.json
├── pnpm-workspace.yaml
└── package.json

Vercel auto-detects monorepos and builds only the affected app:

// apps/web/vercel.json
{
  "ignoreCommand": "npx turbo-ignore"
}

Each app in apps/ is a separate Vercel project with its own domain, env vars, and deployment settings.

Variant 5: Multi-Zone Micro-Frontends (Enterprise)

Best for: Large organizations with independent teams Team size: 20+ developers across multiple teams Traffic: High

Each zone is an independent Vercel project:

Zone 1: marketing.company.com → Marketing team's Next.js app
Zone 2: app.company.com → Product team's Next.js app
Zone 3: docs.company.com → Docs team's Next.js app
Zone 4: api.company.com → Platform team's API-only project

Main project uses multi-zones (next.config.js):
// Main app: next.config.js
module.exports = {
  async rewrites() {
    return [
      {
        source: '/docs/:path*',
        destination: 'https://docs.company.com/docs/:path*',
      },
      {
        source: '/blog/:path*',
        destination: 'https://marketing.company.com/blog/:path*',
      },
    ];
  },
};

Key decisions:

  • Independent deploy cycles per team
  • Shared auth via Edge Middleware or external IdP
  • Consistent design system via shared npm packages
  • Each zone has its own env vars and scaling

Architecture Decision Matrix

FactorStaticFull-StackAPI-OnlyMonorepoMulti-Zone
Team size1-32-101-55-2020+
Deploy independenceN/ASingleSinglePer-appPer-team
FrontendYesYesNoYesYes
DatabaseNoYesYesPer-appPer-zone
ComplexityLowMediumLowMediumHigh
CostLowMediumLowMediumHigh

Migration Path

Static Site → Full-Stack Next.js → Monorepo → Multi-Zone
     ↑              ↑                  ↑           ↑
   Start here    Add API routes    Add shared    Split teams
                 Add auth          packages      Independent
                 Add database                    deployments

Output

  • Architecture variant selected based on team size and requirements
  • Project structure implemented following the chosen blueprint
  • Vercel configuration optimized for the architecture
  • Migration path documented for future scaling

Error Handling

ErrorCauseSolution
Monorepo builds all appsMissing ignoreCommandAdd npx turbo-ignore
Multi-zone routing conflictOverlapping pathsEnsure rewrites don't conflict
Shared package not foundpnpm workspace misconfiguredCheck pnpm-workspace.yaml includes
API-only 404 on rootNo public/index.htmlAdd a minimal index or redirect

Resources

Next Steps

For known pitfalls and anti-patterns, see vercel-known-pitfalls.

When not to use it

  • Single-project deployments when independent team scaling is required
  • Static site patterns for highly dynamic authenticated dashboards

Prerequisites

Understanding of team size and traffic requirementsKnowledge of Vercel deployment modelClear SLA requirements

Limitations

  • Multi-zone routing conflicts can occur with overlapping paths
  • Monorepo builds require specific ignore commands to prevent full rebuilds

How it compares

It offers a structured decision matrix for selecting deployment patterns rather than applying a one-size-fits-all approach to project layout.

Compared to similar skills

vercel-architecture-variants side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
vercel-architecture-variants (this skill)027dNo flagsIntermediate
react-component-patterns31moNo flagsIntermediate
ai-code02moNo flagsAdvanced
code-explorer01moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

Search skills

Search the agent skills registry