This guide will help you install and run the project. The project has three parts: Smart contract, Backend, Frontend
- Clone the repo First
git clone <repository-url>
- Node.js version 16 or higher
- Ganache Installed
-
Go to Ganache Download the software and start
-
node package install
cd smart-contract npm i
-
Config Go to hardhat.config.js to config the ganache server address and private key
-
Go to scripts, copy the first two line of deploy.sh
npx hardhat compile npx hardhat run --network localhost scripts/deploy.js
- Golang installed
- Docker installed
- Infura API register
-
Download Golang
-
Download Docker
-
Register Infura
-
Install golang module
cd backend go get .
-
Start PostgreSQL
cd deployments docker-compose up
-
Config go to configs dir to config the variables Create a env folder and .env.local in it input the following variables
POSTGRES_HOST=127.0.0.1 POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres POSTGRES_PORT=5432 POSTGRES_DB_NAME=postgres IPFS_PRJ_ID = <Your infura id> IPFS_API_SECRET = <Your infura api secret>
-
Run the server
cd cmd go run main.go
- Node.js version 16 or higher
-
Install package
cd frontend npm i
-
Run the program
npm run start