VoteChain is a decentralized voting application built on the Sepolia Testnet using Next.js 15, Thirdweb SDK 5, and Tailwind CSS. It allows users to browse active, upcoming, and ended votings, cast votes securely using their wallets, and view real-time results.
- Decentralized Voting: Secure voting on the blockchain.
- Real-time Updates: View live vote counts and percentages.
- Voting Statuses: Filter votings by Upcoming, Active, Ended, and Finalized.
- Wallet Integration: Seamless connection with Thirdweb's Connect Wallet.
- Responsive Design: Modern, animated UI with Tailwind CSS.
- Frontend Framework: Next.js 15 (App Router)
- UI Library: React 19
- Styling: Tailwind CSS 3
- Web3 Integration: Thirdweb SDK 5
- Smart Contracts: Solidity (Deployed on Sepolia)
Follow these steps to set up the project locally.
- Node.js 18+ installed
- A Thirdweb Account & Client ID from the Thirdweb Dashboard
- A Web3 wallet (e.g., MetaMask, Coinbase Wallet) with Sepolia ETH
-
Clone the repository:
git clone https://github.com/your-username/votechain.git cd votechain -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Set up environment variables:
Create a
.env.localfile in the root directory and add your Thirdweb Client ID:NEXT_PUBLIC_TEMPLATE_CLIENT_ID=your_client_id_here NEXT_PUBLIC_FACTORY_ADDRESS=your_factory_address_here
Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
- Deploy the contract using Thirdweb or your preferred method.
- Copy the deployed contract address.
- Update the
NEXT_PUBLIC_FACTORY_ADDRESSin your.env.localfile with the new address.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is open-source and available under the MIT License.