Skip to content
Loyalty Program Ethereum DApp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
components
documents
ethereum
others
pages
psd2
.gitattributes
.gitignore
CHANGELOG.md
LICENSE
README.md
favicon.ico
next.config.js
package-lock.json
package.json
routes.js
server.js

README.md

Fidelity Point System HitCountMIT Licence

Computer Engineering Master's Degree thesis progect 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 blockchain.

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

📃 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/fidelity-points-system-thesis.git

4) Enter this directory & install dependencies:

❍ cd fidelity-points-system-thesis && npm install

5) Go in ethereum folder & compile the code:

❍ cd ethereum && npx truffle compile

6) In fidelity-points-system-thesis, 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'
}

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

Note that your own Infura key and the Metamask passphrase must be kept secure. The ones provided here are simply placeholders.

The frontend application for the loyalty point system is reachable at https://localhost:3000/

The frontend application for the PSD2 payment is reachable at https://localhost:8085/

Happy developing!

You can’t perform that action at this time.