All Projects → gvolpe → social-graph-api

gvolpe / social-graph-api

Licence: other
Authentication & Social Graph API built on top of Redis, Neo4J and Play!

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to social-graph-api

Neo4j sips
Elixir driver for the Neo4j graph database server
Stars: ✭ 78 (+500%)
Mutual labels:  neo4j, graphdb
NeoClient
🦉 Lightweight OGM for Neo4j which support transactions and BOLT protocol.
Stars: ✭ 21 (+61.54%)
Mutual labels:  neo4j, graphdb
Neo4j
Graphs for Everyone
Stars: ✭ 9,582 (+73607.69%)
Mutual labels:  neo4j, graphdb
sqerzo
Tiny ORM for graph databases: Neo4j, RedisGraph, AWS Neptune or Gremlin
Stars: ✭ 28 (+115.38%)
Mutual labels:  neo4j, graphdb
Bolt sips
Neo4j driver for Elixir
Stars: ✭ 204 (+1469.23%)
Mutual labels:  neo4j, graphdb
nest-neo4j
A NestJS module for integrating with Neo4j
Stars: ✭ 54 (+315.38%)
Mutual labels:  neo4j
aioneo4j
asyncio client for neo4j
Stars: ✭ 29 (+123.08%)
Mutual labels:  neo4j
authorizer
Your data, your control. Fully open source, authentication and authorization. No lock-ins. Deployment in Railway in 120 seconds || Spin a docker image as a micro-service in your infra. Built in login page and Admin panel out of the box.
Stars: ✭ 770 (+5823.08%)
Mutual labels:  graphdb
nebula
A distributed, fast open-source graph database featuring horizontal scalability and high availability
Stars: ✭ 8,196 (+62946.15%)
Mutual labels:  graphdb
play-scala-log4j2-example
An example Play project using Log4J 2 as the logging engine
Stars: ✭ 14 (+7.69%)
Mutual labels:  playframework
play-json-extra
Play Json Extra extends Play Json with several opinionated features
Stars: ✭ 22 (+69.23%)
Mutual labels:  playframework
graphcountries
An easy to use GraphQL API to query country-related data for free and without restrictions
Stars: ✭ 61 (+369.23%)
Mutual labels:  neo4j
neo4j.cr
Pure-Crystal implementation of Neo4j's Bolt protocol
Stars: ✭ 29 (+123.08%)
Mutual labels:  neo4j
play-java-seed.g8
Play Java Seed template: use "sbt new playframework/play-java-seed.g8"
Stars: ✭ 20 (+53.85%)
Mutual labels:  playframework
spuf-314
a Web Application prototype for public transportation, serving a RESTful API to find Stations, Bus, Metro and Tramway's Lines, while also computing the best multimodal path between two stations or addresses
Stars: ✭ 22 (+69.23%)
Mutual labels:  neo4j
nean-stack-starter
neo4j, express, angular, node
Stars: ✭ 30 (+130.77%)
Mutual labels:  neo4j
bitnami-docker-neo4j
Bitnami Docker Image for Neo4j
Stars: ✭ 25 (+92.31%)
Mutual labels:  neo4j
family-tree
Family tree made with neo4j
Stars: ✭ 35 (+169.23%)
Mutual labels:  neo4j
twitter
Use the twitter streaming API and store tweets, users, ... in a NEO4J database
Stars: ✭ 26 (+100%)
Mutual labels:  neo4j
subscriptions-frontend
sites.google.com/a/guardian.co.uk/guardian-subscriptions/
Stars: ✭ 15 (+15.38%)
Mutual labels:  playframework

social-graph-api

Build Status Coverage Status Stories in Ready Codacy Badge Try at Heroku

This is an open source Social Graph API licensed under the Apache 2 license, quoted below.

Continuous Delivery: Codeship Status for gvolpe/social-graph-api

About the project

Social Graph API (SGA) was built on top of Play! Framework.

You can see a live demo deployed at Heroku.

Authentication

SGA uses Silhouette with the JWTAuthenticator (Json Web Token) to secure the API. To save the data of the authentication layer uses Redis.

Social Graph Store

SGA uses Neo4j as a graph store. As a Scala client library uses AnormCypher.

Authentication API usage

Sign Up

Request:

curl -X POST -H "Content-Type: application/json" -d '{ "identifier": "[email protected]", "password":"123456" }' https://<HOST>/auth/signup

