MMetiss AI|Docs

Architecture

Metiss AI is a microservices platform deployed on Google Cloud Platform. This page describes the key components, how they communicate, and the end-to-end data flow from a homeowner's first interaction to a qualified lead landing in a partner's CRM.

System diagram

USERSHomeownerPartner websitePartner AdminVista PortalField TeamOrion PortalFRONTENDLead WidgetReactVista PortalNext.jsOrionNext.js + EncoreTSAPI GatewayGCP API Gateway · Auth & rate limiting · OAuth2 / API keys · Service routingMICROSERVICES · GCP CLOUD RUN · PYTHON / FASTAPIAuth ServiceFastAPIUtility Bill AIFastAPI + GeminiSavings InsightFastAPIOrg / UserFastAPIWidget ServiceFastAPIDATA & EXTERNAL INTEGRATIONSPostgreSQLCloud SQLFirestoreConfig / sessionsCloud StorageBill files (GCS)Pub/SubAudit eventsSalesforceCRM lead pushGoogle GeminiBill extraction AI

Components

Frontend layer

ComponentTechPurpose
Lead WidgetReactEmbeddable widget hosted on partner websites. Collects address and utility data, shows savings estimates, captures leads.
Vista PortalNext.jsPartner administration interface for configuring service territories, products, utilities, and financial options.
OrionNext.js + EncoreTSField service portal for managing installation and service jobs, tracking status, and surfacing AI job insights.

Backend services

All services are deployed as independent containers on GCP Cloud Run, routed through the API Gateway. Each service is Python (FastAPI) with shared commons libraries.

ServiceResponsibility
authenticator-serviceToken issuance and validation. All auth is handled at the gateway; individual services trust the gateway's assertions.
utility-bill-serviceAccepts uploaded utility bill PDFs/images. Uses Gemini to extract structured monthly consumption data.
savings-insight-serviceCalculates potential solar savings from consumption, roof type, utility rates, and available products. Triggers report emails.
org-serviceManages partner organisations, their configurations, and service territory eligibility rules.
user-serviceUser accounts, roles, and permissions across partner organisations.
widget-serviceServes widget configuration, address standardisation, roof type and utility provider lookups.
appointment-handling-serviceSchedules field service appointments, integrates with Skedulo for availability and time-slot management.
email-agentDelivers savings reports and customer communications.
pdf-generator-serviceRenders savings reports as downloadable PDFs.
contract-approval-serviceManages partner contract workflows and approval states.

Data stores

StoreUsed for
PostgreSQL (Cloud SQL)Primary relational store — users, organisations, jobs, leads, event logs.
FirestorePartner configuration, widget reference data, session state.
Cloud Storage (GCS)Uploaded utility bill files. Stored securely; deleted after extraction.

External integrations

IntegrationPurpose
Google GeminiAI extraction of usage data from utility bill documents.
Google Maps APIAddress type-ahead, standardisation, and geocoding.
US Census BureauDemographics lookup by latitude/longitude for lead enrichment.
ATTOM / CoreLogicProperty information (roof type, square footage) fetched asynchronously.
SalesforceQualified lead creation via REST API into partner CRMs.
SkeduloAppointment availability, date/time slot retrieval for field service scheduling.
GCP Pub/SubAudit event streaming. The audit-event-consumer-job Cloud Function processes all domain events.

Security model

  • Auth at the gateway — OAuth2 / API key validation happens at the API Gateway. Individual microservices do not implement their own auth logic.
  • Encrypted in transit— all traffic is HTTPS; internal service-to-service calls stay within GCP's private network.
  • PII minimisation — customer PII is only persisted when a lead is created. Uploaded utility bills are stored transiently in GCS and removed after extraction.
  • Partner isolation — all data is scoped to the partner organisation. Cross-organisation access is prevented at the service layer.
Deployment: All backend services are containerised and deployed to GCP Cloud Run. Infrastructure is managed via the devops and infrastructure-live repositories using Terragrunt.

Next steps