Skip to content

Offers & Agreements Microservices Roadmap

The Planovi platform defines dedicated microservices for Offers and Agreements to handle high-volume tariff modeling, photovoltaic quotation generation, and statutory legal agreement compilation.


1. Domain Structure & Roadmap

As defined in the repository root README.md and config.php, the platform reserves dedicated subdomains:

flowchart LR
    subgraph Core["Core Active Services"]
        Dealflow["dealflow.planovi.app"]
        Scheduler["scheduler.planovi.app"]
    end

    subgraph Specialized["Specialized Contract Services"]
        Offers["offers.planovi.app
(dev-offers.planovi.app)"] Agreements["agreements.planovi.app
(dev-agreements.planovi.app)"] end Core --> Specialized
MicroserviceTarget SubdomainCore Responsibilities
Offers Engineoffers.planovi.appDynamic PV/heat pump/battery quotation calculators, tariff comparison matrix, financial ROI charts, and PDF download generation.
Agreements Engineagreements.planovi.appContract lifecycle management, electronic signature integration, prefilled DOCX/PDF generation, and accession resolution documents.

2. Integration with Supabase Edge Functions

The offers and agreements microservices operate in conjunction with the backend Supabase Edge Functions in planovi-backend:

  1. Document Templates:

    • generate-resolution-document: Compiles board resolutions welcoming new members.
    • generate-prefilled-docx: Hydrates dynamic variables into legally approved Word documents.
    • docx-to-html: Renders documents in web browsers for review before signature.
  2. Billing & Tariffs:

    • billing-calculator: Calculates self-consumption balancing ratios and member settlement tariffs.
    • generate-invoice-pdf: Assembles formal VAT invoices with Swiss QR and Polish split payment codes.

3. Migration & Expansion Guidelines

When expanding features into offers/ or agreements/:

  • Place code in dedicated root directories (offers/ and agreements/).
  • Inherit environment variables and URLs from ../config.php.
  • Maintain identical security conventions: header-based X-Secret-Key verification, anti-cache headers, and strict input sanitization.