# DRE Portal — Live URLs and Access

## Internal Portal

Accessible via Cloudflare Access SSO (email domain: germainebrown.com, yahoo.com).

| Page | URL | Notes |
|------|-----|-------|
| Home | https://internal.debtrecoveryexperts.com/ | Landing with nav cards |
| Claims Dashboard | https://internal.debtrecoveryexperts.com/dre-dashboard.html | Case management |
| Case Aging | https://internal.debtrecoveryexperts.com/dre-case-aging.html | Aging analysis |
| Letter Queue | https://internal.debtrecoveryexperts.com/letter-queue.html | Draft/approve/send letters |
| Inbox | https://internal.debtrecoveryexperts.com/inbox.html | Incoming mail viewer |
| Analytics | https://internal.debtrecoveryexperts.com/dre-analytics.html | AI scores + metrics |
| Client View | https://internal.debtrecoveryexperts.com/dre-client-dashboard.html | Client reference (light theme) |

## Public Portal

| Page | URL | Notes |
|------|-----|-------|
| Claim Submission | https://portal.debtrecoveryexperts.com/ | New client intake |
| Login | https://portal.debtrecoveryexperts.com/login.html | SSO via Cloudflare Access |

## CRM

| Page | URL | Notes |
|------|-----|-------|
| TwentyCRM | https://crm.debtrecoveryexperts.com/ | Full CRM via Cloudflare Access |

## Tech Stack

- **Server:** Core (netcup KVM, 152.53.192.33)
- **Web server:** Caddy (reverse proxy + file server)
- **Internal pages:** /var/www/internal/ (dark theme, persistent nav)
- **CRM:** Docker Compose (TwentyCRM server + worker + PostgreSQL + Redis)
- **Email data:** /var/www/internal/data/dre-mails.json (polled every 60s)

## File structure

```
/var/www/
├── internal/           ← DRE internal portal pages
│   ├── index.html
│   ├── dre-dashboard.html
│   ├── dre-case-aging.html
│   ├── letter-queue.html
│   ├── inbox.html
│   ├── dre-analytics.html
│   ├── dre-client-dashboard.html
│   └── data/
│       └── dre-mails.json    ← Generated by IMAP poller
├── capabilities/       ← Public-facing portal
│   ├── debt-recovery.html
│   └── login.html
└── static/             ← Shared assets
    └── shonuff-signature.svg
```

## Nav structure (all internal pages)

Home, Claims, Aging, Letters, Inbox, Analytics

The nav is identical on every page (only the active link changes). Dark theme pages use `class="nav-link"` with amber active state. The client dashboard is light themed.

## Caddy config

```caddy
internal.debtrecoveryexperts.com {
    root * /var/www/internal
    try_files {path} {path}.html /index.html
    file_server
}

portal.debtrecoveryexperts.com {
    handle /api/* {
        reverse_proxy 127.0.0.1:3001  # TwentyCRM
    }
    root * /var/www/capabilities
    try_files {path} {path}.html /index.html
    file_server
}

crm.debtrecoveryexperts.com {
    reverse_proxy 127.0.0.1:3001  # TwentyCRM
}
```
