The following is a UML sequence diagram of the project
NFT Marketplace is a full-stack decentralized application (dApp) designed to create a cost-efficient and secure marketplace for Non-Fungible Tokens (NFTs). This project integrates both centralized and decentralized backends to optimize cost without compromising security. The smart contracts used in this project are developed with a focus on cost efficiency while ensuring the security of the marketplace. Additionally, this project serves as an educational resource for anyone interested in learning about building dApps and NFT marketplaces.
- Decentralized and Centralized Backend: Combines the strengths of both decentralized and centralized systems to balance cost and performance.
- Cost-Efficient Smart Contracts: Designed to minimize gas fees and other costs associated with blockchain transactions.
- Secure Transactions: Emphasis on maintaining the security and integrity of the NFT store.
- Technology Stack: Utilizes Next.js and JavaScript for the frontend, PHP for the backend, and various databases, including MySQL, to manage and store data efficiently.
- Frontend: Next.js, JavaScript
- Backend: PHP, InterPlanetary File System
- Databases: MySQL and other centralized and decentralized database solutions
- Blockchain: Smart contracts developed using Hardhat and OpenZeppelin, deployed on a blockchain platform
-
Clone the Repository
git clone https://github.com/yourusername/nft-marketplace.git cd nft-marketplace
-
Install Dependencies
npm install
-
Configure Environment Variables
-
Create a
.env.local
file in the root directory. -
Visit
Pinata Cloud
to sign up for a new free account. -
add the
PINATA_JWT_TOKEN
andNEXT_PUBLIC_NFT_MARKETPLACE_ADDRESS
fields -
Add necessary configuration settings (database credentials, blockchain network settings, etc.).
-
-
Run the Hardhat Nood If you are going to deploy the smart contract to a hardhat local network deploy it in the port 3000
npx hardhat node --hostname 0.0.0.0 --port 3000
-
Run the Application
npm run dev
-
Deploy Smart Contracts Follow the instructions in the
contracts/
directory to deploy smart contracts using Hardhat and OpenZeppelin to your preferred blockchain network. -
Start the Backend Server Ensure your PHP server is configured correctly and running.
-
Access the Marketplace
- Open your browser and navigate to
http://localhost:3001
to start using the NFT Marketplace.
- Open your browser and navigate to
This project is designed to be an educational resource. Whether you are a beginner or an experienced developer, you can use this project as a starting point to learn about building decentralized applications and NFT marketplaces.
We welcome contributions to enhance the NFT Marketplace. To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request to the
main
branch.
This project is licensed under the MIT License. See the LICENSE
file for more details.
For any questions or feedback, please open an issue on GitHub or reach out to us directly.
We hope you enjoy using the NFT Marketplace! If you have any suggestions or encounter any issues, please don't hesitate to let us know.