Daily notes become a pre-visit summary bounded by a sharing scope the patient sets. Roles are separated in the database, not only in the interface — a patient account cannot escalate itself to doctor, and fields marked private are never sent to the doctor browser. Risk-keyword detection runs rule-based on the front end, so it still works when the AI call fails. The AI proxy enforces allowed origins, request-size and input-length caps, per-IP rate limits and upstream timeouts.