Skip to content

Clips (TikTok-like)

Clips (TikTok-like)

Short video sharing app. Uses the Snap account system for identity but supports a separate clips_username stored in phone_numbers.

Database Tables

TablePurpose
phone_clips_postsVideo posts -- account_id, media_url, caption, likes
phone_clips_likesLike relationships (clip_id, account_id)
phone_clips_commentsComments on clips (clip_id, account_id, content)
phone_snap_accountsShared account system (used for identity)
phone_numbersRead -- clips_username column

Server Callbacks

CallbackPurpose
gcphone:clips:getFeedReturns the global clips feed with pagination
gcphone:clips:getMyClipsReturns the caller's own clips
gcphone:clips:publishPublishes a new video clip (requires clips_username and storage provider)
gcphone:clips:deletePostDeletes own clip
gcphone:clips:toggleLikeLikes or unlikes a clip (uses DB transaction for atomic counter)
gcphone:clips:getCommentsGets comments for a clip
gcphone:clips:addCommentAdds a comment
gcphone:clips:deleteCommentDeletes own comment

Config Options

lua
Config.Features.Clips = true

Config.PublishJobs.clips = {}  -- empty = everyone can post

Config.Security.RateLimits.clips = 1500

Config.Storage  -- storage provider must be configured for video uploads

Exports

None.

Released under GPL-3.0 License