This project is built using React, TypeScript, Node.js, Express.js, Web3.js, Truffle, Ganache, and Solidity. It consists of a client-side application, a server-side application, and a smart contract for local deployment.
Before getting started, make sure you have the following tools installed on your machine:
- Node.js
- Truffle
- Ganache
- Metamask browser extension
To set up the project, follow these steps:
-
Clone the repository.
-
Run the following command from the
client
,server
, andsmartcontract
directories to install the required dependencies:npm install
-
Install the Metamask extension in your browser to interact with the smart contract.
-
In the
server
directory, create a.env
file and add the following environment variables:RPC_URL
: The RPC URL of the network where the smart contract will be deployed.NFT_STORAGE_KEY
: The API key for NFT storage.PORT
: The port number for the server.
-
In the
client
directory, create a.env
file and add the following environment variable:REACT_APP_MAPBOX_API_KEY
: The API key for Mapbox.
-
In the
smartcontract
directory, create a.env
file and add the following environment variables:HDWALLET_MNEMONIC
: The mnemonic for the HD wallet.RPC_URL
: The RPC URL of the network where the smart contract will be deployed.
To run the project, follow these steps:
-
In the
smartcontract
directory, run the following command to add the ABI of the smart contract to theclient
andserver
directories:npm start
-
In the
server
directory, run the following command to start the server:npm start
-
In the
client
directory, run the following command to start the client:npm start
Once the project is running, you can access the client application in your browser. Make sure the Metamask extension is connected to the appropriate network to interact with the smart contract.
This project is licensed under the MIT License.