Phase 5 — Frontend Interface¶
This section documents the user-facing interface and how each screen maps to backend/database operations.
1. Frontend Goals¶
The frontend is designed to be clear, fast, and task-oriented. Core goals:
- Simple CRUD flows for family and medical data
- Fast visibility into alerts and appointments
- Structured presentation of educational content
- Strong validation feedback before submission
2. Primary Screens and Data Flows¶
2.1 Dashboard¶
- Shows quick summaries for family members, open alerts, and upcoming appointments
- Read operations from
FamilyMember,RiskAlert, andAppointment
2.2 Family Members¶
- Create/update/delete family member records
- Uses
FamilyMemberwith owner scoping byuser_id
2.3 Medical Records¶
- Historical entries:
MedicalHistory - Event log entries:
HealthEvent - Supports joins to
HealthConditionfor readable condition names
2.4 Risk Alerts¶
- Displays
RiskAlertitems by member and status - Enables alert lifecycle updates (
New->Viewed->Resolved)
2.5 Clinics and Appointments¶
- Clinic browsing from
Clinic - Booking/updates in
Appointment - Form controls constrain status to schema ENUM values
2.6 Awareness Hub¶
- Content feed from
AwarenessContent - Supports sorting by recency/topic/type
3. Validation and UX Rules¶
- Required fields blocked until complete
- Date/time/email format checks on client side
- ENUM-constrained values rendered as dropdowns/selectors
- Friendly inline error messages tied to each field
- Confirmation prompts for destructive actions
4. Integration Pattern¶
UI interaction flow:
- User action in screen component
- Frontend sends API request to backend endpoint
- Backend validates and executes SQL
- DB constraints enforce integrity
- Response updates UI state
5. Accessibility and Responsiveness¶
- Works across desktop and mobile layouts
- Keyboard-focus visibility on controls
- High-contrast text and clear navigation labels
Frontend Outcome¶
The interface is aligned with backend endpoints and schema constraints, ensuring that user actions map cleanly to valid database operations.