Setup Product

Provisions a complete product from the seed template. This is the factory skill.

Overview

Fork seed repo
  → Create Neon project (staging as default branch)
  → Create Vercel project + link
  → Wire env vars (DATABASE_URL, auth, Stripe)
  → Add custom domain (Porkbun DNS + Vercel)
  → Wire blob store for CLI releases
  → First deploy

Scripts

1. Neon Database

./scripts/setup-neon-project.sh "product-name"

Creates a Neon project with the correct branch naming:

  • Renames default branch to staging (so preview branches fork from staging)
  • Creates a main branch (for production)
  • Outputs connection strings for both

CRITICAL: Save the connection URIs — passwords are shown only once.

2. Domain

./scripts/setup-domain.sh product.unionstreet.ai

For *.unionstreet.ai subdomains, the wildcard CNAME already exists — only the Vercel domain add is needed. For other domains, it creates a CNAME via Porkbun API first.

3. Blob Store

./scripts/setup-blob-store.sh

Wires Vercel Blob for CLI binary hosting. Reuses the shared org blob store — each product is namespaced by project_name in .goreleaser.yml.

Full Provisioning Checklist

Step 1: Fork and customize

  • Fork/clone the seed repo
  • Update lib/brand.ts — product name, CLI name, logo glyph, tagline
  • Update landing page copy in app/page.tsx — rewrite feature descriptions, "how it works" steps, and "built for agents" callout to match the new product
  • Update .goreleaser.ymlproject_name field
  • Update openapi/v1.yaml — title, description
  • Update sdks/typescript/package.json — package name
  • Update sdks/typescript/src/index.ts — default baseUrl
  • Commit customizations

Step 2: Neon database

  • Run ./scripts/setup-neon-project.sh "product-name"
  • Save both connection strings (staging + main)
  • Note the project ID for CLAUDE.md

Step 3: Vercel project

  • vercel link (or create new project in dashboard)
  • Enable Neon-Vercel integration
  • DISABLE Production in Neon integration settings
  • Set Production DATABASE_URL manually (main branch pooled connection)
  • Set Production DATABASE_URL_UNPOOLED manually (main branch direct connection)

Step 3b: Stripe webhooks

  • Run ./scripts/setup-stripe-webhooks.sh product.unionstreet.ai
  • Script creates live + test webhook endpoints and stores secrets in Vercel
  • Verify: check Stripe Dashboard → Developers → Webhooks for both endpoints

Step 4: Environment variables

Set in Vercel for all environments:

  • BETTER_AUTH_SECRET — generate with openssl rand -hex 16 (unique per env)
  • NEXT_PUBLIC_APP_URL — canonical domain (e.g. https://product.unionstreet.ai)
  • STRIPE_SECRET_KEY / STRIPE_PUBLISHABLE_KEY
  • STRIPE_WEBHOOK_SECRET — create webhook at https://product.unionstreet.ai/api/stripe/webhook
  • STRIPE_PRICE_ID / STRIPE_METERED_PRICE_ID
  • CDP_PAYMENT_WALLET / NEXT_PUBLIC_PAYMENT_WALLET
  • NEXT_PUBLIC_CHAINbase-sepolia for testnet

Step 5: Domain

  • Run ./scripts/setup-domain.sh product.unionstreet.ai
  • Wait for DNS propagation (1-5 minutes)
  • Verify: curl -sSf https://product.unionstreet.ai

Step 6: Blob store (for CLI)

  • Run ./scripts/setup-blob-store.sh
  • Or reuse existing blob store — just set BLOB_BASE_URL on Vercel

Step 7: First deploy

  • git push to trigger Vercel deployment
  • Verify auth flow works
  • Verify billing flow works
  • First CLI release: git tag v0.1.0 && git push origin v0.1.0
  • First SDK release: ./scripts/release-sdk.sh 0.1.0

Step 8: Documentation sidecar repo

  • Create unionstreetai/[product] public repo for user-facing docs
  • Add user-facing SKILL.md files describing how to use the product (not build it)
  • Add README.md as docs homepage content
  • Update lib/docs.ts to read from the sidecar repo content (or copy at build time)
  • Verify /docs renders from sidecar content, not .claude/skills/

Step 9: Update docs

  • Update CLAUDE.md — Neon project ID, endpoint IDs
  • Update ENVIRONMENT.md — product-specific values
  • Update SECRETS.md — if any new secrets

Org Secrets (Inherited)

These are already set at the GitHub org level and available to all repos:

SecretPurpose
BLOB_READ_WRITE_TOKENCLI binary uploads
PORKBUN_API_KEYDNS automation
PORKBUN_SECRET_KEYDNS automation
NEON_API_KEYDatabase provisioning
VERCEL_TOKENVercel API automation
NPM_TOKENSDK publishing to npm

Naming Conventions

  • Neon project: match the product name (e.g. unioncms, seed)
  • Vercel project: unst-<product> (e.g. unst-seed, unst-cms)
  • Domain: <product>.unionstreet.ai or <product>.unst.sh
  • CLI binary: set via project_name in .goreleaser.yml

If You're Lost