configuration PK: id 10 required 1 unique

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.

13
Attributes
3
Indexes
5
Validation Rules
6
CRUD Operations

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
btree

Columns: organization_id

idx_external_resource_links_org_order
btree

Columns: organization_id, display_order

idx_external_resource_links_active
btree

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
always

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
on_create

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
always

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
always

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

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
always

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.

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage