# Northbridge Wealth Partners: HERE Enterprise Browser demo suite

Five standalone apps, each meant to be one HERE view or Supertab. They share context through HERE Signals (FDC3).

| App | Route | Handles intent | Accepts |
| --- | --- | --- | --- |
| Client Relationship Manager | `/crm` | `ViewClient` | `?householdId=` |
| Client Document Vault | `/documents` | `ViewDocuments` | `?householdId=` |
| New Account Opening | `/account-opening` | `StartOnboarding` | `?householdId=&intent=StartOnboarding` (auto-prefill) |
| Risk Profile & Proposal | `/proposal` | `BuildProposal` | `?householdId=` |
| Market Pulse | `/market` | `ViewInstrument` | `?ticker=` and `?householdId=` |

`/` is a hidden dev index. `/demo` is a presenter page: it shows the Forbes seed data and lets you switch the KYC scenario (`partial_match` by default, or `clear`).

## 1. Register the apps in the HERE Admin Console

1. Publish the site and note its URL, for example `https://northbridge.example.com`.
2. In **Admin Console → Content → Add content**, create one **Web app** per row above:
   - URL: `https://<your-domain>/<route>`
   - Name, icon and app ID: copy them from `/here/apps.json` (replace `YOUR-DOMAIN`).
3. Under **Interop / Intents**, paste the matching file from `/here/intents/{app}.json`, for example:

```json
{ "intents": { "listensFor": { "StartOnboarding": { "displayName": "Start Client Onboarding", "contexts": ["wealth.household", "fdc3.contact"] } } } }
```

4. Assign the apps to the demo user group and add them to a Supertab or workspace. Recommended layout: CRM | Documents | Account Opening, plus Proposal and Market Pulse in a second Supertab.
5. Link the views to the same color channel (for example, green) so that context broadcasts flow between them.

## 2. How the interop works

Each app detects its environment on load, using the first that applies:

1. `window.fdc3` (FDC3 2.0). The header shows **HERE Signals: connected (FDC3)**.
2. `window.fin.me.interop` (OpenFin interop API). The header shows **(OpenFin Interop)**.
3. A `BroadcastChannel("here-demo")` fallback across normal Chrome tabs. The header shows **Local demo mode**. In local mode, an intent that no open tab handles opens the target app in a new tab, with `?householdId=` set.

Context types:

- `fdc3.contact`
- `fdc3.contactList`
- `fdc3.instrument`
- `fdc3.portfolio`
- `wealth.household` (full household payload)
- `wealth.onboardingStatus` (`{ householdId, step, percentComplete, exceptions[] }`)

Notifications use `@openfin/notifications` inside HERE and fall back to an in-page toast elsewhere. Every app has a **Signals log** drawer at the bottom that shows each signal sent and received.

AI Center reads visible text. Every app shows a **Context Snapshot** card, and all data is real DOM text (no images or canvas).

## 3. Demo script (about 6 minutes)

1. **The problem.** Open **CRM** and select **Sean Forbes**. Point out the data-quality indicator: his whole address is crammed into "Mailing Street", and City, State and ZIP are empty. Show **John McHugh**'s nearly blank record. "Today an advisor re-types all of this into a 142-field form. That takes about 47 minutes."
2. **Linked context.** Clicking Sean broadcasts `fdc3.contact` and `wealth.household`. **Documents** switches to the Forbes household, and **Market Pulse** jumps to EDGC (his employer, pending acquisition at $46.50). Open the Signals log to show the traffic.
3. **Documents.** Open the Harborline joint statement (real HTML; EDGC is about 38% of the $5.9M liquid net worth) and the Keystone 401(k) statement ($1,184,230.55). Open Sean's driver's license: the address exception (home vs. office) is flagged in amber. Open the TOD designation: Lucas's DOB is missing.
4. **The aha moment.** Click **Send to Account Opening**, or **Start onboarding** in the CRM. In **Account Opening**, watch the AI assistant fill the wizard field by field in about 3 seconds. The counter climbs and shows how many fields still need review. Hover an **Auto-filled** badge to see its source document. Note the **Parsed from Salesforce** badges on the mailing address.
5. **Exceptions.** Open **Exceptions (2)**, jump to each one, choose the home address as the legal residence, and use Lucas's DOB from the CRM. Then mark the KYC watchlist partial match (Sean Forbes, Ireland, DOB 1969-01-22, 71%) as a false positive. Meanwhile the CRM checklist and the WorkHQ onboarding status card (CASE-11872) update live from `wealth.onboardingStatus`.
6. **Proposal.** In the CRM, click **Build proposal**. The risk questionnaire is prefilled (Moderate Growth). On **Current vs. proposed**, show the concentration warning, the 3-year tax glide path and the fee savings. Click EDGC or AAPL in the holdings table, and Market Pulse follows. On **Goals projection**, show retirement at 58 and the probability of success. The risk score is 62/100, which maps to Moderate Growth (65% equity / 30% fixed income / 5% cash).
7. **Close.** On the Account Opening review step, click **Submit for e-signature**. A HERE notification appears: "Account application ready for e-signature: Forbes Household", with **Send for signature** and **View in CRM** buttons. Ask AI Center: "Summarize the open exceptions for the Forbes household."

All data is fictional demo data. Prices are static, and no external APIs are called.

## Meridian Custody form (/account-opening): HERE MCP fields

Every input has a visible label, a stable `id`, and `name` / `data-field` set to the same dot path, for example `owner1.firstName`, `owner1.dob`, `owner2.firstName`, `account1.registration`, `account1.tod.beneficiary1.name`, `account1.tod.beneficiary1.percent`, `account2.type`, `rollover.planName`, `rollover.accountLast5` and `options.owner1.requestedLevel`. Values written programmatically (native value setter plus an `input` or `change` event) update the form, re-validate, update the counter, and get the "Pre-filled" badge. The /demo page's "Simulate MCP pre-fill" button fills the form this way. After submit, the confirmation view includes `<script type="application/json" id="confirmation-data">` with the status, account numbers, options approvals, timestamp and reference number.

## ClearPath KYC (/kyc)

Register `/kyc` as its own app (intents file `/here/intents/kyc.json`, intent `ReviewKycCase`). Open it in a Supertab only when screening returns a partial match. The seed flag `kycScenario` defaults to `partial_match`; switch it on /demo ("KYC scenario: Partial match / Clear"). Every decision control has a stable `id` and `data-field` (`decision`, `notes`, `reviewer`, `submit`). After submit, the page shows a "Decision record" block and `<script type="application/json" id="kyc-decision">`, and broadcasts `wealth.onboardingStatus` so the CRM WorkHQ card updates.
