VibeNG — Project Summary

Overview

VibeNG (vib.ng) is a milestone-driven marketplace where clients hire builders/freelancers and all project payments are orchestrated through the x402 payment protocol with platform custody. No Stripe, PayPal, or escrow vendors — all funding, milestone releases, and payouts are x402-native.

Status: ~97% code-complete | Infrastructure 0% deployed (as of April 1, 2026)


Architecture

Components

  • Web Platform — Next.js 15.5.10 + TypeScript (monorepo: packages/web/)
  • Chrome Extension — Browser-based snapshot capture (apps/extension-chrome/)
  • Desktop Companion — Native-app snapshot capture for IDE/design workflows (apps/snapshot-desktop/)
  • PostgreSQL — Self-hosted, double-entry custody ledger
  • Object Storage — Cloudflare R2 for evidence/snapshot files

Stack

  • Frontend: Next.js 15.5.10, Tailwind CSS, claymorphism design system (monochrome)
  • Database: Self-hosted PostgreSQL 15+, idempotent SQL migrations
  • Auth: Better Auth (GitHub, Google, LinkedIn, Twitter OAuth)
  • Payments: x402 protocol on Base L2, USDC default asset
  • Infra Target: Coolify on VPS (DigitalOcean/Hetzner), domain vib.ng

Payment Architecture (x402-Native)

Key Concepts

  • Wallet Fleet: Rotational pool with classes — intake, custody, payout, treasury
  • Custody Ledger: Double-entry, immutable event append store, journal validation
  • Milestone Payouts: Tiered, deterministic, snapshot-gated approval
  • Idempotency: All funding intents and payout retries are idempotent

Payment Routes

  • POST /api/payments/funding/intent — Create funding intent
  • POST /api/payments/funding/confirm — Confirm x402 payment (HMAC-signed envelope)
  • POST /api/payments/milestones/:id/evidence — Submit milestone evidence
  • POST /api/payments/milestones/:id/approve — Approve milestone (gated)
  • POST /api/payments/payouts/execute — Execute payout run

Guardrails

  • Never route through Stripe/PayPal/Wise/escrow
  • Real HMAC-signed envelope verification + on-chain RPC
  • Worker auth fail-closed in production
  • Simulated payouts blocked in production

Snapshot Proof System

A unique feature: snapshot proof signals for freelance work verification.

  • Chrome Extension: Browser tab capture → /api/snapshots/capture/ingest
  • Desktop Companion: Region/window capture for IDE, design, writing apps
  • Policy Engine: Configurable per milestone — required count, window hours, min spacing, min unique days, source allowlist
  • Gate Enforcement: Milestone cannot be approved/released unless snapshot policy is met (or authorized override)
  • Scheduler Worker: Cron-triggered, generates capture tokens, sends reminders

Database Schema (Key Tables)

TablePurpose
usersFreelancer & client accounts
questsProject listings
milestonesMilestone definitions with funding + snapshot policy
milestone_evidenceSubmitted evidence (snapshots, proofs)
milestone_approvalsClient approval records
project_funding_eventsFunding deposits and settlements
payout_runs / payout_run_itemsPayout execution batches + line items
wallet_poolManaged wallet fleet (intake/custody/payout/treasury)
wallet_assignmentsWallet-to-quest assignments
custody_ledger_entriesDouble-entry custody ledger
custody_audit_logTamper-evident audit trail
risk_signalsSecurity anomaly signals
x402_eventsPayment protocol events

Ops & Runbooks

Cron Jobs (required)

ScheduleEndpointPurpose
Every 5 minPOST /api/payments/payouts/schedulerFull payout lifecycle
Every 15 minPOST /api/snapshots/capture/schedulerCapture reminders
Every 30 minPOST /api/ops/reconciliationChain-to-ledger check
Every 10 minPOST /api/ops/dashboardMetrics + alerts

