Deploy Fullstack Vercel logo

Deploy Fullstack Vercel

OrganizationPopular
vellum-ai
deploy-fullstack-vercel

Build and deploy a full-stack app (React frontend + Python/FastAPI backend) or a Vellum app to Vercel as a serverless demo with seeded data

Overview

Publishervellum-ai
Repositoryvellum-assistant
Skill namedeploy-fullstack-vercel
Stars
1.3K
Forks
186
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by vellum-ai on GitHub. Read the source before you install it.

Installation

Install the Deploy Fullstack Vercel AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vellum-ai/vellum-assistant.git /tmp/vellum-assistant
mkdir -p .claude/skills
cp -r /tmp/vellum-assistant/skills/deploy-fullstack-vercel .claude/skills/deploy-fullstack-vercel
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deploy Fullstack Vercel in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Deploy Fullstack Vercel on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Deploy Fullstack Vercel is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Deploy Fullstack to Vercel

Deploy a full-stack app with a React/Vite frontend and Python/FastAPI backend to Vercel as a serverless demo, OR deploy a Vellum-built app from the library. No auth required - meant for demos, portfolio pieces, and quick showcases.

When to Use

  • User says "deploy this to Vercel", "host this", "publish this"
  • User has a project with a frontend + backend they want live
  • User wants to deploy a Vellum app that uses backend features (data store, custom routes)
  • User wants a quick demo deployment (no persistent database needed)

Authentication

Vellum App Publishing

For publishing Vellum apps from the library, use the built-in publish_page tool. This is the preferred path — it uses the stored Vercel API token (vercel/api_token) via the brokered publish flow without exposing the token to shell commands.

The stored Vercel API token is reserved for brokered publish_page and unpublish_page actions only. Do not pass it to bash, curl, Vercel CLI commands, or proxy credential injection. Do not use network_mode: "proxied" with credential_ids for Vercel deployments.

Custom Full-Stack Deployments

For custom projects that need Vercel deployment (not Vellum app publishing):

  1. Install the Vercel CLI with bun install -g vercel (not npm — npm is not available in the sandbox).
  2. Use vercel login to authenticate interactively (opens browser for the user).
  3. If the user does not want to use CLI auth, stop and ask them for an approved deployment path. Do not extract, inject, or shell with the stored API token.

Deploying a Vellum App

When the user asks to deploy a Vellum app from their library (from /workspace/data/apps/<app-name>/):

1. Detect Vellum Bridge Usage

Check the compiled app for Vellum bridge API usage:

