The requirement to run this demo includes:
STEP 1 Run the following command for project setup :
// to navigate to your preferred directory to store the project folder run this command
cd Desktop
//then run this for cloning the repo
git clone https://github.com/covelitein/DappStars_VerbWire_hackathon_challenge.git YOUR_FOLDER_NAME
//cd into the cloned project folder
cd YOUR_FOLDER_NAME
//to install the dependencies run this command
yarn install
//or
npm install
// To open it in vscode run this command
code .
STEP 2 Open two terminals for your backend and frontend server To install the necessary utilities for the backend run the following commands
// navigate to the backend folder using this command
cd backend
// to install fastapi and its utility functions run this command
pip install "fastapi[all]"
// then install your mysql-connector using this command
pip install mysql-connector-python
STEP 3
- go to verbwire and create an account
- create an ERC721 smart contract
- Then copy your contracts address and api key
- Go to your config.py Replace the VERBWIRE_CONTRACT_ADDRESS with your contract address
- Replace the VERBWIRE_API_KEY with your api key
- Also ensure your config.py looks like this:
Illustration below
VERBWIRE_API_KEY='*************************'
VERBWIRE_CONTRACT_ADDRESS='*******************************'
USER='root'
PASSWORD=''
HOST='127.0.0.1'
DATABASE='dappstars'
STEP 4 Install xampp, start your apache and mysql in your xampp control panel then navigate to your mysql database which is “localhost/phpmyadmin” and create a database called “dappstars” with a table called “stars” see picture below
or get the database sql file download this file from this link sql_file_link then create a database name as earlier stated and then import the sql file to your already created database
To start the app run the following commands
//to start your backend server run this command
uvicorn main:app --reload
// to start the frontend server run this command
yarn dev