Skip to main content

Local Development

Set up the Pindeck development environment on your machine.

Prerequisites

  • Bun runtime
  • Access to the self-hosted Pindeck Convex deployment
  • Google or GitHub OAuth app credentials

Setup

1. Clone and install

git clone https://github.com/gordo-v1su4/pindeck.git
cd pindeck
bun install

2. Configure environment

cp .env.example .env.local
Set the self-hosted production Convex URLs in .env.local:
VITE_CONVEX_URL=https://convex.serving.cloud
VITE_CONVEX_SITE_URL=https://convex-site.serving.cloud

3. Build and serve

bun run build
bun run serve
The app runs on port 4173. The serve script auto-kills any existing process on that port.
Do not use convex dev when targeting production. The build scripts enforce the production Convex target and fail fast otherwise.

Environment variables

Frontend (.env.local)

VariableRequiredDescription
VITE_CONVEX_URLYesSelf-hosted Convex client URL (https://convex.serving.cloud)
VITE_CONVEX_SITE_URLYesSelf-hosted Convex HTTP/actions URL (https://convex-site.serving.cloud)
CONVEX_SELF_HOSTED_URLDeploy onlySelf-hosted Convex deploy target (https://convex.serving.cloud)
CONVEX_SELF_HOSTED_ADMIN_KEYDeploy onlyAdmin key required by bun run deploy:convex

Convex Dashboard (backend)

Set these in the Convex Project Settings:
VariableDescription
JWT_PRIVATE_KEYRSA private key for auth tokens
OPENROUTER_API_KEYOpenRouter API key for VLM analysis
OPENROUTER_VLM_MODELOptional model override
FAL_KEYfal.ai API key for image generation
INGEST_API_KEYAPI key for Discord ingest endpoint
MEDIA_GATEWAY_URLRustFS media API URL (https://media.v1su4.dev)
MEDIA_GATEWAY_TOKENBearer token for RustFS media API writes
MEDIA_GATEWAY_BUCKETRustFS bucket (pindeck)
MEDIA_GATEWAY_UPLOAD_PREFIXObject key prefix (media-uploads)
AUTH_GOOGLE_ID / AUTH_GOOGLE_SECRETGoogle OAuth credentials
AUTH_GITHUB_ID / AUTH_GITHUB_SECRETGitHub OAuth credentials
SITE_URLPublic app URL for OAuth callbacks

Useful scripts

CommandDescription
bun run buildLocal production frontend build; on Vercel, deploys Convex first and then runs the frontend build.
bun run servePreview production build on port 4173
bun run deploy:convexDeploy Convex functions
bun run check:prod-targetVerify env points to production Convex

Production deployments

  • Convex: self-hosted at https://convex.serving.cloud
  • Frontend: Vercel project pindeck, published at https://pindeck.dev
  • Discord bot: Hosted separately — see Discord bot guide
Do not set CONVEX_DEPLOYMENT. The old Convex Cloud project has been deleted; the Pindeck production backend is self-hosted at https://convex.serving.cloud.
Ignore stale duplicate Vercel project/status contexts. Current production deploys and health checks should use only the pindeck project and https://pindeck.dev.