Skip to content
Elixir HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
priv
test
.formatter.exs
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock
system-architecture.png

README.md

Blockchain API

Build Status License: GPL v3

The blockchain_api

  • leverages (bitcoin) blockchain data from a Postgres database that has been imported with our blockchain_analyzer tool,
  • and exposes the data as typed GraphQL API making it comfortable to query the blockchain data.

System Architecture

Running

To get the API up and running, a Postgres database has to be installed first. The database schema and the normalized data can then be automatically created and imported with our
blockchain_analyzer tool.

In order to provide proper access to the Postgres database, config/dev.exs has to parameterized with the respective database connection settings. When running in production, this should be done by using prod.secret.exs as explained in config/prod.exs.

Then, to finally start our Phoenix server and expose the GraphQL API:

  • Install dependencies with mix deps.get
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000/api/graphiql from your browser to open the interactive GraphQL in-browser IDE.

Ready to run in production? Please check the Phoenix deployment guides.

Static Code Analysis

We use Dialyzer, a static code analysis tool for Erlang, making it easier to find software discrepancies in our code base. It can be started as mix task via:

$ mix dialyzer

Furthermore, credo is used to improve code consistency which can also be started as mix task via:

$ mix credo

Testing

All tests can be executed as mix task via:

$ mix test 
You can’t perform that action at this time.