{"id":26262483,"url":"https://github.com/alphabetsalphabets/blockchain-voting-system","last_synced_at":"2025-08-11T20:12:25.247Z","repository":{"id":281968390,"uuid":"945737243","full_name":"AlphabetsAlphabets/blockchain-voting-system","owner":"AlphabetsAlphabets","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-13T13:31:30.000Z","size":5786,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T14:52:26.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlphabetsAlphabets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-10T03:33:28.000Z","updated_at":"2025-05-13T13:31:34.000Z","dependencies_parsed_at":"2025-03-12T05:20:59.162Z","dependency_job_id":"245ec85a-9de9-4b1d-a8c1-2ab06a19d401","html_url":"https://github.com/AlphabetsAlphabets/blockchain-voting-system","commit_stats":null,"previous_names":["alphabetsalphabets/blockchain-voting-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlphabetsAlphabets/blockchain-voting-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphabetsAlphabets%2Fblockchain-voting-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphabetsAlphabets%2Fblockchain-voting-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphabetsAlphabets%2Fblockchain-voting-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphabetsAlphabets%2Fblockchain-voting-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlphabetsAlphabets","download_url":"https://codeload.github.com/AlphabetsAlphabets/blockchain-voting-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphabetsAlphabets%2Fblockchain-voting-system/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269948859,"owners_count":24501821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-14T00:19:24.490Z","updated_at":"2025-08-11T20:12:25.232Z","avatar_url":"https://github.com/AlphabetsAlphabets.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authors\nThis assignment is done by Yap Jia Hong (TP063375), Tamim Mustapha Hozza (TP072531), Marcelino Ares Pratama Putra (TP066419) and Abdurrahman Murtala Modibbo (TP071895)\n\n# Blockchain voting system\n**NEVER RUN NPM INSTALL IN THE ROOT OF THE PROJECT ONLY IN THE SUB FOLDERS.**\n\nThe repository has a monorepo structure. This means that the frontend is in the `frontend` folder and the code for the smart contract is in `contracts`. Therefore, you must run `npm` or `npx` commands in their respective folders. The deployment section in this README is for running the application. For more detailed developer instructions, make sure to refer to the `README.md` in the respective folders.\n\n# Deployment\nYou must first compile the smart contracts and then setup a wallet before running the website.\n\n## Smart contract deployment\n**All commands from this point on must be in `contract` folder.**\n\nCreate two terminals and do not close them. The first will run:\n```\nnpm install\nnpx hardhat compile\nnpx hardhat node\n```\n\nThe second will run:\n```\nnpm run deploy\n```\n\n## Wallet setup\n1. Go to the Metamask extension, click on the three dots on the top right then expand view.\n2. Add a custom network by clicking the dropdown list on the top left and then \"Add custom network\".\n3. Fill in the relavant fields. Network name can be anything such as \"CUSTOM\"\n4. Enter a network name, can be anything.\n5. Default RPC URL -\u003e Add RPC URL and fill in `http://127.0.0.1:8545/` for RPC URL. This may be different from you, to verify go to the terminal where you ran `npx hardhat node` and scrol lto the top. There should be a similar URL.\n6. Set the chain id as `31337`.\n\nNow we need to import a wallet.\n1. Click on the top left and swap to the \"CUSTOM\" network.\n2. Click at the centre there should be text \"Account 1\" for example and then import wallet.\n3. On the terminal where `npx hardhat node` is ran, copy a private key and import.key and import that wallet.\n\n## Frontend deployment\n**All commands from this point on must be in the `frontend` folder.**\n\nIn the terminal where `npm run deploy` was ran, there should be a contract address in this case it is `0x5FbDB2315678afecb367f032d93F642f64180aa3`.\n\n```\njiahongyap@star contract % npm run deploy\n\n\u003e bccontract@1.0.0 deploy\n\u003e npx hardhat ignition deploy ./ignition/modules/Election.ts --reset --network localhost\n\nHardhat Ignition 🚀\n\nDeploying [ VotingSystemModule ]\n\nBatch #1\n  Executed VotingSystemModule#ElectionFactory\n\nBatch #2\n  Executed VotingSystemModule#ElectionFactory.createElection\n\n[ VotingSystemModule ] successfully deployed 🚀\n\nDeployed Addresses\n\nVotingSystemModule#ElectionFactory - 0x5FbDB2315678afecb367f032d93F642f64180aa3\n```\n\nNavigate to `frontend/src/app/Election/page.tsx` and `frontend/src/app/votingPage/page.tsx` locate the `FACTORY_ADDRESS` variable. Replace the value of that variable with the contract address. Then you can run:\n\n```\nnpm install\nnpm start\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphabetsalphabets%2Fblockchain-voting-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphabetsalphabets%2Fblockchain-voting-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphabetsalphabets%2Fblockchain-voting-system/lists"}