|
| 1 | +# Appraisr |
| 2 | + |
| 3 | +Every time |
| 4 | + |
| 5 | +Appraisr is a decentralized ratings system similar to Yelp or Google Reviews. |
| 6 | + |
| 7 | +## System Requirements |
| 8 | + |
| 9 | +- [Metamask](https://metamask.io/) wallet with [Chrome](https://www.google.com/chrome/) / [Brave](https://brave.com/) browser |
| 10 | + |
| 11 | +- [Node](https://nodejs.org/en/download/) v16.14.0 |
| 12 | + |
| 13 | +- Download MacOS-compatible [FRP](https://github.com/fatedier/frp/releases) - required to connect from [Moralis to local Ganache instance](https://docs.moralis.io/guides/deploy-and-track-erc20-events#connecting-moralis-to-your-local-ganache-instance). |
| 14 | + |
| 15 | + Follow Moralis how-to [guide](https://docs.moralis.io/guides/deploy-and-track-erc20-events#connecting-moralis-to-your-local-ganache-instance). Use Hardhat setting with Linux command. |
| 16 | + |
| 17 | + Sample [`frpc.ini`](./config/frpc.ini) file can be found at `./config/` |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +\*This demo has been tested on MacOS Monterey v12.0.1, with React app deployed on local Brave browser (v1.37.113) via Node v16.14.0. FRP version [frp_0.42.0_darwin_amd64](https://github.com/fatedier/frp/releases). |
| 22 | + |
| 23 | +## Quick Start |
| 24 | + |
| 25 | +On Terminal 1 clone this repository and install its dependencies: |
| 26 | + |
| 27 | +```sh |
| 28 | +$ git clone https://github.com/yan-man/appraisr.git |
| 29 | +$ cd appraisr |
| 30 | +$ npm install |
| 31 | +``` |
| 32 | + |
| 33 | +On the same terminal (Terminal 1), start Hardhat's network node: |
| 34 | + |
| 35 | +```sh |
| 36 | +$ npx hardhat node |
| 37 | +``` |
| 38 | + |
| 39 | +On a new terminal (Terminal 2), connect Moralis to Ganache Proxy Server via FRP, according to Moralis guide: |
| 40 | + |
| 41 | +```sh |
| 42 | +$ ./frpc -c frpc.ini |
| 43 | +``` |
| 44 | + |
| 45 | +Successful response: |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +On a new terminal (Terminal 3), go to the repository's root folder and run the script to |
| 50 | +deploy the collection of smart contracts and configure initial settings. |
| 51 | + |
| 52 | +Initial Config Settings: |
| 53 | + |
| 54 | +See helper file [library.json](./frontend/src/helpers/library.json) |
| 55 | + |
| 56 | +- 2 initial sample Organizations will be created |
| 57 | +- 2 sample reviews given for each Organization by a total of 4 separate sample test accounts |
| 58 | +- 1 Verifier token given to each of the 20 |
| 59 | + |
| 60 | +```sh |
| 61 | +$ npx hardhat run scripts/deploy.js --network localhost |
| 62 | +``` |
| 63 | + |
| 64 | +Successful response: |
| 65 | + |
| 66 | + |
| 67 | + |
1 | 68 | 1. start npx node
|
2 | 69 | 2. run deployment scripts
|
3 | 70 | 3. start frpc
|
4 | 71 | 4. add moralis details to index
|
5 | 72 | 5. npm run start
|
6 | 73 |
|
7 |
| -next steps/ further: |
| 74 | +## User Guide |
| 75 | + |
| 76 | +### Moralis |
| 77 | + |
| 78 | +## Smart Contracts |
| 79 | + |
| 80 | +## Mechanics |
| 81 | + |
| 82 | +### Chainlink VRF |
| 83 | + |
| 84 | +## Testing |
| 85 | + |
| 86 | +## Design Patterns |
| 87 | + |
| 88 | +## Troubleshooting |
| 89 | + |
| 90 | +## Further |
8 | 91 |
|
9 | 92 | - split Appraiser contract into separate smaller contracts for bytesize
|
10 | 93 | - rewrite tests, add more integration testing
|
11 | 94 | - more front end functionality:
|
12 | 95 | - flesh out JSON metadata pin to IPFS for minted review NFTs
|
13 | 96 | - show Verifier tokens owned by user
|
| 97 | + |
| 98 | +## What's Included? |
| 99 | + |
| 100 | +- [Frontend/Dapp](./frontend): A [Create React App](https://github.com/facebook/create-react-app) dApp which interacts with the `*.sol` smart contract. |
| 101 | +- [Hardhat](https://hardhat.org/): An Ethereum development task runner and testing network. |
| 102 | +- [Mocha](https://mochajs.org/): A JavaScript test runner. |
| 103 | +- [Chai](https://www.chaijs.com/): A JavaScript assertion library. |
| 104 | +- [ethers.js](https://docs.ethers.io/v5/): A JavaScript library for interacting with Ethereum. |
| 105 | +- [Waffle](https://github.com/EthWorks/Waffle/): To have Ethereum-specific Chai assertions/matchers. |
| 106 | + |
| 107 | +## License |
| 108 | + |
| 109 | +All non-boilerplate code is unlicensed. Yan Man 2022. |
0 commit comments