Milestone 0: import zappier billing, Verae middleware, and Zapier research

Compose-ready workspace: packages/zappier (rate card, portal, Stripe),
packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier
(CLI app), vendor/zapier-platform, and research/zapier vendor corpus.

Gate 0 structure checks pass. Product code and research are not yet wired.
This commit is contained in:
George Lambert 2026-09-09 02:37:36 -04:00
commit b4150c8250
1364 changed files with 6814366 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# Local stack for Phase 7+ (NATS) and Phase 12 E2E.
# Middleware HTTP can run without NATS when NATS_ENABLED=false.
services:
nats:
image: nats:2.10
command: ["-js", "-m", "8222"]
ports:
- "4222:4222"
- "8222:8222"
middleware:
build: ./verae-zapier-middleware
ports:
- "3100:3100"
environment:
PORT: "3100"
VERAE_API_BASE_URL: ${VERAE_API_BASE_URL:-https://api.veraetime.net}
MOCK_VERAE: ${MOCK_VERAE:-true}
NATS_ENABLED: ${NATS_ENABLED:-false}
NATS_URL: nats://nats:4222
TOKEN_SECRET: ${TOKEN_SECRET:-dev-secret}
DEBUG_VERAE: ${DEBUG_VERAE:-}
depends_on:
- nats

40
harness/compose.yaml Normal file
View file

@ -0,0 +1,40 @@
# Local disconnected stack (PR 3+). Zappier commercial edge is added in PR 4.
# Middleware HTTP can run without NATS when NATS_ENABLED=false.
services:
nats:
image: nats:2.10
command: ["-js", "-m", "8222"]
ports:
- "4222:4222"
- "8222:8222"
middleware:
build: ../packages/verae-zapier-middleware
ports:
- "3100:3100"
environment:
PORT: "3100"
VERAE_API_BASE_URL: ${VERAE_API_BASE_URL:-http://mock-verae:8080}
MOCK_VERAE: ${MOCK_VERAE:-true}
NATS_ENABLED: ${NATS_ENABLED:-false}
NATS_URL: nats://nats:4222
TOKEN_SECRET: ${TOKEN_SECRET:-dev-secret}
DEBUG_VERAE: ${DEBUG_VERAE:-}
depends_on:
- nats
zappier:
image: node:20
working_dir: /app
volumes:
- ../packages/zappier:/app
command: ["npx", "ts-node", "src/index.ts"]
ports:
- "3000:3000"
environment:
PORT: "3000"
ZAPPIER_DB: /app/data/zappier.db
ADMIN_KEY: ${ADMIN_KEY:-admin-dev-key}
depends_on:
- middleware

View file

@ -0,0 +1,7 @@
# Mock Verae
Until `api.veraetime.net` is connected, set `MOCK_VERAE=true` on the middleware.
The in-process mock lives in `packages/verae-zapier-middleware/src/clients/veraeClient.js` (`create` → pending → completed certificate).
This directory is reserved for a standalone mock HTTP service if compose needs a process on `:8080` (PR 3). Do not send gap features (hash lookup, metadata, LTS, receipts) to the live OpenAPI client.

10
harness/scripts/smoke.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Disconnected smoke (expand in PR 3 / PR 4).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
echo "workspace: $ROOT"
curl -fsS "http://127.0.0.1:3100/health" || {
echo "middleware /health not up — start packages/verae-zapier-middleware with MOCK_VERAE=true"
exit 1
}
echo "middleware health ok"