{"id":51033143,"url":"https://github.com/marinaa13/social-network-simulator","last_synced_at":"2026-06-22T02:33:22.557Z","repository":{"id":319561388,"uuid":"1079024057","full_name":"marinaa13/social-network-simulator","owner":"marinaa13","description":"C implementation of a mini social media platform with user management, post/repost systems, feeds, and graph-based friend interactions","archived":false,"fork":false,"pushed_at":"2025-10-18T23:34:03.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-19T13:54:14.801Z","etag":null,"topics":["c","data-structures","graphs","linked-lists","social-network","trees"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marinaa13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-18T23:31:15.000Z","updated_at":"2025-10-18T23:35:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"124cf7eb-cb29-4c39-affd-b6b66a7f3ced","html_url":"https://github.com/marinaa13/social-network-simulator","commit_stats":null,"previous_names":["marinaa13/social-network-simulator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/marinaa13/social-network-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinaa13%2Fsocial-network-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinaa13%2Fsocial-network-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinaa13%2Fsocial-network-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinaa13%2Fsocial-network-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marinaa13","download_url":"https://codeload.github.com/marinaa13/social-network-simulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinaa13%2Fsocial-network-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34632718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","data-structures","graphs","linked-lists","social-network","trees"],"created_at":"2026-06-22T02:33:17.087Z","updated_at":"2026-06-22T02:33:22.549Z","avatar_url":"https://github.com/marinaa13.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Social Network Simulator\r\n\r\nA social media simulation implemented in **C**, combining user management, friendship graphs, post/repost systems, and user feed generation.  \r\nThe program integrates graph traversal, BFS algorithms, and data structures such as linked lists and trees to emulate core social platform features.\r\n\r\n---\r\n\r\n## Overview\r\n\r\nThe project models a simplified social network divided into three main components:\r\n\r\n1. **Users and Friends** – manages connections between accounts  \r\n2. **Posts and Reposts** – handles content creation and interaction  \r\n3. **Social Media Integration** – combines both systems for feed and profile simulation  \r\n\r\nEach command follows a consistent structure:\r\n- Parse input arguments  \r\n- Execute the corresponding operation  \r\n- Print results or success messages  \r\n\r\n---\r\n\r\n## Features\r\n\r\n### 1. Users and Friends\r\nImplements the social graph using an **adjacency matrix**.  \r\nSupports:\r\n- Adding or removing friends  \r\n- Computing shortest distance between two users (via BFS)  \r\n- Suggesting friends of friends  \r\n- Finding common friends  \r\n- Counting friends per user  \r\n- Determining the most popular account  \r\n\r\nKey functions:\r\n- `add_friend()`, `remove_friend()`  \r\n- `distance_friend()` — uses BFS for shortest path  \r\n- `suggestions_friend()` — finds second-degree connections  \r\n- `common_people()` — intersection of friend lists  \r\n- `friends()` — counts user connections  \r\n- `influencer()` — finds the account with most friends  \r\n\r\n---\r\n\r\n### 2. Posts and Reposts\r\nImplements user-generated content using:\r\n- A **doubly linked list** for posts  \r\n- A **tree structure** for reposts  \r\n\r\nSupports:\r\n- Creating and deleting posts  \r\n- Reposting existing content  \r\n- Liking and unliking posts  \r\n- Computing ratios between posts and reposts  \r\n- Viewing repost trees and like counts  \r\n\r\nKey algorithms:\r\n- Tree traversal for reposts  \r\n- Parent tracking for common repost origins  \r\n- Array-based like tracking per post  \r\n\r\n---\r\n\r\n### 3. Social Media Integration\r\nCombines both modules into a unified simulation of:\r\n- **User feed** — retrieves most recent posts by user and friends  \r\n- **Profile view** — shows a user’s posts in chronological order  \r\n- **Friends that reposted** — lists a user’s friends who reposted a given post  \r\n- **Clique detection** — finds maximal cliques using the **Bron–Kerbosch algorithm**  \r\n\r\nThe recursive Bron–Kerbosch algorithm computes all maximal friend groups, using sets:\r\n- `R` — current clique  \r\n- `P` — potential candidates  \r\n- `X` — excluded vertices  \r\n\r\n---\r\n\r\n## Example Commands\r\n\r\n```\r\nadd_friend user1 user2\r\nremove_friend user3 user4\r\ncreate_post user1 \"Hello world!\"\r\nrepost user2 3\r\nlike user3 3\r\nfeed user1 5\r\nview_profile user2\r\nfriends_that_reposted user1 3\r\nbk\r\n```\r\n---\r\n## Learning Outcomes\r\n- Applied advanced data structures (graphs, lists, trees)  \r\n- Implemented BFS and Bron–Kerbosch graph algorithms  \r\n- Managed dynamic memory safely in complex interlinked structures  \r\n- Simulated realistic interactions between users and posts in C  \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarinaa13%2Fsocial-network-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarinaa13%2Fsocial-network-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarinaa13%2Fsocial-network-simulator/lists"}