Coder Social home page Coder Social logo

johnykes / mx-api-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from multiversx/mx-api-service

0.0 0.0 0.0 11.09 MB

Unified REST API facade for providing data related to the MultiversX blockchain

Home Page: https://api.multiversx.com

License: GNU General Public License v3.0

JavaScript 0.05% TypeScript 99.48% HTML 0.47%

mx-api-service's Introduction

Unified REST API facade for providing data related to the Multiversx blockchain.

Quick start

  1. Run npm install in the project directory
  2. Optionally make edits to config.yaml or create config.custom.yaml
  3. Run npm run init in the project directory (to create default plugins structure)

Dependencies

  1. Redis Server is required to be installed docs.
  2. MySQL Server is required to be installed docs. This can be avoided by adding in the config file the following: database.enabled: false.
  3. MongoDB Server is required to be installed docs. This can be avoided by adding in the config file the following: database.enabled: false.
  4. ffmpeg is required to be installed docs.

You can use docker-compose up in a separate terminal to use a local docker container for all these dependencies.

After running the sample, you can stop the Docker container with docker-compose down

Available Scripts

This is an Multiversx project built on Nest.js framework.

npm run start:prod

โ€‹ Runs the app in the production mode. Make requests to http://localhost:3001.

Running the app

# development watch mode
$ npm run start:watch

# development debug mode
$ npm run start:debug

# development mode
$ npm run start:dev

# production mode
$ npm run start:prod

Requests can be made to http://localhost:4001. The app will reload when you'll make edits (if opened in watch mode). You will also see any lint errors in the console.โ€‹

npm run test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

It depends on the following external systems:

It uses on the following internal systems:

  • redis: used to cache various data, for performance purposes
  • rabbitmq: pub/sub for sending mainly NFT process information from the transaction processor instance to the queue worker instance

An API instance can be started with the following behavior:

  • public API: provides REST API for the consumers
  • private API: used to report prometheus metrics & health checks
  • transaction processor & completed: fetches real-time transactions & logs from the blockchain; takes action based on various events, such as clearing cache values and publishing events on a queue
  • cache warmer: used to proactively fetch data & pushes it to cache, to improve performance & scalability
  • elastic updater: used to attach various extra information to items in the elasticsearch, for not having to fetch associated data from other external systems when performing listing requests
  • events notifier: perform various decisions based on incoming logs & events

It depends on the following optional external systems:

  • events notifier rabbitmq: queue that pushes logs & events which are handled internally e.g. to trigger NFT media fetch
  • data: provides EGLD price information for transactions
  • xexchange: provides price information regarding various tokens listed on the xExchange
  • ipfs: ipfs gateway for fetching mainly NFT metadata & media files
  • media: ipfs gateway which will be used as prefix for NFT media & metadata returned in the NFT details
  • media internal: caching layer for ipfs data to fetch from a centralized system such as S3 for performance reasons
  • AWS S3: used to process newly minted NFTs & uploads their thumbnails
  • github: used to fetch provider profile & node information from github

It uses the following optional internal systems:

  • mysql database: used to store mainly NFT media & metadata information
  • mongo database: used to store mainly NFT media & metadata information

mx-api-service's People

Contributors

tanghel avatar cfaur09 avatar alexandrupislariu avatar gabrielmatei avatar florincoz avatar filipbaciiu avatar bogdan-rosianu avatar cristianfodor avatar mihaieremia avatar adrianscanteie avatar vladbucur1 avatar gfusee avatar berciuliviu avatar ramonalobont avatar dragos-rebegea avatar andrei-x1 avatar constantintovisi avatar johnykes 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.