# Next.js mortgage chat — development docs

Plan for a **customer-facing Next.js app**: chat about **mortgage protection**, watch an **ApplicantProfile** fill in from the mortgage dataset, and walk **steps 0–11** from the mortgage process guide.

Grounding sources (do not rewrite them here):

- Dataset: `html/vertical-datasets/dataset-mortgage-protection.html`
- Process: `html/vertical-processes/process-mortgage-protection.html`
- Communication RAG: `data/knowledge/mortgage/` (and BMI/health stores only when those steps run)
- Process/dataset RAG: `data/verticals/mortgage/`
- Chat model: **gpt-4o-mini**

This folder is **plan only**. Application code is not in `dev_doc/`.

## Documents

| File | Contents |
|------|----------|
| [01-product-overview.md](./01-product-overview.md) | Goals, users, sale-complete definition, non-goals |
| [02-nextjs-architecture.md](./02-nextjs-architecture.md) | App Router layout, API routes, env |
| [03-applicant-profile.md](./03-applicant-profile.md) | Profile schema mapped to the dataset fields |
| [04-process-flow.md](./04-process-flow.md) | Steps 0–11, gates, UI stepper |
| [05-rag-and-gpt4o-mini.md](./05-rag-and-gpt4o-mini.md) | Which vector store per step, prompt, extraction |
| [06-ui-screens.md](./06-ui-screens.md) | Chat + profile + journey layout |
| [07-implementation-plan.md](./07-implementation-plan.md) | Phased build and acceptance tests |
