> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drdj.me/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Extension

> Manifest V3 extension used to sync WhatsApp contacts and workflows into DealDash.

Implementation root: `/whatsapp-extension-react`.

## Responsibilities

* capture contact/chat context from WhatsApp Web
* sync selected data into DealDash backend
* support auth-aware interactions with DealDash APIs

## High-Risk Areas

* auth token propagation and refresh behavior
* permissions declared in `public/manifest.json`
* message/contact parsing assumptions from WhatsApp DOM

## Auth Persistence

WhatsApp extension auth is intentionally sticky. It should stay stored across
browser restart, WhatsApp reload, DealDash refresh, and temporary DealDash
localStorage hydration gaps. The DealDash content script must not clear
extension auth only because localStorage is briefly empty. Auth clears only
after explicit website logout through the same-origin
`DEALDASH_EXTENSION_LOGOUT` event or explicit logout from inside the extension.

## Change Workflow

```bash theme={null}
cd /whatsapp-extension-react
pnpm install
pnpm dev
pnpm build
```

## Validation

* extension builds without errors
* auth flow works with target backend
* contact sync does not duplicate or corrupt records
* permission set remains minimal