Incident Response Types

  • wallet_compromise — Freeze all affected wallets, cancel pending payouts
  • payout_pipeline_failure — Fail running payouts, emit risk signal
  • funding_pipeline_failure — Identify affected events
  • network_outage — Cooldown all active wallets
  • reconciliation_critical — Severity-10 signal for manual investigation

Alert Rules

6 built-in alert rules: stuck payout runs, wallet class depleted, settlement success rate low, payout failure rate high, stuck funding events, high-severity signals unresolved.


Production Readiness Sprint (Completed)

Sprint Window: March 2–13, 2026. All items completed:

  • Internal DB/RPC allowlist boundary (WS-1)
  • Fail-closed worker auth (WS-2)
  • Real x402 verification + funding idempotency (WS-3)
  • Real payout execution, no synthetic fallback (WS-4)
  • Dependency security baseline (WS-5)
  • CI pipeline gates (WS-6)
  • Snapshot policy alignment (WS-7)
  • Capture app hardening (WS-8)
  • 78 integration tests passing (including 22 snapshot gate tests)
  • Compliance pages expanded
  • 12-char password policy

What Remains (Human Action Required)

Infrastructure Deployment

  • Set up Coolify on VPS
  • Configure vib.ng DNS (A/AAAA records)
  • Deploy production PostgreSQL
  • Run schema + migrations on production DB
  • Configure Cloudflare R2 bucket
  • Set all production env vars (80+ documented in .env.example)

Payment Operations

  • Create wallet fleet (min 2 per class)
  • Fund payout wallets with USDC on Base
  • Deploy payout dispatcher service
  • Verify PAYMENTS_ALLOW_SIMULATED_PAYOUTS=false

Alerting & Observability

  • Wire risk signals to Slack/PagerDuty
  • Set up log aggregation (Datadog/Loki/Axiom)
  • Optional: Sentry for error tracking

Distribution

  • Publish Chrome Extension to Chrome Web Store
  • Windows code signing certificate for desktop companion
  • Final Terms/Privacy/Security page review

Final Verification

  • Staging E2E test: funding → approval → payout
  • Load test (10k QPM baseline)
  • Security review in production env
  • Zero-discrepancy reconciliation on staging

Key Environment Variables

VariableRequiredSource
DATABASE_URLYesDocker auto-set
BETTER_AUTH_SECRETYesopenssl rand -base64 32
NEXT_PUBLIC_APP_URLYeshttps://vib.ng
PAYMENTS_WORKER_SECRETYes (prod)openssl rand -base64 32
X402_ENVELOPE_SIGNING_SECRETYes (prod)openssl rand -base64 32
SNAPSHOT_CAPTURE_TOKEN_SECRETYes (prod)openssl rand -base64 32
X402_RPC_URL_BASEYes (prod)Alchemy/Infura/QuickNode
PAYOUT_DISPATCH_URLYes (prod)Signer service URL
R2_ACCOUNT_ID / R2_BUCKETYesCloudflare R2
OPS_ADMIN_USER_IDSRecommendedUser UUIDs

Dev Commands

  • pnpm dev:web — Start web dev server
  • pnpm dev:api — Start API dev server
  • pnpm --filter web build — Build web
  • pnpm --filter web lint — Lint web
  • pnpm --filter web db:setup — Run schema + functions + migrations

Style / UX

  • Monochrome claymorphism (black, white, pearl, neutral gray)
  • Milestone-first navigation, payment clarity over decoration
  • Required language: “x402 payment”, “funded”, “in custody”, “release pending”, “released”, “paid out”
  • All payment states have text labels (accessibility)
  • High-contrast states for failed/blocked events

  • Domain: vib.ng (not yet deployed)
  • Repo: C:/Users/hanse/vibng/
  • Docs: CLAUDE.md, TASKS.md, SETUP.md, style.md, todo.md, LAUNCH_STATUS.md, PROD_READINESS_SPRINT.md
  • DB Docs: packages/web/docs/db.md
  • Runbooks: packages/web/docs/runbooks.md

Last updated: April 16, 2026 — summary compiled from project documentation

0 items under this folder.