Skip to content

blockninjas/blockchain_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •