Bridge service
The Node service that wires Polly to the rest of the world. As of 2026-06-22 it owns every machine-to-machine endpoint — the trades.yourevenings.com Pages worker is humans-only now (status dashboard behind CF Access).
Location
- Host:
72.62.112.155 (Hostinger VPS)
- Path on host:
/opt/yourevenings/bridge
- Container:
yourevenings-bridge (Docker, host networking, port 8765)
- Public URL:
https://bridge.yourevenings.com (Traefik → Let's Encrypt cert)
- Repo (local):
/data/.openclaw/workspace/ventures/yourevenings/bridge
Health
GET / → currently returns 404 (acceptable — no homepage). HEARTBEAT.md rule: only 000 or 5xx is a fail.
GET /health → 200 with JSON status.
Key routes
Polly call lifecycle (added 2026-06-21)
| Route |
Purpose |
POST /vapi-webhook |
Vapi end-of-call report → writes call log + sends job SMS to trade |
GET /vcard/:provisionId/polly-on.vcf |
iPhone-savable contact: **61*<YE>**5# (turn Polly ON) |
GET /vcard/:provisionId/polly-off.vcf |
iPhone-savable contact: ##002# (turn Polly OFF) |
Pilot provisioning (added 2026-06-21)
| Route |
Purpose |
POST /api/provision-pilot/queue |
Apps Script enqueues a pilot for approval |
GET /api/provision-pilot/approve/:id |
Matt's one-click approve → runs full provisioning |
GET /api/provision-pilot/reject/:id |
Matt's one-click reject |
GET /api/provision-pilot/status/:id |
Apps Script polls for state |
GET /api/provision-pilot/queue |
HTML queue dashboard |
Pilot operations (added 2026-06-22)
| Route |
Purpose |
GET /pilots?key=... |
Overview dashboard: all live pilots with 24h/7d call counts |
GET /pilots/:id?key=... |
Per-pilot call detail: every call, transcripts, recordings, flags |
GET /api/calls/summary?key=...&sinceMs=... |
JSON summary (used by daily digest cron) |
Stack monitoring (added 2026-06-21)
| Route |
Purpose |
GET /status?token=... |
JSON health (Twilio + Vapi + Vapi Credits + Stripe + self) — replaces bridge.yourevenings.com/status which was behind CF Access |
Katie's sales SIP setup (added 2026-06-21)
| Route |
Purpose |
POST /twiml/sip-outbound |
Whitelists SIP user → CallerID, returns <Dial> |
POST /twiml/sales-inbound |
Inbound calls to Katie's number → "Hi, you've reached YourEvenings. Leave your name and number and we'll get back to you." → 90s record → transcribe |
POST /twilio/sales-voicemail |
Transcription callback → emails Matt + Katie |
POST /twilio/sms |
Inbound SMS auto-replies "we'll get back to you" + emails Matt + Katie |
Legacy / US flows
| Route |
Purpose |
POST /twiml/outbound |
Twilio voice webhook (legacy US flow, dormant) |
WS /audio/:callSid |
Twilio Media Streams ↔ voice agent (legacy) |
POST /api/call |
Internal: place outbound call (auth via INTERNAL_API_KEY) |
POST /api/cal-webhook |
Cal.com booking → schedule Polly call (US flow) |
POST /api/audit-callback |
call-me-now form → outbound audit-callback mode (US flow) |
GET /lead-flow |
Renders mermaid lead-flow diagram |
POST /api/approve-report/:callSid |
One-click approve audit-report send (US flow) |
Persistence
| File |
Owner |
Purpose |
/data/provisions.json |
src/provision.js |
Pilot queue + executor state |
/data/calls.json |
src/calls.js |
Every Polly call ever logged |
/data/cold-email-log.json |
src/cold-email-sender.js |
Cold-email sends (US, dormant) |
/data/cold-call-log.json |
src/cold-call.js |
Cold-call dispositions (US, dormant) |
All survive container restarts (/data is a volume mount).
Auth model
x-vapi-secret header → /vapi-webhook only. Set on both base + every clone in their server.secret.
?token=<STATUS_TOKEN> → /status only.
?key=<INTERNAL_API_KEY> or x-api-key header → /api/provision-pilot/*, /pilots*, /api/calls/*.
/vcard/* → unauthenticated (the URL itself is the secret — pilot ID is the only entropy).
Restart / redeploy
From this workspace:
scp -i /data/.ssh/yourevenings_vps ventures/yourevenings/bridge/src/<file>.js root@72.62.112.155:/opt/yourevenings/bridge/src/
ssh -i /data/.ssh/yourevenings_vps root@72.62.112.155 'cd /opt/yourevenings/bridge && docker compose up -d --build'
Or in-place:
ssh root@72.62.112.155
cd /opt/yourevenings/bridge
docker compose up -d --build
docker logs -f yourevenings-bridge
Don't restart without need — service is steady.
Source files of note
| File |
Responsibility |
src/server.js |
Fastify app, all routes |
src/provision.js |
Pilot queue (queue, approve, reject, get, list) |
src/provision-executor.js |
Per-step pilot provisioning (Twilio buy + Vapi clone + bind + SMS) |
src/calls.js |
Call log (record, list, listByProvision, summary, computeFlags) |
src/status.js |
Polly stack health checks (replaces CF Worker port) |
src/cold-call.js |
Cold-call dispositions + outbound from Katie's SIP |
src/cold-email-sender.js |
Cold email (US, dormant) |
src/email.js |
Zoho SMTP sender |