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
| Layer | Path | Responsibility |
|---|---|---|
| Domain | domain/types/ | ProgressiveHomeQuoteRequest, ProgressiveQuoteStatus, flow enums |
| Application | application/services/ | ProgressiveHomeQuoteService, ProgressiveQuoteDataMapper, ProgressiveSessionService |
| Application | application/dtos/ | StartHomeQuoteDto (class-validator) |
| Infrastructure | infrastructure/pages/ | Page objects per portal step (Playwright) |
| Infrastructure | infrastructure/browser/ | BrowserPoolService, BrowserSessionService, config |
Flow Steps
| Step ID | Path | Status |
|---|---|---|
| policy | policy | Placeholder |
| address | address | Placeholder |
| property-details | property-details | Placeholder |
| personal-info | personal-info | Placeholder |
| contact | contact | Placeholder |
| estimate-quotes | estimate-quotes | Placeholder |
| about-you | about-you | Implemented |
| property-use | property-use | Implemented |
| home-info | home-info | Implemented |
| confirm-details | confirm-details | Implemented |
| coverages | coverages | Implemented |
| checkout | checkout | Placeholder |
Default route redirects to about-you.
API Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/progressive/home/quote | Start new quote (Playwright bot) |
| GET | /api/v1/progressive/home/quote/:sessionId | Poll quote status |
| POST | /api/v1/progressive/home/initial-quote | Load 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(defaulthttps://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.tsstep-navigation.ts— retry (3 attempts, 15s timeout)validation-patterns.ts— portal validation error extraction