Git Product home page Git Product logo

koinx's Introduction

KoinX

Internship Assignment For KoinX.

Tech Stack Used:

             Mongo ATLAS for cloud data storage

             Node JS / Express for application
             
             Azure for deployment

  Endpoint: 1. https://koinx.azurewebsites.net/normaltransaction?address=Your-Address-Here

  Working:      It fetches and stores the transactions in the database against the address.

  Example:      https://koinx.azurewebsites.net/normaltransaction?address=0xce94e5621a5f7068253c42558c147480f38b5e0d

  On Success:   {"saved":"success"}

  On Failure:   {"saved":"failed"}

  Endpoint: 2. https://koinx.azurewebsites.net/getbalance?address=Your-Address-Here

  Working:      It fetches the transactions and Ethereum Price from the database against the address and calculates the balance.

  Example:      https://koinx.azurewebsites.net/getbalance?address=0xce94e5621a5f7068253c42558c147480f38b5e0d

  On Success:   {"userBalance":163895865906129440,"ethereumPrice":105090}

  On Address Not Found:  {"userBalance": "Address Not found", "ethereumPrice": 103956}

Structure of the Project: .

                  ├── controllers
                  │   ├── getBalanceController.js         // To Fetch transactions and the latest Ethereum price from database and calculating the balance. 
                  │   └── normalTransactionController.js  // To Fetch the transactions and store them in database against the address.
                  ├── database.js                         // For instantiating the MONGO ATLAS
                  ├── main.js                             // Entry file for the application
                  ├── models
                  │   ├── fetchPriceModel.js              // Schema for storing the Ethereum price.
                  │   └── normalTransactionModel.js       // Schema for storing the normal transactions.
                  ├── package-lock.json
                  ├── package.json
                  ├── routes
                  │   ├── getBalanceRoute.js              // Router for the get request; to fetch the balance and ethereum price.
                  │   └── normalTransactionRoute.js       // Router for the get request; to store the transaction in database.
                  ├── utils
                  │   └── fetchEtereumPrice.js            // Utils file that fetches the Ethereum Price and stores in database at an interval of 10 minutes.
                  └── web.config                          // Config file for azure deployment.

  Note: env file have not been uploaded, to test the project create your own .env with the structure:
  
  API_KEY 
  
  ATLAS_USERNAME 
  
  ATLAS_PASSWORD
  
  ATLAS_DBNAME 

koinx's People

Contributors

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