bash
grep -l "window\.vellum\.\|vellum\.fetch\|vellum\.data\|vellum\.sendAction" /workspace/data/apps/<app-name>/dist/*.js /workspace/data/apps/<app-name>/dist/*.html 2>/dev/null

If found, the app depends on the Vellum bridge and needs a shim to work standalone.

2. Create Vellum Bridge Shim

The app uses window.vellum.* APIs that are normally injected by the Vellum viewer. For standalone deployment, create a vellum-shim.js file in the app's dist/ directory that provides browser-native replacements.

Before writing the shim, read the app's compiled JavaScript (dist/main.js or equivalent) to understand exactly which window.vellum.* APIs the app calls and what data shapes it expects. The shim must match the app's actual usage — don't guess at signatures.

Common APIs to shim (implement only what the app actually uses):

Bridge APIStandalone replacementNotes
vellum.data.query()localStorage-backed storeRead the app code to determine the record shape — some apps expect {id, data: {...}} wrappers, others use flat records
vellum.data.create(...)localStorage insert with crypto.randomUUID()Match the argument signature the app passes (some pass a payload, others pass {id, ...fields})
vellum.data.update(...)localStorage updateMatch the argument signature (typically (id, payload))
vellum.data.delete(...)localStorage deleteTypically (id)
vellum.fetch(path, opts)console.warn + return empty success ResponseCustom routes aren't available standalone
vellum.sendAction(id, data)No-op with console.warnSurface actions aren't available standalone
vellum.openLink(url)window.open(url, '_blank')
vellum.widgets.toast(msg)Create a temporary styled <div> that auto-dismisses
vellum.routenullDeep-link routes aren't available standalone

Structure: Wrap everything in an IIFE that guards against the real bridge: (function() { if (window.vellum) return; ... })();

3. Inject the Shim into index.html

Add a <script src="vellum-shim.js"></script> tag in dist/index.html BEFORE any <script type="module"> tags:

bash
sed -i 's|<script type="module"|<script src="vellum-shim.js"></script>\n<script type="module"|' dist/index.html

4. Deploy the App

bash
cd /workspace/data/apps/<app-name>/dist

Create a vercel.json in the dist directory:

json
{
  "rewrites": [
    {
      "source": "/((?!main\\.js|main\\.css|vellum-shim\\.js|assets/).*)",
      "destination": "/index.html"
    }
  ]
}

Then deploy using the publish_page tool (preferred). For Vellum apps, use the built-in app publish flow rather than raw Vercel API calls from shell.

Deploying a Custom Full-Stack Project

1. Build the Frontend

bash
cd <project>/frontend
bun install
bunx vite build

This produces static files in frontend/dist/.

2. Create the Vercel Deploy Directory

<project>/vercel-deploy/
├── api/
│   ├── index.py          ← FastAPI app wrapper (entry point)
│   ├── database.py        ← DB config (use /tmp for SQLite)
│   ├── models.py
│   ├── schemas.py
│   ├── seed_data.py       ← Must seed ALL required data (users, etc.)
│   ├── routers/
│   │   ├── __init__.py
│   │   └── *.py
│   └── requirements.txt   ← Python deps (fastapi, sqlalchemy, pydantic)
├── index.html             ← From frontend/dist/
├── assets/                ← From frontend/dist/assets/
└── vercel.json

Key steps:

bash
mkdir -p <project>/vercel-deploy/api

# Copy frontend build output to deploy root
cp -r <project>/frontend/dist/* <project>/vercel-deploy/

# Copy backend files into api/
cp <project>/backend/models.py <project>/vercel-deploy/api/
cp <project>/backend/database.py <project>/vercel-deploy/api/
cp <project>/backend/schemas.py <project>/vercel-deploy/api/
cp <project>/backend/seed_data.py <project>/vercel-deploy/api/
cp -r <project>/backend/routers <project>/vercel-deploy/api/
cp <project>/backend/requirements.txt <project>/vercel-deploy/api/

3. Create api/index.py (Serverless Entry Point)

python
import sys, os
sys.path.insert(0, os.path.dirname(__file__))

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from database import engine, Base, SessionLocal
from seed_data import seed_exercises, seed_default_user  # all seed functions
from routers import users, exercises, workouts, schedule, progress

# Create tables and seed on EVERY cold start
Base.metadata.create_all(bind=engine)
db = SessionLocal()
try:
    seed_exercises(db)
    seed_default_user(db)  # IMPORTANT: seed all required data
finally:
    db.close()

app = FastAPI(title="MyApp")

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(users.router)
# ... other routers

@app.get("/api/health")
def health_check():
    return {"status": "ok"}

4. Update database.py for Vercel

Critical: Vercel serverless functions can only write to /tmp. Update the SQLite path:

python
SQLALCHEMY_DATABASE_URL = "sqlite:////tmp/app.db"

5. Seed ALL Required Data

This is the #1 gotcha. Since /tmp is ephemeral, every cold start gets a fresh database. If your frontend assumes certain data exists (like user ID 1), you MUST seed it:

python
def seed_default_user(db: Session):
    count = db.query(UserProfile).count()
    if count > 0:
        return
    user = UserProfile(name="Demo User", ...)
    db.add(user)
    db.commit()

6. Create vercel.json

json
{
  "rewrites": [
    { "source": "/api/(.*)", "destination": "/api/index.py" },
    { "source": "/((?!assets/).*)", "destination": "/index.html" }
  ]
}

This routes:

  • /api/* → Python serverless function
  • Everything else → React SPA (index.html)

7. Deploy

bash
cd <project>/vercel-deploy
vercel --yes --prod

8. Verify

bash
curl -s <deployed-url>/api/health
# Should return: {"status":"ok"}

Gotchas & Limitations

IssueSolution
SQLite resets on cold startSeed ALL required data in index.py startup
No persistent storageAcceptable for demos. For production, use Vercel Postgres or Supabase
No authFine for demos/portfolios. Add auth layer for real apps
requirements.txt locationMust be inside api/ folder (next to index.py)
Module imports in routersUse sys.path.insert(0, os.path.dirname(__file__)) in index.py
CORSSet allow_origins=["*"] for demo deployments
--name flag deprecatedDon't use --name with Vercel CLI, just deploy from the directory
Vellum bridge APIsUse the vellum-shim.js to provide localStorage-backed data + no-op stubs
npm not availableUse bun install -g vercel to install Vercel CLI in sandbox

Vercel CLI Quick Reference

bash
bun install -g vercel        # Install
vercel login                 # Authenticate (opens browser for user-mediated auth)
vercel --yes --prod          # Deploy to production (skip prompts)
vercel logs --project <name> # Check function logs

Frequently asked questions

What does the Deploy Fullstack Vercel AI skill do?

Build and deploy a full-stack app (React frontend + Python/FastAPI backend) or a Vellum app to Vercel as a serverless demo with seeded data

Why use Deploy Fullstack Vercel on TypingMind?

Because you install it once and use it with any model. Deploy Fullstack Vercel is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Deploy Fullstack Vercel in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vellum-ai/vellum-assistant/tree/main/skills/deploy-fullstack-vercel. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Deploy Fullstack Vercel?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Deploy Fullstack Vercel?

As many as you like. As long as a model supports skills, you can use Deploy Fullstack Vercel with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Deploy Fullstack Vercel AI skill free?

Yes. It is published on GitHub by vellum-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