/loyalty-reward-system

The URL for the webpage is down below

Primary LanguageJavaScript

Loyalty Reward System




Introduction

A Full-Stack project created using react components from material ui, redux for state management and react router for navigation.

On the back-end, hardhat is used for interacting, managing and deploying smart contracts on a blockchain.

The purpose of the reward system is to increase customer retention by issuing points as per user's purchase, to then be used for redeeming gift items.

Context

The project was initially presented as a prototype in the Flipkart Grid 5.0 Hackathon, under the problem statement loyalty and rewards program using fungible token.

Run Locally

Clone the project

  git clone https://github.com/Fredorixo/loyalty-reward-system.git

Go to the project directory

  cd loyalty-reward-system

Install dependencies

  npm install

Start the server

  npm run dev

Running Tests

To run tests, run the following command

  npx hardhat test

Deployment

To deploy the smart contract on the local blockchain, run the following command

  npx hardhat deploy

To deploy the smart contract on a testnet, run the following command

  npx hardhat deploy --network <network_name>

Learnings

  • Created a smart contract by learning Solidity.
  • Utilised React components from Material UI to speed up the development process.
  • Used Hardhat for deploying and interacting with smart contracts.
  • Performed asynchronous testing on smart contracts with the help of Mocha and Chai.
  • Employed Redux for managing the states in the entire application.
  • Made use of ESLint for code correction and formatting.

Prerequisite

To be able to interact with the webpage, you will have to have a metamask. In case you don't, you can find it as an extension in the chrome web store on this link.

Preview

The webpage is hosted on Fleek and can be found here.