How daniel-joseph-web/vera-pay works
Verapay is a remittance-protection platform for sending funds to Nigerian providers, with payment release gated by invoice, payee, and project-proof checks. The main user journey starts a payment, analyzes the submitted bill and beneficiary, presents a verification decision, then approves payout or requests a refund. Family shared pots, contractor evidence capture, and milestone projects are distinct product branches. Backend route and service calls are evidenced in sampled source; some frontend-to-API wiring and unsampled capability links are documented only at a high level, so those links are dashed.
Main entry points: server.ts Express API · verification.controller.ts Verification orchestration · page.tsx Verification decision · payment.controller.ts Payment orchestration
Components 33
User experience
- Landing and plans
frontend/src/app/page.tsx - Escrow dashboard
frontend/src/app/(dashboard)/dashboard/page.tsx - Forensic audit grid
frontend/src/components/dashboard/VerapayAGGrid.tsx - Start payment
frontend/src/app/(dashboard)/pay/new/page.tsx - Payment state
frontend/src/stores/usePaymentStore.ts - Verification decision
frontend/src/app/(dashboard)/pay/[id]/verify/page.tsx - Traffic-light result
frontend/src/components/verification/TrafficLightDecisionCard.tsx - Quote comparison
frontend/src/components/verification/QuoteComparisonModal.tsx - Family shared pots
frontend/src/app/(dashboard)/family/page.tsx - Project tracking
frontend/src/app/(dashboard)/projects/page.tsx - Milestone progress
frontend/src/app/(dashboard)/projects/[id]/page.tsx - Milestone stepper
frontend/src/components/projects/MilestoneProgressStepper.tsx - Contractor evidence upload
frontend/src/app/(mobile-contractor)/contractor/upload/[token]/page.tsx - Evidence camera
frontend/src/components/camera/InAppCamera.tsx
Verification
- Verification routes
backend/src/routes/verification.routes.ts - Verification orchestration
backend/src/controllers/verification.controller.ts - Invoice OCR
backend/src/services/ai/gemini-ocr.service.ts - Quote agent
backend/src/services/ai/quote-agent.service.ts - Image forensics
backend/src/services/forensics/dhash.service.ts - Payee verification
backend/src/services/payee/cac-nuban.service.ts
Payments
- Express API
backend/src/server.ts - Payment routes
backend/src/routes/payment.routes.ts - Payment orchestration
backend/src/controllers/payment.controller.ts - PayPal escrow
backend/src/services/escrow/paypal-escrow.service.ts - Naira payout
backend/src/services/escrow/paystack-payout.service.ts
Integrations
- Payment webhooks
backend/src/routes/webhook.routes.ts - Event automation
backend/src/services/integrations/zapier.service.ts - Photo hash search
backend/src/services/integrations/elastic.service.ts - PayPal service
- Paystack service
- Gemini AI
Other components
- Sender
- Contractor
Connections 34
- Sender → Landing and plans: visits
- Sender → Start payment: starts payment
- Sender → Escrow dashboard: reviews activity
- Start payment → Payment state: updates state
- Start payment → Express API: submits payment
- Payment state → Verification decision: supplies state
- Verification decision → Traffic-light result: renders
- Verification decision → Quote comparison: presents comparison
- Verification decision → Express API: requests checks
- Escrow dashboard → Forensic audit grid: renders audit
- Sender → Family shared pots: manages support
- Sender → Project tracking: tracks projects
- Project tracking → Milestone progress: opens milestone
- Milestone progress → Milestone stepper: renders progress
- Contractor → Contractor evidence upload: uploads proof
- Contractor evidence upload → Evidence camera: captures evidence
- Contractor evidence upload → Express API: submits evidence
- Express API → Payment routes: mounts routes
backend/src/server.ts - Express API → Verification routes: mounts routes
backend/src/server.ts - Express API → Payment webhooks: mounts routes
backend/src/server.ts - Payment routes → Payment orchestration: dispatches
backend/src/routes/payment.routes.ts - Verification routes → Verification orchestration: dispatches
backend/src/routes/verification.routes.ts - Payment orchestration → PayPal escrow: creates orders and refunds
backend/src/controllers/payment.controller.ts - Payment orchestration → Naira payout: dispatches payout
backend/src/controllers/payment.controller.ts - Payment orchestration → Event automation: dispatches events
backend/src/controllers/payment.controller.ts - Verification orchestration → Invoice OCR: parses invoice
backend/src/controllers/verification.controller.ts - Verification orchestration → Image forensics: hashes invoice image
backend/src/controllers/verification.controller.ts - Verification orchestration → Quote agent: checks material quote
backend/src/controllers/verification.controller.ts - Verification orchestration → Payee verification: resolves beneficiary
backend/src/controllers/verification.controller.ts - Payment webhooks → Event automation: dispatches test event
backend/src/routes/webhook.routes.ts - PayPal escrow → PayPal service: calls API
- Naira payout → Paystack service: calls API
- Invoice OCR → Gemini AI: analyzes image
backend/src/services/ai/gemini-ocr.service.ts - Image forensics → Photo hash search: indexes hashes