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 intentPOST /api/payments/funding/confirm— Confirm x402 payment (HMAC-signed envelope)POST /api/payments/milestones/:id/evidence— Submit milestone evidencePOST /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)
| Table | Purpose |
|---|---|
users | Freelancer & client accounts |
quests | Project listings |
milestones | Milestone definitions with funding + snapshot policy |
milestone_evidence | Submitted evidence (snapshots, proofs) |
milestone_approvals | Client approval records |
project_funding_events | Funding deposits and settlements |
payout_runs / payout_run_items | Payout execution batches + line items |
wallet_pool | Managed wallet fleet (intake/custody/payout/treasury) |
wallet_assignments | Wallet-to-quest assignments |
custody_ledger_entries | Double-entry custody ledger |
custody_audit_log | Tamper-evident audit trail |
risk_signals | Security anomaly signals |
x402_events | Payment protocol events |
Ops & Runbooks
Cron Jobs (required)
| Schedule | Endpoint | Purpose |
|---|---|---|
| Every 5 min | POST /api/payments/payouts/scheduler | Full payout lifecycle |
| Every 15 min | POST /api/snapshots/capture/scheduler | Capture reminders |
| Every 30 min | POST /api/ops/reconciliation | Chain-to-ledger check |
| Every 10 min | POST /api/ops/dashboard | Metrics + alerts |
Incident Response Types
wallet_compromise— Freeze all affected wallets, cancel pending payoutspayout_pipeline_failure— Fail running payouts, emit risk signalfunding_pipeline_failure— Identify affected eventsnetwork_outage— Cooldown all active walletsreconciliation_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.ngDNS (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
| Variable | Required | Source |
|---|---|---|
DATABASE_URL | Yes | Docker auto-set |
BETTER_AUTH_SECRET | Yes | openssl rand -base64 32 |
NEXT_PUBLIC_APP_URL | Yes | https://vib.ng |
PAYMENTS_WORKER_SECRET | Yes (prod) | openssl rand -base64 32 |
X402_ENVELOPE_SIGNING_SECRET | Yes (prod) | openssl rand -base64 32 |
SNAPSHOT_CAPTURE_TOKEN_SECRET | Yes (prod) | openssl rand -base64 32 |
X402_RPC_URL_BASE | Yes (prod) | Alchemy/Infura/QuickNode |
PAYOUT_DISPATCH_URL | Yes (prod) | Signer service URL |
R2_ACCOUNT_ID / R2_BUCKET | Yes | Cloudflare R2 |
OPS_ADMIN_USER_IDS | Recommended | User UUIDs |
Dev Commands
pnpm dev:web— Start web dev serverpnpm dev:api— Start API dev serverpnpm --filter web build— Build webpnpm --filter web lint— Lint webpnpm --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
Links
- 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