configuration PK: id 11 required 1 unique

Description

Stores frequently asked questions with categorized, searchable content served to mobile app users. Items are scoped by product and optionally by user role, supporting expand/collapse display and client-side filtering with server-side search fallback.

14
Attributes
5
Indexes
8
Validation Rules
7
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Unique identifier for the FAQ item
PKrequiredunique
question text The FAQ question text displayed to users
required
answer text The FAQ answer content, supports markdown formatting for rich display
required
category string Grouping category for FAQ items (e.g., activity-registration, expenses, notifications)
required
product enum Which product this FAQ item applies to
required
target_role enum Optional role filter — when set, FAQ item is only shown to users with this role. Null means visible to all roles.
-
sort_order integer Display order within category, lower values appear first
required
is_published boolean Whether the FAQ item is visible to end users. Unpublished items are drafts.
required
language string ISO 639-1 language code for the FAQ content (e.g., nb for Norwegian Bokmål, en for English, se for Northern Sami)
required
tags json Array of keyword tags for search indexing and filtering
-
created_by uuid User ID of the admin who created this FAQ item
required
updated_by uuid User ID of the admin who last updated this FAQ item
-
created_at datetime Timestamp when the FAQ item was created
required
updated_at datetime Timestamp when the FAQ item was last modified
required

Database Indexes

idx_faq_items_product_category
btree

Columns: product, category, sort_order

idx_faq_items_product_published
btree

Columns: product, is_published

idx_faq_items_target_role
btree

Columns: target_role

idx_faq_items_language
btree

Columns: language

idx_faq_items_question_answer_fts
gin

Columns: question, answer

Validation Rules

question_not_empty error

Validation failed

answer_not_empty error

Validation failed

valid_product_enum error

Validation failed

valid_target_role_enum error

Validation failed

valid_language_code error

Validation failed

sort_order_non_negative error

Validation failed

tags_array_format error

Validation failed

created_by_valid_admin error

Validation failed

Business Rules

product_scoped_display
always

FAQ items are filtered by product context — mobile app users only see items with product='meander-mobile-app'

Enforced by: FAQ ServiceFAQ Store
role_based_visibility
always

When target_role is set, FAQ items are only returned to users whose active role matches. Null target_role means visible to all authenticated users of that product.

Enforced by: FAQ Service
only_published_visible
always

End users only see FAQ items where is_published is true. Unpublished items are only visible in admin management interfaces.

Enforced by: FAQ ServiceFAQ Store
category_sort_order
always

FAQ items within the same category are displayed in ascending sort_order. Items with equal sort_order are ordered by created_at descending.

Enforced by: FAQ ScreenFAQ Service
offline_cache_freshness
always

FAQ items are cached locally on the mobile device for offline access. Cache is refreshed on app launch when connectivity is available, using last sync timestamp to fetch only updated items.

search_fallback_strategy
always

Client-side search is used first over the local cached dataset. When the local dataset exceeds the size threshold or search yields no results, the service falls back to server-side full-text search via REST API.

Enforced by: FAQ ServiceFAQ Store

CRUD Operations

create allowed
update allowed
delete allowed

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage