Skip to content

An Election dApp where the user can vote for their candidate on Polygon testnet.

Notifications You must be signed in to change notification settings

firascodes/election-app

Repository files navigation

This is a RainbowKit + wagmi + Next.js project bootstrapped with create-rainbowkit.

Election dApp

Typescript    Tailwind CSS    Solidity    Rainbowkit    Wagmi    Polygon Mumbai    Alchemy   

An Election dApp where the user can vote for their candidate leveraging the power of Blockchain technology. The smart contract is deployed to the Polygon Mumbai testnet using the Remix IDE, and the app uses Rainbowkit, Wagmi, TypeScript, and Tailwind CSS. The app also uses Alchemy for the API key for Polygon Mumbai.

Advantages of a Decentralized Voting System

  • Increased Transparency: Decentralized voting systems can increase transparency, as all voters can view the results in real-time.

  • Immutable Records: Decentralized voting systems are based on blockchain technology, which means that the records are immutable and cannot be altered.

  • Increased Security: Decentralized voting systems are highly secure, as they use cryptographic algorithms to protect the data.

  • Reduced Costs: Decentralized voting systems can reduce the costs associated with traditional voting systems, as they eliminate the need for physical ballot boxes and personnel to count the votes.

  • Increased Accessibility: Decentralized voting systems can increase accessibility for voters, as they can be accessed from anywhere with an internet connection.

Tech Stack

  • React
  • TypeScript
  • Tailwind CSS
  • Solidity
  • Remix IDE

Installation

  1. Clone the repository.
  2. Run npm install to install the dependencies.
  3. Create a .env file with the following variables:
    • REACT_APP_ALCHEMY_KEY: Your Alchemy API key for Polygon Mumbai.
    • REACT_APP_CONTRACT_ADDRESS: The address of the deployed smart contract.
    • REACT_APP_CONTRACT_ABI: The ABI of the deployed smart contract.
  4. Run npm start to start the app.

Usage

  1. Connect your wallet using the Connect button.
  2. Add candidates using the "Add Candidate" button.
  3. Vote for a candidate using the "Vote" button.
  4. View the results on the home screen.

##Screenshots

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details.

About

An Election dApp where the user can vote for their candidate on Polygon testnet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published