Fbclone -

The ability to send, accept, decline, or cancel friend requests, establishing a bi-directional social graph.

When an average user publishes a post, use to push the post ID into the Redis timelines of their active friends. fbclone

To achieve a "Facebook-like" experience, the system must support: The ability to send, accept, decline, or cancel

CREATE TABLE friendships ( user_id INT REFERENCES users(id), friend_id INT REFERENCES users(id), status VARCHAR(20) CHECK (status IN ('pending', 'accepted', 'blocked')), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (user_id, friend_id) ); Use code with caution. The ability to send