Fast and performance-efficient DApp with Qwik and TypeScript as frontend and Gin and Go as backend.
Clone the project:
git clone https://github.com/tr1sm0s1n/qwik-gin-dapp.git
cd qwik-gin-dapp
Go to the 'server' directory:
cd server
Create a 'build' directory and add abi and bytecode inside:
mkdir build
touch build/Cert.abi
touch build/Cert.bin
Install abigen:
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
Generate Go binding for contract:
abigen --abi build/Cert.abi --bin build/Cert.bin --pkg lib --type Cert --out lib/Cert.go
Run a simulated blockchain on port 8545, and add a private key to the '.env' file inside 'server'.
Deploy contract:
go run scripts/deploy.go
Start the server:
go run .
Use air for live reload (Optional):
# install air
go install github.com/cosmtrek/air@latest
# start air
air
Go to the 'client' directory:
cd client
Install pnpm (Optional):
npm i -g pnpm
Install dependencies:
pnpm install
Import the deployer account to the MetaMask extension using the private key.
Start the client:
pnpm dev
Click Connect to create a sign. Copy the sign to the '.env' file inside 'client' and connect again.
Click here.
Click here.
Click here.