CoinBay - Deployed at https://coinbay.vinsonly.me (AWS EC2)
Package Requirements:
- Node.js v8 or v10 (https://nodejs.org/en/download/)
- yarn v1.17 (https://yarnpkg.com/en/docs/install#windows-stable)
- Postgres v10 (https://www.postgresql.org/download/)
- Sequelize CLI (https://www.npmjs.com/package/sequelize-cli)
sudo npm install -g sequelize-cli -y
-
Clone this repository onto your local machine
$ git clone https://github.com/vinsonly/Coinbay.git
-
Navigate to project directory
$ cd ./Coinbay
-
Install dependencies for the client
$ cd client && sudo yarn install
-
Install dependencies for the server, run
$ cd .. && sudo yarn install
-
Create Postgres Database users with default password (PLEASE CHANGE PASSWORD OF USER AFTER USER IS CREATED)
./createuser.sh
-
Create local database
sudo -u postgres createdb cryptobay-dev
-
Back in root dir, run script to seed the database
$ ./resetdb.sh
-
And now we can launch the app using
$ yarn dev
-
Open your browser and navigate to http://localhost:3000/ to view the CoinBay app
-
You can register a new account or use a default user as listed below:
- Username: user1 (Password: user1)
- Username: user2 (Password: user2)
- These accounts will have some postings assigned to their account so that you can immediately view and use functionality within the profile dashboard
- The private keys for the Ropsten Ethereum Testnet wallets associated with the above accounts can be found in: https://github.com/vinsonly/Coinbay/blob/master/privatekeys.txt
Follow the steps listed below for setting up and testing the transaction (escrow) process
- Reactive search results/suggestions for top 100 relevant postings
- Can search by “user” or “title” depending on dropdown selection (bottom-right of search)
- Filter by date (ascending/descending)
- Filter by price (high/low)
- Filter by title (A-Z/ Z-A)
- Fully responsive layout with ability to expand/collapse drawer for smaller screen sizes
- Grid, Detailed-List, and List views
- Integration with the API allows users to pin a location on a map during posting creation
- Known issue: The Google Map API for React component currently does not properly save the user’s location after posting is saved
- Future work: include a search bar
- Allow users to upload an image file for their posting; imgur handles the upload, hosting, and URL creation which is later referenced in the posting details
- Full suite of functionality pertaining to postings in the marketplace (some features require you to be an owner of the posting)
- There is an image size constraint for non-animated images (i.e. JPG, PNG, etc) is 20MB, anything larger will not be permitted during posting creation
- Scrolling to bottom of the page triggers a fetch to load more posts
- Session handling fully implemented using JWT (Json Web Tokens)
- User sessions means improved security and usability
- Fully secured endpoints removes potential for unauthorized access
- Using Faker API to generate customizeable (fake) data for various components/fields (e.g. Title, User, Reviews, Description, Address, Phone Number, etc.)
- Populated through Sequelize seed files
- Default generation is 1000 users and 1000 posts, can be easily modified with a variable change (must remain 1:1 in the file)
- Buy Now button will not work without MetaMask Extension
- Integrated with MetaMask, which is a Chrome extension that allows users to interface with the Ethereum - Blockchain without hosting a full node.
- Wallet balance on top right fetched from Metamask
- Can be used as an escrow through Smart Contracts
- Connected to Ropsten Testnet, identical to Mainnet except with fake money
- Transactions are done through Smart Contracts
- When a user clicks “buy now” the item will be “unavailable”
- Can view the Ethereum transaction on Ropsten’s Etherscan
- All transaction scenarios accounted for:
- Both users accept transaction, Ether is sent from the contract to the seller
- Both users decline transaction, Ether is returned from the smart contract to the buyer
- One user declines, If there is conflict where one user accepts and one user declines the transaction, a third party or administrator will be referred to to resolve potential conflicts
- We keep a full history of all transactions performed on our web app Ethereum Wallet Balance in the NavBar is updated live when a user switches wallets or completes a transaction