{"id":16337227,"url":"https://github.com/gvolpe/social-graph-api","last_synced_at":"2025-07-30T01:18:24.476Z","repository":{"id":27897731,"uuid":"31389359","full_name":"gvolpe/social-graph-api","owner":"gvolpe","description":"Authentication \u0026 Social Graph API built on top of Redis, Neo4J and Play!","archived":false,"fork":false,"pushed_at":"2015-07-10T13:10:27.000Z","size":1376,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-24T21:06:45.148Z","etag":null,"topics":["anorm-cypher","graphdb","neo4j","playframework","redis","silhouette"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"JiaoPaner/WeiboSpider","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gvolpe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-26T21:19:34.000Z","updated_at":"2021-08-24T12:28:32.000Z","dependencies_parsed_at":"2022-09-01T10:21:42.596Z","dependency_job_id":null,"html_url":"https://github.com/gvolpe/social-graph-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gvolpe/social-graph-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvolpe%2Fsocial-graph-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvolpe%2Fsocial-graph-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvolpe%2Fsocial-graph-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvolpe%2Fsocial-graph-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gvolpe","download_url":"https://codeload.github.com/gvolpe/social-graph-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvolpe%2Fsocial-graph-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267791148,"owners_count":24144914,"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-07-29T02:00:12.549Z","response_time":2574,"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":["anorm-cypher","graphdb","neo4j","playframework","redis","silhouette"],"created_at":"2024-10-10T23:46:17.948Z","updated_at":"2025-07-30T01:18:24.441Z","avatar_url":"https://github.com/gvolpe.png","language":"Scala","readme":"social-graph-api\n================\n\n[![Build Status](https://travis-ci.org/gvolpe/social-graph-api.svg)](http://travis-ci.org/gvolpe/social-graph-api)\n[![Coverage Status](https://coveralls.io/repos/gvolpe/social-graph-api/badge.svg)](https://coveralls.io/r/gvolpe/social-graph-api)\n[![Stories in Ready](https://badge.waffle.io/gvolpe/social-graph-api.svg?label=ready\u0026title=Ready)](http://waffle.io/gvolpe/social-graph-api)\n[![Codacy Badge](https://www.codacy.com/project/badge/f451c26222064b579c38a946d7c120c4)](https://www.codacy.com/public/volpegabriel/social-graph-api)\n[![Try at Heroku](https://img.shields.io/badge/try-social--graph--api-red.svg)](https://social-graph-api.herokuapp.com)\n\nThis is an open source Social Graph API licensed under the Apache 2 license, quoted below.\n\nContinuous Delivery: [![Codeship Status for gvolpe/social-graph-api](https://codeship.com/projects/0e48e1b0-a659-0132-6336-6e28cb00536c/status?branch=deploy)](https://codeship.com/projects/67002)\n\n## About the project\n\nSocial Graph API (SGA) was built on top of [Play! Framework](https://www.playframework.com/).\n\nYou can see a [live demo](https://social-graph-api.herokuapp.com) deployed at Heroku.\n\n## Authentication\n\nSGA uses [Silhouette](http://silhouette.mohiva.com/) with the JWTAuthenticator (Json Web Token) to secure the API.\nTo save the data of the authentication layer uses [Redis](http://redis.io).\n\n## Social Graph Store\n\nSGA uses [Neo4j](http://neo4j.com) as a graph store.\nAs a Scala client library uses [AnormCypher](http://anormcypher.org/).\n\n## Authentication API usage\n\n### Sign Up\nRequest:\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{ \"identifier\": \"gvolpe@github.com\", \"password\":\"123456\" }' https://\u003cHOST\u003e/auth/signup\n```\n\nResponses:\n* 200: Ok       --\u003e Sign up ok\n* 209: Conflict --\u003e User already exists\n\n### Sign In\n```\ncurl -X POST -H \"Content-Type: application/json\" -d '{ \"identifier\": \"gvolpe@github.com\", \"password\":\"123456\" }' https://\u003cHOST\u003e/auth/signup\n```\nResponses:\n* 200: Ok           --\u003e Sign in ok\n* 401: Unauthorized --\u003e Wrong user and/or password\n\nWhen Sign Up and/or Sign In http response code is 200 the response body is like this:\n```json\n{\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MjU1NDExMTEsInN1YiI6ImU5MmIyNDA1NTQ5YzUzZWM3NWExZWMyYWFjYTllZTViMGQ0MWFkNDNmZmJkOTk0YzQzMmEzY2E4ZjhmODhlM2FkN2RjMjhiZmUwOWE5NzEyNWU3Y2I0YzcxNGY3NzAzOGQxNGQxMzlkOWY4NmEyZGQxMDRkNjkwMmU3MTQ4YzdhIiwiaXNzIjoicGxheS1zaWxob3VldHRlIiwianRpIjoiYmE1ZDE5NDMxODY2MzY1NzJhMDgwNzhlNmYwYTZlOGJiOWFjOGJlNzFlMmI0N2Y1NmM1MjQzZjc1MTcyOTQyZmVkMzdlZTRjZWZiNTM0M2ZmYzlkZThlN2JkNjRlMzdkNDE5Mjk3NmM4ZjI0ZjJhNDA5ZTBiOTZhNTMyOTQ3NmM5YzU0NjRiODgxNjUzZWJmY2Q1MzNkN2QyMDIxMzVmODEzZjE1YTBmZTk3OTYzZjczZDYxMmM3ZjcwMTljODIzYzA0OTUzYTJkYjIzZWY0MmY2NzUzZDExN2EzN2QyZjJhMmE5YzAxYzgwZjkzNTUwZjBkZmY3ZGRmYmE0N2FlMiIsImlhdCI6MTQyNTQ5NzkxMX0.ySOKjDPhX2Ghw5ZvWq9A_1BlW2oLl12ncEjzMCY5-ow\",\n  \"expiresAt\": \"2015-03-05T04:38:31.795-03:00\"\n}\n```\n\n## Users API usage\n\n### Retrieve all the users\n\n#### GET /api/v1/users\nRequest:\n```\ncurl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://\u003cHOST\u003e/api/v1/users\n```\nResponse:\n```json\n[\n  {\n    \"id\": 5,\n    \"username\": \"foobar\",\n    \"email\": \"foobar@github.com\"\n  },\n  {\n    \"id\": 6,\n    \"username\": \"gvolpe\",\n    \"email\": \"gvolpe@github.com\"\n  },\n  ...\n]\n```\n\n### Retrieve user by Id\n\n#### GET /api/v1/users/{id}\nRequest:\n```\ncurl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://\u003cHOST\u003e/api/v1/users/6\n```\nResponse:\n```json\n{\n    \"id\": 6,\n    \"username\": \"gvolpe\",\n    \"email\": \"gvolpe@github.com\"\n}\n```\n\n### Create an user\n\n#### POST /api/v1/users\n```\ncurl -X POST -H 'X-Auth-Token:hash3d-t0k3n' -H \"Content-Type: application/json\" -d '{ \"username\": \"gvolpe\", \"email\": \"gvolpe@github.com\" }' https://\u003cHOST\u003e/api/v1/users\n```\n\n### Delete an user and his relationships\n\n#### DELETE /api/v1/users/{id}\n```\ncurl -X DELETE -H 'X-Auth-Token:hash3d-t0k3n' https://\u003cHOST\u003e/api/v1/users/3\n```\n\n## Social Graph API usage\n\n### Retrieve followers by Id\n\n#### GET /api/v1/followers/{id}\nRequest:\n```\ncurl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://\u003cHOST\u003e/api/v1/followers/4\n```\nResponse:\n```json\n[\n  {\n    \"id\": 5,\n    \"username\": \"foobar\",\n    \"email\": \"foobar@github.com\"\n  }\n]\n```\n\n### Retrieve friends (AKA following) by Id\n\n#### GET /api/v1/friends/{id}\nRequest:\n```\ncurl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://\u003cHOST\u003e/api/v1/friends/2\n```\nResponse:\n```json\n[\n  {\n    \"id\": 3,\n    \"username\": \"gvolpe\",\n    \"email\": \"gvolpe@github.com\"\n  }\n]\n```\n\n### Create a friendship\n\nIt creates a FRIEND relationship from A to B and a FOLLOWER relationship from B to A.\n\n#### POST /api/v1/friendship\n```\ncurl -X POST -H 'X-Auth-Token:hash3d-t0k3n' -H \"Content-Type: application/json\" -d '{ \"me\": 7, \"friend\": 3 }' https://\u003cHOST\u003e/api/v1/friendship\n```\n\n### Delete a friendship\n\nDelete FRIEND and FOLLOWER relationships between two users.\n\n#### DELETE /api/v1/friendship\n```\ncurl -X DELETE -H 'X-Auth-Token:hash3d-t0k3n' -H \"Content-Type: application/json\" -d '{ \"me\": 7, \"friend\": 3 }' https://\u003cHOST\u003e/api/v1/friendship\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this project except in compliance with\nthe License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific\nlanguage governing permissions and limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvolpe%2Fsocial-graph-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvolpe%2Fsocial-graph-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvolpe%2Fsocial-graph-api/lists"}