A decentralized web application built with modern technologies that enables users to create and manage polls on a blockchain. Users can vote on polls (one vote per poll), search and browse through polls, and delete them when needed. This project leverages both Web3 technologies and traditional web development practices to deliver a seamless and secure experience.
The backend for this project is managed separately. It provides all the necessary API endpoints and handles authentication, session management and file uploads.
Blockchain Integration:
Interact with smart contracts to create and manage polls using Web3.
Poll Management:
Create new polls, cast votes (one per user per poll), search existing polls, browse through them, and delete polls as needed.
User Authentication:
Secure authentication is implemented via JWT, with backend support handling token issuance and validation.
Avatar Upload:
Users can upload and update their avatars using a combination of Multer and Cloudinary SaaS.
Responsive UI:
Mobile-responsive design built with Tailwind CSS ensures optimal usability on all devices.
Real-time Notifications:
Receive immediate feedback and alerts using react-hot-toast.
Routing and Icons:
Navigate the app smoothly with react-router and enjoy a modern UI with lucide-react icons.
git clone https://github.com/namansharma3007/Poll-Chain-frontend.git
cd Poll-Chain-frontend
npm install
npm run dev
The app should now be running at http://localhost:3000 (or the port specified in your configuration).
Create a .env
file in the root directory and configure the following variables as needed:
VITE_CONTRACT_ADDRESS=<contractaddress after deployment>
VITE_API_URL=<backendurl>
Adjust the variables to match your backend API and blockchain configuration.
Creating Polls:
Voting:
Managing Polls:
User Authentication:
Avatar Upload:
Responsive UI:
Contributions are welcome! If you have any ideas or find bugs, feel free to fork the repository and open a pull request with your suggestions.
git checkout -b feature/your-feature
.git commit -m 'Add some feature'
.git push origin feature/your-feature
.