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

# Data model and the health-data boundary

> What lives where, and the lines code must not cross.

| Store | Holds | Never holds |
| - | - | - |
| **Base44** | Identity, clinics, roles, memberships, billing, appointments, the access log | Scan values, lab values |
| **Supabase** | Scan measurements and lab results, keyed by a random client code | Names, emails, contact details |

The client code is an HMAC of the user id. **Rotating `CLIENT_CODE_HMAC_KEY` orphans every existing scan,** so it is never rotated casually.

**Rules every change must follow**

* An identity-to-health join happens only in a backend function, and writes an AccessLog row.
* No health data in emails, notification text, calendar titles, Pipedrive, or analytics.
* A doctor's email never reaches a client-facing response.
* New entities hold no health values.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.