Skip to content

riccardopersiani/eth-fidelity-points-dapp

Repository files navigation

Fidelity Point Dapp HitCountMIT Licence

Computer Engineering Master's Degree thesis project at Technical University of Turin.

The purpose of this project is to show a complete Ethereum DApp.

🏗️ Architecture

These are 2 main components:

Next: server connected to the Ethereum blockchain.

Express: server for authentication via OAuth and for performing the PSD2 payment.

__ __ Firebase: database for managing the web client authentication.

📃 Instructions:

1) Go on the Infura website to get an Infura key: infura.io.

2) Get a mnemonic passphrase, an easy way is to get a Metamask one: metamask.io

3) Fire up your favourite console & clone this repo somewhere:

❍ git clone https://github.com/riccardopersiani/eth-fidelity-points-dapp.git

4) Enter this directory & install dependencies:

❍ cd eth-fidelity-points-dapp && npm install

5) In eth-fidelity-points-dapp, create a new file apikeys.js & add the mnemonic passphrase and the Infura key to it, such as:

// apikeys.js example

module.exports = {
  mnemonic: 'word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12',
  infuraKey: '0123456789abcdef0123456789abcdef'
}

6) Go in ethereum folder & launch Truffle:

❍ cd ethereum && npx truffle develop

7) In the console with Truffle running set the tests going!:

❍ truffle(develop)> test

7) Deploy the contracts with Truffle on a testnet, such as Kovan:

❍ npx truffle deploy --network kovan

8) In the main folder start the Next server:

❍ npm run dev

9) Go in the psd2 folder & start the Express server:

❍ cd psd2 && node oauth.js

✒️ Notes

Please, keep secure your own Infura key and the Metamask passphrase. The ones that may be provided here are simply placeholders.

Please, keep secure your own Firebase configuration. The one that may be provided here is simply for demonstration.

The front-end application for the loyalty point system is reachable at http://localhost:3000/

The front-end application for the PSD2 payment is reachable at http://localhost:8085/

Happy developing!

About

Loyalty Program Ethereum DApp leveraging ERC-20 tokens

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published