{"id":29016538,"url":"https://github.com/memgraph/sng-demo","last_synced_at":"2025-06-25T22:30:36.588Z","repository":{"id":46113253,"uuid":"291754157","full_name":"memgraph/sng-demo","owner":"memgraph","description":"A Flask web application that displays a social network graph stored in Memgraph DB.","archived":false,"fork":false,"pushed_at":"2023-05-16T09:27:39.000Z","size":145,"stargazers_count":7,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-05-16T10:35:37.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/memgraph.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}},"created_at":"2020-08-31T15:33:01.000Z","updated_at":"2023-05-16T10:35:37.885Z","dependencies_parsed_at":"2022-08-20T14:00:50.555Z","dependency_job_id":null,"html_url":"https://github.com/memgraph/sng-demo","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/memgraph/sng-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fsng-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fsng-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fsng-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fsng-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memgraph","download_url":"https://codeload.github.com/memgraph/sng-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memgraph%2Fsng-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261962058,"owners_count":23236862,"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","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":[],"created_at":"2025-06-25T22:30:35.700Z","updated_at":"2025-06-25T22:30:36.547Z","avatar_url":"https://github.com/memgraph.png","language":"Python","readme":"# Social Network Graph Demo\n\n\nWhen you think about a web application, a graph database doesn’t usually spring to mind. Instead, most people just take the familiar route of using an SQL database to store information. While this is perfectly acceptable for most use cases there are sometimes those that would see tremendous benefits by using a graph database.\nIn this tutorial, I will show you how to make a basic web application using Flask that stores all of its information in a graph database. To be more precise we are using Memgraph DB, an in-memory database that can easily handle a lot of information and perform read/write instructions quite quickly.\u003cbr /\u003e\u003cbr /\u003e\nOur use case is a Social Network Graph (in the code referred to as **SNG** for convenience) representing users and the connections between them. Usually, such a graph would contain millions of nodes and edges and the algorithms that are performed on them don’t do well with data being stored in relational databases.\u003cbr /\u003e\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://github.com/g-despot/images/blob/master/sng_demo_screenshot.png?raw=true\" alt=\"Data Model\" width=\"900\"/\u003e\n\u003cp/\u003e\n\n## Start the app\n\nHere are the instructions on how to build and start the app:\n\n```\ndocker-compose build\ndocker-compose up\n```\n\nOnce the app is up, head over to the `localhost:5000` to see the demo.\n\nTo learn how we built the demo, read  our [blog post](https://memgraph.com/blog/how-to-visualize-a-social-network-in-python-with-a-graph-database).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fsng-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemgraph%2Fsng-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemgraph%2Fsng-demo/lists"}