Content Pages
Overview
This domain is a lightweight CMS for building content web pages — articles and landing pages — scoped to each LINE OA. It supports multiple languages, SEO and Open Graph metadata, access control (public token, password, or audience), and visitor statistics including UTM parameters.
The guiding design principle is separating content from the page itself: content_page
holds structure, status, and permissions, while the actual text lives in
content_page_translation, one row per language.
Core Data Structure
content_page (model ContentPage)
uuid(unique) andslugVARCHAR(255), jointly unique as(line_oa_id, slug)status(enumContentPageStatus) —draft/published/archived, plusversion- access control:
public_token(unique),require_auth,password_protected,password_hash - publishing metadata:
published_at/published_byandarchived_at/archived_by - statistics:
view_countandunique_view_count(BIGINT) - categorisation:
category_id→content_category.idandsubcategory_id→content_subcategory.id audience_idsJSONB — restricts which segments can see the page- friend tracking:
friend_track_campaign_id→friend_track_campaign.id(ON DELETE SET NULL) together withfriend_track_button_textfor the add-friend button - soft delete via
deleted_dateanddeleted_by
content_page_translation
Per-language content, unique on (content_page_id, language), with content_page_id as a
ON DELETE CASCADE foreign key.
- content:
title,content,excerpt - SEO:
meta_title,meta_description,meta_keywords,og_title,og_description,og_image_url,twitter_card
content_page_utm
A 1:1 companion to the page (content_page_id is unique) storing utm_source,
utm_medium, utm_campaign, utm_term, and utm_content.
content_page_analytics
Also 1:1 with the page, holding scripts and event configuration.
ga_eventsJSONB,fb_pixel_events,line_tag_events,custom_head_scripts,custom_body_scripts- toggles
enable_ga(default true),enable_fb_pixel,enable_line_tag
content_page_view
A per-visit log.
- visitor details:
viewer_ip,viewer_user_agent,viewer_referrer,viewer_line_uid - UTM values carried by the URL, plus
session_id,language,device_type,viewed_at - indexes on
(content_page_id),(session_id), and(viewed_at)
Related Files
prisma/schema.prisma:1013— modelContentPageprisma/schema.prisma:1079— modelContentPageTranslationprisma/schema.prisma:1112— modelContentPageUtmprisma/schema.prisma:1135— modelContentPageAnalyticsprisma/schema.prisma:1163— modelContentPageViewschema-dumps/2026-07-24/schema.sql:1338,:1437,:1482,:1375,:1521
Connections to Other Services
- cms-api-go — page management, translations, SEO and script configuration, publishing and archiving
- client-api-go — the public page: checks access by token, password, or audience,
renders the matching translation, writes a
content_page_viewrow, and increments counters
Related domains: Content Categories & Link Collections, Audience, Friend-source Tracking