Deploy bos.multiverbe.com · Setup Step-by-step

Phase H light · 2026-05-11 · Sessione 3 BOS Refactor. Status: file di config creati, deploy effettivo richiede azioni founder (non automatizzabili: account access + DNS + secrets). Tempo founder stimato: ~30 minuti.


✅ File di config già creati (da Claude in questa sessione)

File Scopo
vercel.json Build command + output dir + security headers + cache policy + rewrites root → bos.html
.github/workflows/bos-build-deploy.yml CI/CD GitHub Actions: on push paths source/** → npm verify + build + deploy Vercel

🛠️ Azioni founder · 30 minuti

Step 1 · Vercel project (5 min)

  1. Vai su https://vercel.com/new
  2. Import Git Repository → seleziona Multiverbe-Business (devi prima pushare il repo su GitHub)
  3. Configure Project:
    • Framework Preset: Other
    • Root Directory: ./ (default)
    • Build Command: npm run build (auto-rilevato da package.json)
    • Output Directory: build
    • Install Command: npm install
  4. Project Name: multiverbe-bos (o bos-multiverbe)
  5. Deploy → primo build genera URL multiverbe-bos.vercel.app

Step 2 · Custom domain bos.multiverbe.com (10 min)

  1. Vercel → Project multiverbe-bosSettingsDomains
  2. Add domain: bos.multiverbe.com
  3. Vercel ti mostra il record DNS da aggiungere. Sarà tipo:
    • Type: CNAME
    • Name: bos
    • Value: cname.vercel-dns.com
  4. Vai su Register.it dashboard multiverbe.com DNS
  5. Aggiungi record CNAME come sopra
  6. Torna su Vercel → conferma SSL Let's Encrypt provisioning (5-15 min)
  7. Apri https://bos.multiverbe.com → vedi il BOS live ✅

Step 3 · Basic Auth · uso interno (5 min)

Il BOS è documento interno: NON deve essere pubblicamente accessibile.

Opzione A (consigliata) — Vercel Password Protection (Pro tier):

  1. Vercel project → SettingsDeployment Protection
  2. Enable Vercel Authentication o Password Protection
  3. Imposta password unica (condividi con Loris via 1Password/Bitwarden)

Opzione B — Edge Middleware basic auth (free, richiede file extra): Crea middleware.js nella root:

export const config = { matcher: '/((?!_next/static|_next/image|favicon.ico).*)' };

export default function middleware(req) {
  const auth = req.headers.get('authorization');
  if (!auth) {
    return new Response('Auth required', {
      status: 401,
      headers: { 'WWW-Authenticate': 'Basic realm="BOS Multiverbe"' }
    });
  }
  const [scheme, encoded] = auth.split(' ');
  if (scheme !== 'Basic') return new Response('Bad auth', { status: 401 });
  const [user, pass] = Buffer.from(encoded, 'base64').toString().split(':');
  if (user !== process.env.BOS_USER || pass !== process.env.BOS_PASS) {
    return new Response('Forbidden', { status: 403 });
  }
}

Poi Vercel → Settings → Environment Variables: BOS_USER + BOS_PASS (Production scope).

Step 4 · GitHub Actions secrets (5 min)

Per abilitare auto-deploy su push:

  1. GitHub → repo Multiverbe-BusinessSettingsSecrets and variablesActions
  2. Aggiungi 3 secrets:
    • VERCEL_TOKEN — vai su https://vercel.com/account/tokens → crea token "GitHub Actions BOS"
    • VERCEL_ORG_ID — Vercel → Settings → General → "Your ID" (oppure vercel link ti scrive .vercel/project.json con ids)
    • VERCEL_PROJECT_ID — idem da .vercel/project.json dopo vercel link

Step 5 · Test deploy (5 min)

  1. Push qualcosa nel repo (es. update minore in source/00-dashboard.md)
  2. Vai su GitHub → Actions tab → vedi workflow BOS Build + Verify + Deploy Vercel partire
  3. ~3 minuti dopo: build verde + deploy → bos.multiverbe.com aggiornato live

📊 Cost estimate

Voce Tier Costo
Vercel (Hobby tier) Free €0 (sufficiente fino a 100GB bandwidth/mese · BOS è statico ~50KB/visit)
Vercel Pro (per Password Protection) Pro $20/mo (richiesto solo se vuoi Vercel Authentication invece che middleware Edge basic auth)
GitHub Actions Free tier €0 (2000 min/mese, BOS build ~3 min × 5/giorno = 450 min/mese)
Domain bos.multiverbe.com esistente €0 incremento (subdomain di multiverbe.com già pagato)
Total €0/mese (con middleware basic auth) o $20/mo (con Vercel Password Protection)

🔐 Security checklist post-deploy

  • [ ] Password basic auth condivisa solo con Loris via Bitwarden share-vault
  • [ ] HTTPS attivo (Let's Encrypt auto via Vercel)
  • [ ] Headers HSTS + X-Frame-Options + X-Content-Type-Options + Referrer-Policy + Permissions-Policy attivi (configurati in vercel.json)
  • [ ] No analytics tracker (BOS è interno, no Plausible/PostHog)
  • [ ] No public links shareable (Vercel preview deployments lock)
  • [ ] Monitor Sentry: opzionale (BOS è statico, no JS errors lato server)

🚦 Verifica finale post-Step 5

  1. Apri https://bos.multiverbe.com (incognito) → richiede credenziali ✅
  2. Inserisci credenziali → vedi dashboard BOS con cover + stats live + 12 chunks navigabili ✅
  3. Test HTTPS: https://www.ssllabs.com/ssltest/analyze.html?d=bos.multiverbe.com → grade A+ ✅
  4. Test security headers: https://securityheaders.com/?q=bos.multiverbe.com → grade A+ ✅
  5. Lighthouse audit: performance ≥ 90 (BOS è statico, dovrebbe essere 100)

📝 Note operative

  • Auto-deploy on push: ogni git push con modifiche in source/** triggera build + deploy Vercel via GitHub Actions
  • Manual deploy: vercel --prod da locale
  • Rollback: Vercel Dashboard → Deployments → click su versione precedente → "Promote to Production"
  • Preview deployments: ogni PR genera preview URL multiverbe-bos-<hash>.vercel.app (non pubblico, accesso via Vercel team)

Owner: Gregorio (founder, decision) Setup data: file config Claude 2026-05-11 · azioni founder pending Cross-reference: AGENTS.md sezione "Build pipeline" + memoria feedback_business_eye_definitive.md