# Brightbank soda purchase-journey study

**A complete fictional example using 10,000,000 synthetic consumers, eight journeys, and six price points.** No real ads ran, purchases occurred, or consumer data was collected.

[Read the results](RESULTS.md) · [Input assumptions](assumptions.md) · [Browser test record](browser-test.md) · [Machine-readable checks](test-receipt.json)

<img src="assets/instagram-ad.png" width="380" alt="Fictional Brightbank orange and vanilla cane sugar soda Instagram creative">

## Open it in the application

1. Follow the repository's local setup instructions and open the app.
2. Open **Model record → Reproduce & export**.
3. Choose **Open completed example** to inspect the frozen 10M run, or **Load Brightbank inputs** to edit and rerun it.
4. **Creative, mockups & study files** opens the example's visual index.

You can also import [configuration.json](configuration.json), [journey-run.json](journey-run.json), [price-configuration.json](price-configuration.json), or [price-run.json](price-run.json) through **Model record → Import configuration or run**. Configuration imports load editable inputs; run imports show frozen results. A frozen result does not replace the currently editable inputs.

## Reproduce the experiment

From the repository root:

```sh
npm ci
npm run example:brightbank
```

This rebuilds the engine fixture and supplied HTML, evaluates 10M IDs across eight journeys and another 10M across six prices, validates the outputs, and rewrites results, individual records, CSV, hashes and execution receipt. Timings and dates change; numerical outcomes should reproduce on the same engine. No paid API is used. The committed ad and PDF are input assets and are not regenerated by this command.

To verify the committed package without overwriting it, run `npm run test:brightbank`. Add `-- --full` to recompute all eight journeys and six prices and compare every numerical output to the published JSON. The faster default checks asset hashes, JSON schemas, mockup script syntax, required card-flow fields and all 57 individual records.

For the complete local source-storage workflow, initialize local D1 and start `npm run dev` as described in the main README, then run:

```sh
npm run example:brightbank -- --api http://localhost:5174
```

This uploads 27 fictional evidence files, checks the image/PDF bytes on readback, saves a study, runs the experiment, saves the complete result and checks it again. It uses the starter's **local test identity only** and refuses non-loopback hosts. Open **Connections → Sign in with ChatGPT**, then **Saved work → Brightbank soda · complete purchase journey** to inspect those attached sources in the browser. Each invocation creates new local example records.

To prepare the owned study without recomputing results:

```sh
npm run example:brightbank -- --api http://localhost:5174 --prepare-only
```

## What is included

| File | Purpose |
|---|---|
| `assets/instagram-ad.png` | Finished fictional Instagram creative, with no advertised price |
| `assets/*-prompt.txt` | Original image generation and price-removal edit prompts |
| `ad-copy.txt` | Platform, headline, body, CTA, sugar disclosure and creative context |
| `product-facts.pdf` | One-page complete product evidence, including nutrition and policies |
| `brightbank-*-pdp.html` | Eight product-page scenarios |
| `brightbank-*-cart.html` | Matching carts and offer disclosures |
| `brightbank-*-checkout.html` | Matching test-only checkout forms; no network submission |
| `configuration.json` / `journey-run.json` | Portable editable study and complete 10M results |
| `price-configuration.json` / `price-run.json` | Six-price editable experiment and complete results |
| `individual-records.json` | 57 real replayed model records, including buyers and abandonment |
| `journey-results.csv` | Funnel and economics table for analysis outside the app |
| `sensitivity.json` | Three explicitly labeled 200,000-ID assumption checks |
| `evidence-manifest.json` / `evidence-map.json` | Asset SHA-256 hashes and scenario-to-evidence mapping |
| `test-receipt.json` / `browser-test.md` | Automated assertions and observed browser workflow |

Portable JSON files deliberately contain no workspace-owned source IDs. Source files are attached by the local workflow above or by uploading them in the app. The manifest preserves the relationship between the public inputs and the evidence. All feature scores remain marked **manual**; no AI analysis receipts are fabricated.

## Reading the outcome

The model found that removing shipping increased orders while reducing contribution, and that showing shipping earlier reduced carts while improving completed purchases. These are useful demonstrations of why CTR, carts, orders and profit should be evaluated together. They are not evidence that the same effects occur in a real soda business.

The highest price tested is also the highest-contribution price in this model. The study did not find a continuous optimum or validate willingness to pay. The authored population has no separate sugar-avoidance or flavor-preference trait. See [assumptions.md](assumptions.md) before presenting these numbers.
