Giter Club home page Giter Club logo

graph-vl's Introduction

graph-vl

Self hosted identity verification layer with GraphQL.

Introduction

graph-vl is the verification layer of verifid developed with GraphQL. It's the secondary core project other than VL that is responsible from verifying identity cards or passports. Basically it's a self hosted API which has 3 main endpoints. It runs on either Docker or Kubernetes as a container. All endpoints are documented using GraphiQL and project relies on VerifID and other Open Source Python modules.

For storage, it uses Postgres as a database and SQLAlchemy as an object relational mapper. To make it simple DB has only two tables which is enough for this project.

There is only four steps to veriy an identity of a person which you can find those steps below.

  1. Create a user with personal details
  2. Upload user's selfie photo
  3. Take a photo of front page of identity card or passport, then upload
  4. Call verify endpoint and get the result

Requirements

  • Python 3.6+
  • Postgres
  • Run time dependencies requirements.txt
  • Test dependencies requirements.testing.txt

Usage

You need a Postgres instance in your machine our a Docker container that runs database. To pull docker image and start a container

docker pull postgres:11.5
docker run --name postgres -e POSTGRES_SERVER=localhost \
    -e POSTGRES_USER=postgres \
    -e POSTGRES_PASSWORD=postgres \
    -e POSTGRES_DB=postgres \
    -d -p 5432:5432 postgres:11.5
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres
# We will use this IP address when we build or run graph-vl

To run the graph-vl server, please execute the following commands from the root directory

docker build --build-arg PG_SERVER=${POSTGRES_IP_ADDRESS} \
    --build-arg PG_USER=postgres \
    --build-arg PG_PASSWORD=postgres \
    --build-arg PG_DB=postgres \
    -t graphvl .
docker run --rm -it -d -p 8000:8000 --name graph-vl graphvl:latest

For running in a cluster with Kubernetes you can follow the commands below

# Use Docker for minikube
eval $(minikube docker-env)
# Re-build the docker images

# Create developments and pods
kubectl create -f deployment-postgres.yml
kubectl create -f deployment-graphvl.yml

# Create services
kubectl create -f service-postgres.yml
kubectl create -f service-graphvl.yml

# Get url for **graphvl**
minikube service graphvl --url

Interface

image_expolorer image_queries image_mutations

If you run with uvicorn graphvl.main:app after cloning the project all endpoints will be available available on http://127.0.0.1:8000

graph-vl's People

Contributors

abdullahselek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.