Skip to content

Dealflow, Scheduler, Offers & E-Signing

When a prospective customer submits a lead, books a meeting, views a white-label offer, and digitally signs a cooperative agreement, the request crosses 4 repositories. Use this map to jump straight to the right file.

Business Flow: Lead -> Offer -> E-Sign -> Stripe Billing 🎨 Curated Flow (Pull-Protected)
Business Flow: Lead -> Offer -> E-Sign -> Stripe Billing Business Flow: Lead -> Offer -> E-Sign -> Stripe Billing
Business Flow: Lead -> Offer -> E-Sign -> Stripe Billing
Business Flow: Lead -> Offer -> E-Sign -> Stripe Billing Business Flow: Lead -> Offer -> E-Sign -> Stripe Billing

Where Is It in Code?

Stage / SymptomRepositoryExact File / Path
Public lead inquiry form (planovi.app) + Turnstileplanovi-webpagecontact-handler.php
Embeddable white-label inquiry & offer viewer (dealflow.planovi.app)planovi-microservicesdealflow/inquiry.php, dealflow/offer.php, dealflow/api/
Google Calendar appointment widget (scheduler.planovi.app)planovi-microservicesscheduler/index.php, scheduler/backend/ (OAuth2 + booking API)
Digital contract signing page (agreements.planovi.app)planovi-microservicesagreements/sign.php, dealflow/sign.php
Multi-environment URL & error resolver for PHP microservicesplanovi-microservicesconfig.php (detects localhost vs dev-* vs PROD)
Sales rep CRM pipeline, offer builder & templates in appplanovi-flutter-applib/features/{dealflow,offers,agreements,scheduler,templates,clients}/
Offer & form preview generation + admin edit linksplanovi-backendsupabase/functions/{submit-inquiry,generate-offer,create-form-preview,create-admin-edit-link}/
Agreement generation, e-signing API & final PDF sealingplanovi-backendsupabase/functions/{generate-agreement,send-signature-request,signing-api,finalize-agreement,send-agreement-email}/
Automated appointment reminders & calendar cronplanovi-backendsupabase/functions/run-scheduler/, reminder-scheduler/

Important Cross-Service Bridges & Gotchas

  1. White-Label Branding (Zone 2): Tenant embed pages in planovi-microservices dynamically apply each cooperative’s --tenant-primary color & logo (with WCAG button text contrast). Do not hardcode Planovi green (#32CA42) over customer tenant tokens there.
  2. Backend β†’ Microservices Auth: planovi-backend calls DEALFLOW_BASE_URL and SCHEDULER_BASE_URL using DEALFLOW_API_SECRET and SCHEDULER_API_SECRET (and _DEV variants in supabase-edge-runtime-dev). A 401/403 between Edge Functions and PHP almost always means a secret mismatch between /opt/vps-stack/.env and planovi-microservices.
  3. Flat-File Permissions on VPS: dealflow/data/ and scheduler/data/ must remain writable by www-data inside php-app.
Terminal window
# Watch PHP microservice errors on VPS
docker logs -f --tail 100 php-app