Welcome to the Decentralized Voting Platform, a web3 application built on the Solana blockchain. This platform allows users to create, participate, and interact with decentralized polls securely and transparently.
Welcome to the Decentralized Voting Platform, a web3 application built on the Solana blockchain. This platform allows users to create, participate, and interact with decentralized polls securely and transparently.
This project leverages the power of the Solana blockchain to provide a decentralized solution for voting. With a focus on security, transparency, and user experience, the platform is designed to be scalable, fast, and user-friendly. It includes a robust frontend built with Next.js and TypeScript, a backend powered by Node.js and Express.js, and integration with Solana using the Web3.js SDK.
To install the frontend dependencies, navigate to the frontend
directory and run:
npm install next react react-dom typescript tailwindcss @solana/wallet-adapter-react @solana/wallet-adapter-wallets @solana/web3.js
To install the backend dependencies, navigate to the backend
directory and run:
npm install express typescript solana-web3.js anchor
Wallet integration dependencies are typically part of the frontend installation. However, if needed separately, you can install them with:
npm install @solana/wallet-adapter-react @solana/wallet-adapter-wallets @solana/web3.js
git clone https://github.com/your-username/SolVote.git
cd SolVote
cd frontend
npm install
# or
yarn install
cd backend
npm install
# or
yarn install
Create a .env.local
file in the frontend
and backend
directories with the following variables:
.env.local
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
.env.local
SOLANA_NETWORK=devnet
SOLANA_RPC_URL=https://api.devnet.solana.com
cd frontend
npm run dev
# or
yarn dev
cd backend
npm run dev
# or
yarn dev
Compile your Solana programs using Anchor:
anchor build
Deploy your programs to Solana Devnet:
anchor deploy
Here's the updated Contributing section with detailed steps:
We welcome contributions from the community! Follow these steps to contribute:
Fork the Repository Click the "Fork" button on the top right corner of the repository page on GitHub to create your own copy of the project.
Clone the Forked Repository Clone your forked repository to your local machine by running:
git clone https://github.com/your-username/solana-voting-platform.git
Replace your-username
with your GitHub username.
Create a New Branch Create a new branch to work on your feature or bugfix:
git checkout -b feature-name
Replace feature-name
with a descriptive name for your branch.
Make Your Changes Implement your changes or new features in your local branch.
Commit Your Changes Commit your changes with a descriptive commit message:
git add .
git commit -m "Add feature: description of the feature"
Push to Your Fork Push your changes to your forked repository:
git push origin feature-name
Create a Pull Request Go to the original repository on GitHub and click the "Compare & pull request" button. Provide a clear description of your changes and submit the pull request.
Respond to Review Comments The project maintainers may review your pull request and leave comments or request changes. Be sure to respond to these comments and make any necessary updates.
Merge Once your pull request is approved, it will be merged into the main branch. Congratulations on your contribution!