External Resource Link
Data Entity
Description
Organization-configured external URLs surfaced in the mobile app's Home & Navigation area, allowing each tenant to expose curated resources (training materials, portals, policy docs, etc.) to peer mentors and coordinators.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Primary key, generated at record creation | PKrequiredunique |
organization_id |
uuid |
FK to organizations — scopes this link to a single tenant | required |
title |
string |
Display label shown on the Resource Links Screen (e.g. 'HLF Member Portal') | required |
url |
string |
Fully-qualified external URL opened in the device browser or in-app WebView | required |
description |
text |
Optional short description shown as subtitle on the link card | - |
icon_key |
string |
Optional design-token icon identifier (e.g. 'link', 'document', 'course') rendered next to the title | - |
target_roles |
json |
Array of roles that can see this link: 'peer_mentor', 'coordinator', or both. Empty array means all roles. | - |
display_order |
integer |
Sort position within the organization's link list; lower values appear first | required |
is_active |
boolean |
When false the link is hidden from mobile clients without being deleted | required |
open_in_app |
boolean |
When true the URL opens in an in-app WebView; when false it opens the device's default browser | required |
created_by |
uuid |
FK to users — the org admin who created this link | required |
created_at |
datetime |
UTC timestamp of record creation | required |
updated_at |
datetime |
UTC timestamp of last modification | required |
Database Indexes
idx_external_resource_links_org_id
Columns: organization_id
idx_external_resource_links_org_order
Columns: organization_id, display_order
idx_external_resource_links_active
Columns: organization_id, is_active
Validation Rules
url_scheme_required
error
Validation failed
url_max_length
error
Validation failed
title_required_non_empty
error
Validation failed
display_order_non_negative
error
Validation failed
target_roles_valid_values
error
Validation failed
Business Rules
tenant_isolation
All queries must filter by organization_id derived from the authenticated user's session. A user from org A must never see links belonging to org B.
org_admin_only_writes
Create, update, and delete operations are restricted to users with an Organization Administrator role for the owning organization. Peer Mentors and Coordinators are read-only consumers.
role_visibility_filter
When target_roles is non-empty, the mobile client filters the list to only links whose target_roles contains the current user's active role. An empty target_roles array means the link is visible to all roles.
active_only_served_to_mobile
The mobile app's read endpoint only returns records where is_active = true. Inactive records remain visible in the admin UI for reactivation.
display_order_resequence
On delete, remaining records for the same organization_id are resequenced by display_order to avoid gaps. This prevents undefined ordering behavior in the mobile list.
offline_cache_sync
The mobile client caches the active link list in its local Drift database during sync so that links remain visible offline. Cache is refreshed on every successful background sync.