This project is a blockchain-based voting system developed as a college project. The system leverages blockchain technology to ensure secure and transparent voting processes. The system is composed of a backend server, a frontend application, and smart contracts deployed on the Ethereum blockchain.
Before you begin, ensure you have the following installed on your machine:
- Node.js
- npm (Node Package Manager)
- Python
- pip (Python Package Installer)
- Truffle
- Ganache CLI
Follow the steps below to set up and run the application:
Open the first terminal and run the following commands:
npm install -g truffle
npm install -g ganache-cliOpen the second terminal and run the following commands:
cd Backend
python -m venv venv
venv\Scripts\Activate
pip install -r requirements.txtOpen the third terminal and run the following commands:
cd Frontend\voting_run
npm installTo start the application, follow these steps:
In the first terminal, run:
ganache-cli -i 5777 -p 7545In the second terminal, run:
cd Truffle
truffle migrate --network developmentIn the second terminal, after deploying smart contracts, run:
cd ../Backend
venv\Scripts\activate
cd voting_backend
python manage.py runserverIn the third terminal, run:
cd Frontend\voting_run
npm run devThe application will be running on http://localhost:5173. You can access it by opening your web browser and navigating to the URL.
If you are using Windows, you can use the provided batch files to start and stop the application more conveniently.
- start.bat: Starts all necessary services including Ganache, Truffle, Backend, and Frontend.
- stop.bat: Stops all running services.
If you are using Unix-based systems, you can use the provided shell scripts to start and stop the application more conveniently.
- start.sh: Starts all necessary services including Ganache, Truffle, Backend, and Frontend.
- stop.sh: Stops all running services.
- Backend: Contains the backend code, including the Django server and the virtual environment setup.
- Frontend: Contains the frontend code, including the React application.
- Truffle: Contains the Truffle project for deploying smart contracts.
This project is licensed under the MIT License.