Skip to main content

Current Setup (Work in Progress)

The current Progressive Home integration uses a Playwright-driven portal bot. This architecture is work in progress and will be replaced by direct API calls. See Reverse Engineering for the planned approach.

Architecture

Frontend (React) → API Gateway (NestJS) → Application Service → Playwright Page Objects → Progressive Agent Portal

DDD Layers

LayerPathResponsibility
Domaindomain/types/ProgressiveHomeQuoteRequest, ProgressiveQuoteStatus, flow enums
Applicationapplication/services/ProgressiveHomeQuoteService, ProgressiveQuoteDataMapper, ProgressiveSessionService
Applicationapplication/dtos/StartHomeQuoteDto (class-validator)
Infrastructureinfrastructure/pages/Page objects per portal step (Playwright)
Infrastructureinfrastructure/browser/BrowserPoolService, BrowserSessionService, config

Flow Steps

Step IDPathStatus
policypolicyPlaceholder
addressaddressPlaceholder
property-detailsproperty-detailsPlaceholder
personal-infopersonal-infoPlaceholder
contactcontactPlaceholder
estimate-quotesestimate-quotesPlaceholder
about-youabout-youImplemented
property-useproperty-useImplemented
home-infohome-infoImplemented
confirm-detailsconfirm-detailsImplemented
coveragescoveragesImplemented
checkoutcheckoutPlaceholder

Default route redirects to about-you.

API Endpoints

MethodPathPurpose
POST/api/v1/progressive/home/quoteStart new quote (Playwright bot)
GET/api/v1/progressive/home/quote/:sessionIdPoll quote status
POST/api/v1/progressive/home/initial-quoteLoad existing CRN quote for DA entry

Browser Pool

  • Single Chromium instance, multiple isolated contexts (default max 3)
  • Config via env: API_GATEWAY_PROGRESSIVE_PW_HEADLESS, API_GATEWAY_PROGRESSIVE_PW_MAX_INSTANCES, API_GATEWAY_PROGRESSIVE_PW_NAV_TIMEOUT, API_GATEWAY_PROGRESSIVE_BASE_URL (default https://62.qa.foragentsonly.com)

Page Objects

libs/apis/carriers/progressive/src/lib/infrastructure/pages/:

  • named-insured.page.ts, products.page.ts, household-members.page.ts, additional-details.page.ts, coverages-bill-plans.page.ts, portfolio.page.ts, point-of-sale.page.ts, final-sale.page.ts, login.page.ts
  • step-navigation.ts — retry (3 attempts, 15s timeout)
  • validation-patterns.ts — portal validation error extraction