Git Product home page Git Product logo

blockfrost-backend-ryo's Introduction


Blockfrost.io backend service

Blockfrost.io backend is an API service providing abstraction between you and Cardano blockchain data, taking away the burden of complexity, so you can focus on what really matters - developing your applications.

You can now Run-Your-Own.

Getting startedRunning your ownDeveloping📌 Roadmap


Getting started

The backend is Node.js app written in Typescript using Fastify. To run it you need Node.js version 16 and higher (LTS is highly recommended). Blockchain data are queried from cardano-db-sync. Follow their documentation to learn more about running your own instance.

Running your own

We made it simple to run your own version of the Blockfrost backend.

System requirements

The system requirements for the basic Blockfrost backend stack (which means blockfrost-backend, cardano-node, cardano-db-sync and postgresql on the same machine) are:

  • 64 GB of RAM or more
  • 8 CPU cores or more
  • 250 GB of disk space or more
  • SSD disk with at least 80k IOPS (measured as chunk size)

Configuration

There are several configuration files in config directory. Config file is picked based on a value in an environment variable NODE_ENV (value set in NODE_ENV must match the name of the config file). This environment variable is set automatically while running the backend via prepared yarn scripts.

Schema

{
  // Blockfrost backend settings
  server: {
    // Server port
    port: 3000,
    // Whether to enable verbose logging, when disabled only ERRORs are printed to a console
    debug: true,
    // Whether to expose /prometheus endpoint
    prometheusMetrics: false,
  },
  // Cardano DB Sync SQL connection
  dbSync: {
    host: 'cdbsync-dev.mydomain.com',
    user: 'username',
    database: 'password',
  },
  // Cardano network - mainnet, testnet, preview, preprod
  network: 'mainnet',
  // Path to token registry directory (see next section for more details)
  tokenRegistryUrl: 'https://tokens.cardano.org',
}
💡 All config variables can be also set via environment variables which take precedence over values from a config file.

These values are BLOCKFROST_CONFIG_SERVER_PORT, BLOCKFROST_CONFIG_SERVER_DEBUG, BLOCKFROST_CONFIG_SERVER_PROMETHEUS_METRICS, BLOCKFROST_CONFIG_DBSYNC_HOST, BLOCKFROST_CONFIG_DBSYNC_USER, BLOCKFROST_CONFIG_DBSYNC_DATABASE, BLOCKFROST_CONFIG_DBSYNC_MAX_CONN, BLOCKFROST_CONFIG_NETWORK, BLOCKFROST_CONFIG_TOKEN_REGISTRY_URL.

Token registry

Blockfrost Backend uses token registry to provide off-chain metadata for native assets (eg. number of decimals). The token registry operated by Cardano Foundation and hosted at https://tokens.cardano.org is used by default. You can use self-hosted registry by setting tokenRegistryUrl in the config file.

Docker

We are hosting latest release of this software on Dockerhub. To run it using Docker:

docker run --rm \
  --name blockfrost-ryo \
  -p 3000:3000 \
  -v ./config:/app/config \
  blockfrost/backend-ryo:latest

Nix

To start the Blockfrost backend under nix, just run:

$(nix-build -A blockfrost-backend --no-out-link)/bin/blockfrost-backend

Developing

This is an open-source project and anyone is welcome to contribute, please see CONTRIBUTING for more information.

blockfrost-backend-ryo's People

Contributors

1000101 avatar

Stargazers

Savvy 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.