{"id":20340770,"url":"https://github.com/lipskiyp/social-network","last_synced_at":"2026-05-04T15:37:40.316Z","repository":{"id":187648040,"uuid":"677061338","full_name":"lipskiyp/social-network","owner":"lipskiyp","description":"CS50w Project 4: Django Social Network App","archived":false,"fork":false,"pushed_at":"2023-08-11T08:41:57.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T14:49:25.018Z","etag":null,"topics":["ajax","api","django","django-models","dom","html","javascript","python"],"latest_commit_sha":null,"homepage":"https://cs50.harvard.edu/web/2020/projects/4/network/","language":"Python","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/lipskiyp.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}},"created_at":"2023-08-10T16:36:58.000Z","updated_at":"2023-08-14T10:55:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"de9429d3-0fa3-4082-8f7a-387728382a26","html_url":"https://github.com/lipskiyp/social-network","commit_stats":null,"previous_names":["lipskiyp/socialnetwork","lipskiyp/social-network"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lipskiyp/social-network","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipskiyp%2Fsocial-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipskiyp%2Fsocial-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipskiyp%2Fsocial-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipskiyp%2Fsocial-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lipskiyp","download_url":"https://codeload.github.com/lipskiyp/social-network/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lipskiyp%2Fsocial-network/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269231105,"owners_count":24382300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"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":["ajax","api","django","django-models","dom","html","javascript","python"],"created_at":"2024-11-14T21:23:29.142Z","updated_at":"2026-05-04T15:37:40.255Z","avatar_url":"https://github.com/lipskiyp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Social Network\n\nCS50w Project 4: Django Social Network Website.\n\nDjango Twitter-like social network that lets users create, like and edit posts, follow/unfollow other users and visit other profiles. Designed from scratch, Python API lets users perform a range of CRUD operations on the database, including requesting posts, likes, followers and other information about the users and posts. Front-end is implemented with vanilla JavaScript and supports a range of AJAX requests to the server. All pages containing posts have dynamic pagination implemented with JavaScript and Boostrap. \n\n### Specification\n\u003chttps://cs50.harvard.edu/web/2020/projects/4/network/\u003e\n\n### Video Demo\n\u003chttps://youtu.be/GNuH7yANhZI\u003e\n\n### network/views.py\n\nContains views associated with each of the routes.\n\n### network/urls.py\n\nContains URL configuration for the app, including the API:\n\n* / - renders the main page that displays posts submitted by all users, in chronological order.\n* /login - renders the login page.\n* /logout - renders the logout page.\n* /register - renders the registration page.\n* profile/\u003cusername\u003e - renders the user's profile page. \n* /following - renders the page that displays all of the posts by users that the user follows, in chronological order.\n\n* /isfollowing/\u003cusername\u003e - returns json file with the isfollowing item set to True/False if the user follows the requested user.\n* /countfollowing/\u003cusername\u003e - returns json file with the following_count item set to the number of users that the requested user follows.\n* /countfollowers/\u003cusername\u003e - returns json file with the followers_count item set to the number of users that follow the requested user.\n* /follow/\u003cusername\u003e - submits a POST request for the user to follow the requested user (if not already).\n* /unfollow/\u003cusername\u003e - submits a POST request for the user to unfollow the requested user (if not already).\n    \n* /countlikes/\u003cpost_id\u003e - returns json file with the likes_count item set to the number of likes for the requested post.\n* /isliked/\u003cpost_id\u003e - returns json file with the liked item set to True/False if the user has liked the requested post.\n* /like/\u003cpost_id\u003e - submits a POST request for the user to like the requested post (if not already).\n* /unlike/\u003cpost_id\u003e - submits a POST request for the user to unlike the requested post (if not already).\n\n* /iscreator/\u003cpost_id\u003e - returns json file with the iscreator item set to True/False if the user is the creator of the requested post.\n* /posts - returns query set with posts. Accepts key value pairs: username (will return all posts by the user, if not provided, all posts by all users), start (first post index) and end (last post index). \n* /posts/following - returns query set with the posts by all users that the user follows. Accepts key value pairs: start (first post index) and end (last post index). \n* /countposts - returns json file with the posts_count item set to the number of posts. Accepts key value pairs: username (will return number of posts by the user, if not provided, number of all posts by all users)\n* /countposts/following - returns json file with the posts_count item set to the number of posts by the users that the user follows.\n* /newpost - submits a POST request to create a new post, with the post text inside request body. \n* /postedit/\u003cpost_id\u003e - submits a POST request to edit the requested post (only if the user is a creator of the post). \n\n### network/models.py\n\nContains Django models that define the structure for the stored data:\n\n* User - contains all user information.\n* Post - contain all post information.\n* Follower - contains following pairs.\n* Like - contains users' likes. \n\n### network/static/network \n\n* API.js - front-end API for AJAX requests to the back-end API.\n* createElements.js - framework to generate html elements for posts, liked/unfollow buttons etc.\n* edit.js - framework to edit posts. \n* follow.js - framework to follow/unfollow other users.\n* following.js - front-end framework for '/following' page, that loads posts, pagination etc.\n* getCookies.js - collects csrftoken from the templates for POST requests that require csrf key.\n* index.js - front-end framework for the main page, that loads posts, pagination etc.\n* likes.js - framework to add/remove likes from the posts.\n* posts.js - framework that loads users' posts on to the page.\n* profile.js - front-end framework for the user profile page, that loads posts, pagination etc.\n\n### network/templates/network \n\n* following.html - template for the page that displays all posts by users that the user follows.\n* index.html - template for the main page that displays all posts.\n* layout.html - layout template for all pages that includes the navigation bar. \n* login.html - template for login menu.\n* profile.hrml - template for user profile page. \n* register.html - template for registration menu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flipskiyp%2Fsocial-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flipskiyp%2Fsocial-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flipskiyp%2Fsocial-network/lists"}