{"id":51895718,"url":"https://github.com/junzhli/ethereum-dapp-voting-dpolls","last_synced_at":"2026-07-26T09:03:59.264Z","repository":{"id":39877945,"uuid":"181405898","full_name":"junzhli/ethereum-dapp-voting-dpolls","owner":"junzhli","description":"dPolls - A decentralized voting system on top of Ethereum","archived":false,"fork":false,"pushed_at":"2023-01-23T22:47:55.000Z","size":1264,"stargazers_count":6,"open_issues_count":9,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-08-03T19:21:46.752Z","etag":null,"topics":["create-react-app-typescript","dapp","ethereum","ganache","javascript","metamask","react","redux","smart-contracts","solidity","truffle","typescript","voting"],"latest_commit_sha":null,"homepage":"https://dpolls.netlify.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junzhli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-15T03:28:53.000Z","updated_at":"2023-08-03T19:21:46.753Z","dependencies_parsed_at":"2023-01-25T19:00:06.962Z","dependency_job_id":null,"html_url":"https://github.com/junzhli/ethereum-dapp-voting-dpolls","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/junzhli/ethereum-dapp-voting-dpolls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junzhli%2Fethereum-dapp-voting-dpolls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junzhli%2Fethereum-dapp-voting-dpolls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junzhli%2Fethereum-dapp-voting-dpolls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junzhli%2Fethereum-dapp-voting-dpolls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junzhli","download_url":"https://codeload.github.com/junzhli/ethereum-dapp-voting-dpolls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junzhli%2Fethereum-dapp-voting-dpolls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35908330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-26T02:00:06.503Z","response_time":89,"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":["create-react-app-typescript","dapp","ethereum","ganache","javascript","metamask","react","redux","smart-contracts","solidity","truffle","typescript","voting"],"created_at":"2026-07-26T09:03:58.808Z","updated_at":"2026-07-26T09:03:59.258Z","avatar_url":"https://github.com/junzhli.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/XSNsIxjm2"],"categories":[],"sub_categories":[],"readme":"# dPolls - Decentralized voting system\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Netlify Status](https://api.netlify.com/api/v1/badges/34104410-f4a4-48a3-8603-876aeef24cbf/deploy-status)](https://app.netlify.com/sites/dpolls/deploys)\n\nA decentralized voting system proposed in NTU DApp course - [https://dpolls.netlify.com](https://dpolls.netlify.com)\n\n### Feature\n* Decentralized voting system on top of Ethereum\n  * Anyone can host their own polls\n  * Anyone can vote for polls\n  * Adding up to 256 options for a poll\n  * Poll closed at a specific block number\n  * Anyone can view results anytime\n* Be a host by applying for a membership\n* Membership Plan\n  * 1 ETH for CITIZEN\n    * A max number of 10 times creating a poll\n  * 10 ETH for DIAMOND\n    * **Unlimited**\n* Contract administration *(smart contract only)*\n  * Set admin\n  * Withdraw funds from smart contract\n  * Reclaim ownership of registries in case of new core contract replacement\n\n### Table of Contents\n* [smart-contract](#smart-contracts)\n  * Smart contracts on Ethereum blockchain\n* [frontend](#frontend)\n  * User interface\n\n\nSmart Contracts\n--------------------\n#### Prerequisites\n* Truffle - blockchain development framework\n* Ganache - private blockchain network\n\n#### Components\n* VotingCore - Core functionality\n* VotingHostRegistry - Maintain a list of registered hosts and memberships\n* VotingRegistry - Maintain a list of active/inactive polls\n* Voting - A poll entity\n\n#### Initialize dependencies\n```shell\n$ npm ci\n```\n\n#### Run testing units\n```shell\n$ truffle test\n```\n\n#### Deployment\nSet all parameters in file ```.env``` (referenced from ```.env.template```) or as environment variables\n* ```MNEMONIC``` - Mnemonic seed for use of contract deployment\n* ```INFURA_KEY``` - Infura Secret Token to get access to network\n* ```DEPOSIT_ACCOUNT``` - Deposit account for ethers withdrawals from core contract\n\n```shell\n$ # All required environment parameters in file .env are ready at this point.\n$ truffle deploy --network \u003cNETWORK\u003e\n```\n\nFrontend\n--------------------\nSingle page application (SPA) bootstrapped with *Create React App* and integrated with ETH browser wallet - *Metamask*\n\n#### Pre-configuration options\nTo run the frontend, please specify all required values.\nSet all parameters in file ```.env``` (referenced from ```.env.template```) or as environment variables\n\n* ```REACT_APP_WEB3_PROVIDER``` - Web3 Http(s) Provider URL (Infura is recommended)\n* ```REACT_APP_VOTING_CORE_ADDRESS``` - Voting Core contract address\n* ```REACT_APP_NETWORK_ID``` - Restrict user's metamask network access to a specific Network ID (1: Mainnet, 3: Ropsten..., etc) where the Voting Core deployed *(optional - defaults to all network)* and provide users with conditional feature enhancements (such as predefined Etherscan links by known network ids)\n* ```REACT_APP_GOOGLE_ANALYTICS_TRACKING_CODE``` - Set tracking code for page views *(optional - disabled by default)*\n* ```REACT_APP_HOST_ENV``` - Host environment to build conditional static content *(optional - defaults to 'production')*\n  * except for ```production``` - Tell search engine not to index\n\n#### Initialize dependencies\n```shell\n$ npm ci\n```\n\n#### Run dev server\n```shell\n$ npm start\n```\n\n#### Build for production environment\n```shell\n$ npm build\n$ ## dist folder: ./build\n$ cd build\n```\n\nPlace files inside folder ```build``` in static web server (e.g. **Nginx**)\n\n## Donation\n[Buy me a coffee](https://www.buymeacoffee.com/XSNsIxjm2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunzhli%2Fethereum-dapp-voting-dpolls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunzhli%2Fethereum-dapp-voting-dpolls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunzhli%2Fethereum-dapp-voting-dpolls/lists"}