Skip to main content
Vercel hosts the Pindeck React/Vite SPA as a static site. It handles builds, CDN delivery, and SPA routing rewrites. Every build automatically verifies that your Convex URL points to production before proceeding.

Prerequisites

Deploy

1

Connect your GitHub repository to Vercel

In the Vercel dashboard, click Add New Project and import your Pindeck GitHub repository. Vercel will detect the vercel.json configuration automatically.
2

Configure the build settings

The vercel.json in the repository already sets the correct values. Verify these match in the Vercel project settings:
SettingValue
Build commandbun run build
Output directorydist
Install commandbun install
FrameworkVite
3

Add the VITE_CONVEX_URL environment variable

In your Vercel project, go to Settings → Environment Variables and add:
VariableValue
VITE_CONVEX_URLhttps://<your-deployment>.convex.cloud
VITE_CONVEX_URL must point to your production Convex deployment URL (ending in .convex.cloud). The build will fail if this variable is missing or points to a non-production URL — bun run check:prod-target runs before every build and exits with an error if the check does not pass.
4

Deploy

Trigger a deployment by pushing to your connected branch, or click Deploy in the Vercel dashboard. Vercel will run bun install, then bun run build (which includes the production target check), and publish the dist output.

SPA routing

The vercel.json includes a catch-all rewrite that serves index.html for all routes, which is required for client-side routing in a Vite SPA:
"rewrites": [
  {
    "source": "/(.*)",
    "destination": "/index.html"
  }
]
This is already committed to the repository — no additional configuration is needed.

Static asset caching

vercel.json also sets long-lived cache headers on hashed asset files under /assets/:
"headers": [
  {
    "source": "/assets/(.*)",
    "headers": [
      {
        "key": "Cache-Control",
        "value": "public, max-age=31536000, immutable"
      }
    ]
  }
]
Vite’s build output uses content-hashed filenames, so this is safe and maximizes CDN efficiency.

Production builds

Every Vercel build calls bun run build, which in turn runs bun run check:prod-target as its first step. If VITE_CONVEX_URL is not set to the production Convex URL, the build exits immediately with an error. This prevents accidentally deploying a frontend pointed at a wrong or missing backend.
Vercel only hosts the frontend SPA. The Discord bot is an always-on Node.js worker that must run separately on your own server or on a host like Hostinger. It is not deployed through Vercel and is not part of this repository’s deployment pipeline. See the Discord bot’s own repository for setup instructions.

Build docs developers (and LLMs) love