Skip to content

tr1sm0s1n/qwik-gin-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qwik-Gin-DApp

Fast and performance-efficient DApp with Qwik and TypeScript as frontend and Gin and Go as backend.

🛠 Built With

Node.js Badge Qwik Badge Go Badge Gin Badge Solidity Badge Geth Badge MetaMask Badge Tailwind CSS Badge

⚙️ Run Locally

Clone the project:

git clone https://github.com/tr1sm0s1n/qwik-gin-dapp.git
cd qwik-gin-dapp

Server

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

Client

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.

📜 License

Click here.

🎗️ Contributing

Click here.

⚖️ Code of Conduct

Click here.