Git Product home page Git Product logo

feathers-giveth's Introduction

Feathers Giveth

Real-time json cache server for blockchain data

Note: Please use develop branch for contributing.

Welcome to the server code for Giveth's dapp. The dapp uses feathers as a cache for its blockchain transactions. By utilizing websockets on both the blockchain and client devices, we can receive and push updates simultaneously to all users in real time.

Table of content

Getting Started

Install

  1. Click Star on this repo near the top-right corner of this web page (if you want to).
  2. Join our slack if you haven't already.
  3. Fork this repo by clicking Fork button in top-right corner of this web page. Continue to follow instruction steps from your own feathers-giveth repo.
  4. The rest of these steps must be done from your machine's command line. Clone your own "feathers-giveth" repo. Copy the link from the "Clone or download" button near the top right of this repo's home page.
    git clone {paste your own repo link here}
    
  5. Change directories to feathers-giveth:
    cd feathers-giveth
    
  6. Make sure you have NodeJS (v8.4.0 or higher), yarn (v0.27.5 or higher), and npm (5.4.1 or higher) installed.
  7. Install dependencies from within feathers-giveth directory:
    npm install
    
    • note: due to a bug in yarn, yarn install currently does not work

Run server

The feathers server will need to connect to an ethereum node via websockets. Typically this will be a local TestRPC instance. The configuration param blockchain.nodeUrl is used to establish a connection. The default nodeUrl is ws://localhost:8546

  1. We provide an easy way to start a TestRPC instance.

    yarn testrpc
    
  2. Since TestRPC is now running, open a new terminal window and navigate to the same feathers-giveth directory.

  3. The TestRPC instance simulates a new blockchain. So we must deploy any contracts we intend to call.

    node scripts/deploy.js
    
  4. Start your app

    yarn start
    

Video Walkthrough

Video tutorial walkthrough here: https://tinyurl.com/y9lx6jrl

Deploying

  1. Start a production server

    yarn serve
    

Scripts

The feathers-giveth/scripts directory contains a few scripts to help development.

deploy.js - deploys a new vault & liquidPledging contract

getState.js - prints the current state of the deployed vault & liquidPledging contracts.

confirm.js - confirms any payments that are pending in the vault

Testing

Simply run yarn test and all your tests in the test/ directory will be run.

Usage

Each of these services are available via rest or websockets:

campaigns
dacs
donations
donationsHistory
milestones
uploads
users

If the server is using default configurations, you can see data for any of these services through your web browser at http://localhost:3030/SERVICE_NAME

Help

For more info on how to work with feathers checkout out their docs on service methods, service events, and database querying.

Also feel free to reach out to us on slack for any help or to share ideas.

feathers-giveth's People

Contributors

ewingrj avatar ojones avatar satyavh avatar caseyhelbling avatar gencymex avatar

Watchers

Tom Power avatar  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.