Skip to content

devloperaziz1280/Twiiter_dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Twiiter_dapp

🐦 Twitter DApp (Decentralized Application) A Twitter-like decentralized application (DApp) built on Ethereum that allows users to:

Connect their MetaMask wallet

Post tweets stored on the blockchain

Like tweets

View tweets associated with their address

This project demonstrates how blockchain and Web3 can be used to create social media experiences where data is decentralized and transparent.

πŸš€ Features βœ… Connect MetaMask wallet

πŸ“ Create and publish tweets

❀️ Like other tweets

πŸ”„ Real-time tweet updates from smart contract

πŸ”’ Data is stored on the Ethereum blockchain via a smart contract

🧠 Tech Stack Solidity – Smart contract development

Remix IDE – Contract deployment and testing

Web3.js – JavaScript library for Ethereum interactions

MetaMask – Ethereum wallet integration

HTML/CSS/JS – Frontend user interface

Cloud IDE – Hosted with CodeSandbox for frontend

πŸ“¦ Smart Contract Overview Smart contract includes:

createTweet(string _tweet) – Post a new tweet

getAllTweets(address _owner) – Fetch all tweets of a user

likeTweet(address author, uint256 id) – Like a tweet by ID

unlikeTweet(address author, uint256 id) – Remove a like from a tweet

getTweet(uint256 _i) – Fetch a single tweet

changeTweetLength(uint16 newTweetLength) – Admin control (optional)

Each tweet contains:

id

author

content

timestamp

likes

πŸ›  Setup Instructions

  1. Clone the repository

Copy Edit git clone https://github.com/devloperaziz1280/twitter-dapp.git cd twitter-dapp

  1. Install dependencies

Copy Edit npm install

  1. Install dependencies

Copy Edit npm install

  1. Connect MetaMask Install MetaMask browser extension if not already installed.

Connect your MetaMask wallet to the app.

Make sure to use the same Ethereum network where your contract is deployed (e.g., Goerli/Testnet or Localhost).

  1. Deploy Smart Contract (Optional if already deployed) Use Remix IDE to:

Paste your contract code

Compile and deploy it

Copy the contract address and ABI

  1. Update Frontend Config Edit the following in the JS file:

js Copy Edit const contractAddress = "YOUR_CONTRACT_ADDRESS"; import contractABI from "./abi.json";

πŸ“Έ Screenshots Wallet Connection Post Tweet Like Tweet

image-1 image-2 image-3 image-4

πŸ“„ License This project is open-sourced under the MIT License.

πŸ™Œ Acknowledgements Web3.js Documentation – https://web3js.readthedocs.io/

Solidity Language Docs – https://docs.soliditylang.org/

MetaMask Docs – https://docs.metamask.io/

πŸ“¬ Contact If you want to learn more or collaborate, feel free to reach out!

Developer: Aziz Ur Rehman Email: devloperaziz1280@example.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published