Giter Site home page Giter Site logo

maxpetretta / twitt3r.xyz Goto Github PK

View Code? Open in Web Editor NEW
14.0 5.0 6.0 9.71 MB

Decentralized Twitter clone on the Ethereum blockchain. Deployed to Goerli and Ropsten.

Home Page: https://twitt3r.xyz

License: MIT License

Solidity 11.94% JavaScript 19.03% CSS 0.71% Shell 0.56% TypeScript 67.76%
nextjs react tailwindcss blockchain hardhat solidity wagmi web3 ethereum ethers

twitt3r.xyz's Introduction

twitt3r.xyz

This repo contains the source code for Twitt3r, a decentralized Twitter clone built on the Ethereum blockchain. The project utilizes a custom smart contract for message storage, and ENS lookups for profile information. It is deployed to the Goerli and Ropsten testnets.

Want to learn more? Read all the details in this blog post!

Demo

A quick 60 second demo of twitt3r.xyz

Tech Stack

Built with the following technologies:

Installation

Prereqs

To set up your own instance of Twitt3r, you will need:

These values are specified in a .env file. Once you have those, clone the repo with the following commands:

git clone https://github.com/maxpetretta/twitt3r.xyz
cd twitt3r.xyz/hardhat
npm install

This will install all dependencies for the hardhat environment.

Smart Contract

Once you have chosen your network, use these commands to deploy:

npx hardhat run scripts/deploy.js --network <NETWORK_NAME>
npx hardhat verify --network <NETWORK_NAME> <CONTRACT_ADDRESS> "10" "1000000000000000" "100000000000000000"

Additionally, you can deploy to a local testnet by running npx hardhat node in a separate terminal.

Frontend

After you've deployed the contract, you are ready to set up the frontend website. Copy the contract address to contract.js, and optionally the ABI if you've modified the contract. Then run:

cd ../react
npm install
npm run dev
open http://localhost:3000

Tests

Testing your smart contract is not suggested, it is required. Twitt3r comes with a baseline suite of unit tests, to ensure the contract functions as expected. To run the test suite:

cd ./hardhat
npx hardhat test

Note: Must be running on local testnet

Mock Data

Along with testing our contract, we can also add some mock data for demoing the UI. Add mocks with npx hardhat run scripts/mock.js

Future Changes

Some ideas for future enhancements to Twitt3r:

  • Suite of unit tests
  • Live demonstration video
  • Gasless "likes" using wallet signatures
  • Display messages from multiple networks simultaneously
  • Private DMs that only the sender/receiver can decrypt
  • Overhaul frontend to take advantage of Lens Protocol ๐ŸŒฟ

Contributions

PRs are always welcome, please tag me when you're ready for merge.

twitt3r.xyz's People

Contributors

maxpetretta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

twitt3r.xyz's Issues

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.