Skip to content

Chirp (Twitter/X Clone)

Chirp (Twitter/X Clone)

Social media app with tweets, likes, rechirps, comments, following/followers, private accounts, and follow request management.

Database Tables

TablePurpose
phone_chirp_accountsUser profiles -- username, display_name, avatar, bio, verified, is_private, followers/following counts
phone_chirp_tweetsTweets -- content, media_url, likes/rechirps/replies counts
phone_chirp_likesLike relationships (tweet_id, account_id)
phone_chirp_followingFollow relationships (follower_id, following_id)
phone_chirp_commentsComments on tweets (tweet_id, account_id, content)
phone_chirp_rechirpsRechirps with optional comment/media (original_tweet_id, account_id, content, media_url)
phone_friend_requestsFollow requests for private accounts (type = 'chirp')
phone_social_notificationsSocial notifications for rechirps and follow events

Server Callbacks

CallbackPurpose
gcphone:chirp:getAccountReturns the caller's Chirp account
gcphone:chirp:createAccountCreates a new Chirp account with a unique username
gcphone:chirp:updateAccountToggles the account's private mode
gcphone:chirp:getTweetsFetches tweets with tab filter (forYou, following, myActivity), pagination
gcphone:chirp:publishTweetPublishes a new tweet
gcphone:chirp:toggleLikeLikes or unlikes a tweet
gcphone:chirp:toggleRechirpRechirps or un-rechirps a tweet (optional comment)
gcphone:chirp:getCommentsGets comments for a tweet
gcphone:chirp:addCommentAdds a comment to a tweet
gcphone:chirp:deleteCommentDeletes own comment
gcphone:chirp:deleteTweetDeletes own tweet
gcphone:chirp:followFollow/unfollow a user (handles private account requests)
gcphone:chirp:getPendingFollowRequestsGets incoming follow requests
gcphone:chirp:getSentFollowRequestsGets outgoing follow requests
gcphone:chirp:respondFollowRequestAccept or reject a follow request
gcphone:chirp:cancelFollowRequestCancel a sent follow request
gcphone:chirp:getProfileGets a user's profile, tweets, and relationship status

Config Options

lua
Config.Chirp = {
    MaxTweetLength  = 280,
    MaxTweetsPerDay = 100,
    AllowMedia      = true,
}

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

Config.Security.RateLimits.chirp = 1400

Exports

None.

Released under GPL-3.0 License