# Figma links in Postman docs

Every request in **BEEB BEEB API** includes a **Figma screen** section in the Documentation tab:

- Screen name and SRS feature ID (`R-*` / `I-*`)
- Clickable Figma file link (with optional `node-id` deep link)
- Local PNG path under `ai helper/` when exported

## Configure real Figma URLs

1. Open your Figma file → **Share** → copy the design URL.
2. Add to `.env`:

```env
FIGMA_CLIENT_URL=https://www.figma.com/design/YOUR_FILE_KEY/BEEB-Rider-App
FIGMA_PROVIDER_URL=https://www.figma.com/design/YOUR_FILE_KEY/BEEB-Investor-Dashboard
```

3. Rebuild the collection:

```bash
php scripts/build-and-sync-postman.php
```

## Per-screen deep links (optional)

In `scripts/postman/figma-screens.php`, add `node_id` for a frame:

```php
'POST|client/register' => [
    'product' => 'client',
    'screen' => 'Phone entry (register)',
    'feature' => 'R-AUTH-03b',
    'node_id' => '1234:5678',  // from Figma → Copy link to selection
    'local' => 'ai helper/client/client- register flow.png',
],
```

Postman docs will link to `?node-id=1234-5678`.

## Edit screen mapping

| File | Role |
|------|------|
| `scripts/postman/figma-screens.php` | Screen registry (key = `METHOD\|path`) |
| `scripts/postman/helpers.php` | Injects Figma + fills missing examples |
| `ai helper/client/SCREENS.md` | Client app screen ↔ API cycle |

After API or Figma changes:

```bash
php scripts/build-and-sync-postman.php --sync
```
