Giter VIP home page Giter VIP logo

buymeacoffee-dapp's Introduction

Buy Me a Coffee dApp

This project is a decentralized application (dApp) built with the following technologies:

  • Solidity: Smart contract development language for defining the logic behind the "Buy Me a Coffee" functionality.
  • Hardhat: Development framework for building, testing, deploying, and debugging Ethereum smart contracts.
  • Ethers.js: JavaScript library for interacting with the Ethereum blockchain from the frontend.
  • Next.js: React framework for building a smooth and interactive frontend experience.
  • Tailwind CSS: Utility-first CSS framework for building responsive and stylish user interfaces.

This dApp allows users to send cryptocurrency directly to the developer's wallet address as a token of appreciation for their work. The transaction is recorded on the Ethereum blockchain, ensuring transparency and immutability.

alt text

Features

  • Users can enter their name and a message to accompany their coffee purchase.
  • The dApp displays a list of previous contributors with their names, messages, and timestamps.
  • The smart contract safely holds the donated funds.

Getting Started

Prerequisites

  • Node.js (version 14 or later) and npm (or yarn) installed on your system.
  • MetaMask wallet or a similar Ethereum wallet extension.

Installation

  1. Clone the repository:

    git clone https://github.com/mishraji874/BuyMeACoffee-dApp.git
  2. Navigate to the project directory:

    cd BuyMeACoffee-dApp
  3. Install dependencies:

    npm install

Environment Setup

  1. Create a .env file at the root of the project.

  2. Add your Ethereum wallet private address and endpoint RPC URL to the .env file:

    RPC_URL = your_endpoint_rpc_url
    PRIVATE_ADDRESS = your_wallet_private_address
    

Running the Development Server

  1. Go to the client folder using the below command:

    cd client
  2. Then, install all of the nextjs and tailwind dependencies:

    npm i
  3. Start the development environment:

    npm run dev
  4. Open http://localhost:3000 in your web browser to access the dApp.

Important Note

If you want to build your dapp like this then you have to take the money on your account so you have to add your account and deploy the smart contract with your account in which you have to follow the below instructions:

  1. First, create the .env file from the above given steps.

  2. Then, run the following command:

    npx hardhat run scripts/deploy.js --network <YOUR_NETWORK_NAME>
  3. After deploying the contract, copy the contract address and paste it into the client/pages/index.js and replace it with the contractAddress variable.

Deployment

Note: Deploying the smart contract requires familiarity with Hardhat and a blockchain network (e.g., Ethereum Mainnet, Rinkeby Testnet).

  1. Configure Hardhat for your desired network.
  2. Compile and migrate the smart contract.

Disclaimer: Deploying to a mainnet requires real ETH for gas fees. Consider deploying to a testnet environment for development purposes.

buymeacoffee-dapp's People

Contributors

mishraji874 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.