Responses:

  • 200: Ok --> Sign up ok
  • 209: Conflict --> User already exists

Sign In

curl -X POST -H "Content-Type: application/json" -d '{ "identifier": "[email protected]", "password":"123456" }' https://<HOST>/auth/signup

Responses:

  • 200: Ok --> Sign in ok
  • 401: Unauthorized --> Wrong user and/or password

When Sign Up and/or Sign In http response code is 200 the response body is like this:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MjU1NDExMTEsInN1YiI6ImU5MmIyNDA1NTQ5YzUzZWM3NWExZWMyYWFjYTllZTViMGQ0MWFkNDNmZmJkOTk0YzQzMmEzY2E4ZjhmODhlM2FkN2RjMjhiZmUwOWE5NzEyNWU3Y2I0YzcxNGY3NzAzOGQxNGQxMzlkOWY4NmEyZGQxMDRkNjkwMmU3MTQ4YzdhIiwiaXNzIjoicGxheS1zaWxob3VldHRlIiwianRpIjoiYmE1ZDE5NDMxODY2MzY1NzJhMDgwNzhlNmYwYTZlOGJiOWFjOGJlNzFlMmI0N2Y1NmM1MjQzZjc1MTcyOTQyZmVkMzdlZTRjZWZiNTM0M2ZmYzlkZThlN2JkNjRlMzdkNDE5Mjk3NmM4ZjI0ZjJhNDA5ZTBiOTZhNTMyOTQ3NmM5YzU0NjRiODgxNjUzZWJmY2Q1MzNkN2QyMDIxMzVmODEzZjE1YTBmZTk3OTYzZjczZDYxMmM3ZjcwMTljODIzYzA0OTUzYTJkYjIzZWY0MmY2NzUzZDExN2EzN2QyZjJhMmE5YzAxYzgwZjkzNTUwZjBkZmY3ZGRmYmE0N2FlMiIsImlhdCI6MTQyNTQ5NzkxMX0.ySOKjDPhX2Ghw5ZvWq9A_1BlW2oLl12ncEjzMCY5-ow",
  "expiresAt": "2015-03-05T04:38:31.795-03:00"
}

Users API usage

Retrieve all the users

GET /api/v1/users

Request:

curl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://<HOST>/api/v1/users

Response:

[
  {
    "id": 5,
    "username": "foobar",
    "email": "[email protected]"
  },
  {
    "id": 6,
    "username": "gvolpe",
    "email": "[email protected]"
  },
  ...
]

Retrieve user by Id

GET /api/v1/users/{id}

Request:

curl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://<HOST>/api/v1/users/6

Response:

{
    "id": 6,
    "username": "gvolpe",
    "email": "[email protected]"
}

Create an user

POST /api/v1/users

curl -X POST -H 'X-Auth-Token:hash3d-t0k3n' -H "Content-Type: application/json" -d '{ "username": "gvolpe", "email": "[email protected]" }' https://<HOST>/api/v1/users

Delete an user and his relationships

DELETE /api/v1/users/{id}

curl -X DELETE -H 'X-Auth-Token:hash3d-t0k3n' https://<HOST>/api/v1/users/3

Social Graph API usage

Retrieve followers by Id

GET /api/v1/followers/{id}

Request:

curl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://<HOST>/api/v1/followers/4

Response:

[
  {
    "id": 5,
    "username": "foobar",
    "email": "[email protected]"
  }
]

Retrieve friends (AKA following) by Id

GET /api/v1/friends/{id}

Request:

curl -X GET -H 'X-Auth-Token:hash3d-t0k3n' https://<HOST>/api/v1/friends/2

Response:

[
  {
    "id": 3,
    "username": "gvolpe",
    "email": "[email protected]"
  }
]

Create a friendship

It creates a FRIEND relationship from A to B and a FOLLOWER relationship from B to A.

POST /api/v1/friendship

curl -X POST -H 'X-Auth-Token:hash3d-t0k3n' -H "Content-Type: application/json" -d '{ "me": 7, "friend": 3 }' https://<HOST>/api/v1/friendship

Delete a friendship

Delete FRIEND and FOLLOWER relationships between two users.

DELETE /api/v1/friendship

curl -X DELETE -H 'X-Auth-Token:hash3d-t0k3n' -H "Content-Type: application/json" -d '{ "me": 7, "friend": 3 }' https://<HOST>/api/v1/friendship

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].