Loyalty program: Loyalty programs, sponsored by retailers and other businesses, offer rewards, discounts, and other special incentives as a way to attract and retain customers. They are designed to encourage repeat business, offering people a reward for store/brand loyalty (hence the name). Typically, the more often a customer patronizes the merchant—and the more they spend—the greater their rewards.
This app uses React, Solidity, Web3, MongoDB and NodeJS Works smoothly with windows 10 and above This app uses React, Solidity, Web3, MongoDB and NodeJS
- Node Js - Network Architecture
- Truffle - Framework
- Ganache - Creation of Private Blockchain
- React - Front-End
- Mongodb - Database Storage Provider
- Solidity Ver 8+ - Back-End
- MetaMask - Wallet & web3 provider
- At Root : Do
npm install
- At database dir: Do
npm install
- At client dir: Do
npm install
Ganache has to be running in the background
- At Root : Do
truffle migrate
- At database dir: Do
nodemon ./index.js
- At client dir: Do
npm start
- Install the MetaMask browser extension
- Setup a new wallet account
- Go to Ganache and copy the
RPC Server
Address in the top panelYou need this to import your Ganache Blockchain into MetaMask
- Go to MetaMask and click on the networks tab (This should be selected as Ethereum Mainnet or some testnet such as Rinkeby)
- Select
Custom RPC
in this tab at the bottom - Enter the name of your choice, the
RPC Address
that you copied, and1337
as the chain ID - Other details should be auto-filled after entering the above details
- Click on save and you should have the Ganache network in your MetaMask now
- Then go to Ganache and click on the 🔑 on the right of the account number
- Copy the
Private Key
which would look something like this
357e626beea4019ee4ca96c1234ed52e390b71c6db0c64d15cdee1cc68a57aef
- Now open MetaMask and click on your account image and click
Import account
- Paste the copied private key in this and press on
Import
Note: The
Quickstart Ethereum
you started in Ganache is temporary and every account that was generated will be lost forever once you close Ganache. You will have to do the steps9 to 12
every time you open ganache. You will have to save the Workspace in Ganache if you wish to prevent this.
- Now reload the page
- MetaMask should popup asking you to connect your account
- If you connected successfully, your wallet address should be visible in the top right of the app. E.g.:
0xC9b87aeC184293A1D6d79806c8a0D70921090921
- Contracts Development: in contract directory
- Migration of contract: in migrations
- Contract Integartion and Contract function call: client->src->layout-> LoggedIn.js
- Contract function call: client-> src->components->flight/hotel->flight.js/hotel.js(using props)