{"id":19096780,"url":"https://github.com/makerdao/governance-portal-v2","last_synced_at":"2025-04-05T22:05:43.969Z","repository":{"id":36950579,"uuid":"256013596","full_name":"makerdao/governance-portal-v2","owner":"makerdao","description":"Governance Portal V2","archived":false,"fork":false,"pushed_at":"2025-03-29T01:59:37.000Z","size":171076,"stargazers_count":51,"open_issues_count":8,"forks_count":51,"subscribers_count":18,"default_branch":"develop","last_synced_at":"2025-03-29T21:04:36.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://vote.makerdao.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makerdao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2020-04-15T19:14:01.000Z","updated_at":"2025-03-28T21:23:20.000Z","dependencies_parsed_at":"2024-05-21T21:39:00.958Z","dependency_job_id":"0afa2e05-6ac8-41c7-beac-021acaa21aea","html_url":"https://github.com/makerdao/governance-portal-v2","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fgovernance-portal-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fgovernance-portal-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fgovernance-portal-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fgovernance-portal-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makerdao","download_url":"https://codeload.github.com/makerdao/governance-portal-v2/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"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","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":"2024-11-09T03:37:47.279Z","updated_at":"2025-04-05T22:05:43.950Z","avatar_url":"https://github.com/makerdao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1  align=\"center\"  style=\"margin-top: 1em; margin-bottom: 3em;\"\u003e\n\n\u003cp\u003e\u003ca  href=\"https://vote.makerdao.com/\"\u003e\u003cimg  alt=\"maker logo\"  src=\"./maker-logo.png\"  alt=\"vote.makerdao.com\"  width=\"125\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp\u003eMaker Governance Portal\u003c/p\u003e\n\n\u003c/h1\u003e\n\nThis is the repo containing the code for the [Maker Governance Portal](https://vote.makerdao.com). The Maker Governance Portal is an open-source interface for governance of the Maker protocol. \u003c/br\u003eCopyright [Dai Foundation](https://daifoundation.org/) 2022.\n\n### To run locally:\n\nWhile the portal is hosted by MakerDAO at https://vote.makerdao.com, it can also be run by anyone on their local machine.\n\nIn order to run the project locally, you must have the following installed on the machine:\n\n- Node, version 18.17 or greater (up to version 20.x) ([install](https://nodejs.dev/learn/how-to-install-nodejs))\n\nTo get started, clone the repository to the desired directory and then navigate into the project folder:\n\n```bash\n# clones repo\ngit clone https://github.com/makerdao/governance-portal-v2.git\n\n# changes directory to cloned project folder\ncd governance-portal-v2\n```\n\nNext, install the project's dependencies using [yarn](https://yarnpkg.com/getting-started):\n\n```bash\n\n# installs dependencies\nyarn\n\n# runs the application on localhost:3000\nyarn dev\n\n```\n\nAt this point, you should be able to access the application by going to the address `http://localhost:3000` in your browser.\n\n### Upgrading\n\n\u003e **Warning**\n\u003e The method `_signTypedData` from ethers is an experimental feature and will be renamed to `signTypedData`. Make sure to keep the version of ethers fixed or rename the method once is available.\n\n### Releasing\n\nTo do releases of the governance portal, please use `npm version minor` or `npm version patch` to bump the version in the package.json and create a tag.\n\nThe tag and versioning should be done on develop, and then merged to master through a PR. To push your local tag use the command `git push origin develop --follow-tags`.\n\n### Additional configuration overview:\n\n#### Content\n\nThe portal seeks to rely on on-chain data as much as possible and to minimize reliance on data stored on centralized servers. However, due to the large volume of data that is relevant to Maker governance, fetching this data from on-chain is both time and resource-intensive. In order to improve the user's experience, some reliance on third-party services has been added, and we recommend a few configuration steps for optimal use. These services include:\n\n- [GitHub](https://github.com/makerdao/community/tree/master/governance) for storing markdown related to [polls](https://github.com/makerdao/community/tree/master/governance/polls), [executives](https://github.com/makerdao/community/tree/master/governance/votes), and [aligned delegates](https://github.com/makerdao/community/tree/master/governance/delegates)\n\n#### Network providers\n\nThe portal uses the [Wagmi](https://wagmi.sh/react/getting-started) library in order to communicate with the Ethereum network through its React hooks, and [Viem](https://viem.sh/docs/getting-started) in order to do so through its public client as well as provide Web3 utilities. Both Wagmi and Viem work by connecting to JSON-RPC APIs via HTTP in order to provide on-chain data to web applications. By default, they provide default RPC URLs that can be used to get started. However, these RPCs keys can quickly become rate-limited when too many requests are made. In order to prevent this, it is recommended that you sign up and add your own API keys to the configuration for [Alchemy](https://docs.alchemy.com/reference/ethereum-api-quickstart) and [Infura](https://docs.infura.io/infura/networks/ethereum/how-to/secure-a-project/project-id).\n\nDue to the large volume of data that is constantly being fetched and displayed in the portal, we use caching in order to cache various network responses for a limited amount of time. This helps to reduce the load of networking calls to various APIs. This feature can be configured to be on or off.\n\n### Configuration steps:\n\nTo begin, create a local `.env` file in the project's root directory. The `.env.sample` file can be used as a template.\n\nThe following configuration values can be added to the `.env` file:\n\n#### Recommended for improved performance:\n\n- Set `INFURA_KEY` to a valid [Infura](https://docs.infura.io/infura/networks/ethereum/how-to/secure-a-project/project-id) API key for Wagmi and Viem to use\n\n- Set `ALCHEMY_KEY` to a valid [Alchemy](https://docs.alchemy.com/reference/ethereum-api-quickstart) API key for Wagmi and Viem to use\n\n- Set `ETHERSCAN_V2_API_KEY` to a valid [Etherscan V2](https://docs.etherscan.io/etherscan-v2#why-v2) API key for Wagmi to be able to generate the contract ABIs\n\n- Set `GITHUB_TOKEN` to fetch polls, executives, and aligned delegates information from GitHub (optionally set `GITHUB_TOKEN_2` and `GITHUB_TOKEN_3`)\n\n- Set `USE_CACHE` to true if you want to use cache, if `REDIS_URL` is set it will use REDIS otherwise filesystem cache\n\n- Set `GASLESS_DISABLED` to `true` to disable gasless voting in UI (pre-check endpoint will fail)\n\n- Set `NEXT_PUBLIC_VERCEL_ENV` to `development` to use development environment databases\n\n#### Optional (DUX-specific config, no performance improvements):\n\n- Set `MIGRATION_WEBHOOK_URL` for sending migration requests to discord\n\n- Set `GASLESS_WEBHOOK_URL` for sending gasless vote requests to discord\n\n**Optional** Set `DEFENDER_API_KEY_MAINNET` and/or `DEFENDER_API_KEY_TESTNET` to a valid OpenZeppelin Defender Relay key (used for gasless poll voting)\n**Optional** Set `DEFENDER_API_SECRET_MAINNET` and/or`DEFENDER_API_SECRET_TESTNET` to a valid OpenZeppelin Defender Relay secret\n**Optional** Set `ALCHEMY_ARBITRUM_KEY` to a valid Alchemy API key for the arbitrum network\n**Optional** Set `ALCHEMY_ARBITRUM_TESTNET_KEY` to a valid Alchemy API key for the arbitrum test network\n**Optional** Set `GASLESS_BACKDOOR_SECRET` to allow for bypassing the gasless voting eligibility checks by anyone with the password\n\n- Set `DASHBOARD_PASSWORD` for adding protection to the `/dashboard` route\n\nRequired for e2e:\n\n- Set `NEXT_PUBLIC_TENDERLY_RPC_KEY` to the API key required to query the forked Tenderly network RPC\n- Set `TENDERLY_API_KEY` to be able to run e2e tests against forked network\n\n### Tests\n\nThe Governance portal includes two test suites: Vitest and E2E\n\nTo run e2e, `TENDERLY_API_KEY` and `NEXT_PUBLIC_TENDERLY_RPC_KEY` must be correcly configured.\n\nInstall playwright\n`yarn playwright install`\n\nTo run headless mode:\n`yarn e2e`\n\nTo run in UI mode:\n`yarn dev:mock` to run the app with mock wallet\n`yarn e2e:ui` to open playwright UI\n\nVitest tests under the folder `__tests__` currently execute unit tests of the platform.\n\n#### Test commands\n\nVitest:\n\n```bash\n# runs Vitest tests on live-reload mode\nnpm run test\n\n# runs all the Vitest tests\nnpm run test:ci\n```\n\n### CI/CD\n\nThe CI/CD system is integrated with Github Actions.\n\nAfter each push the system will execute:\n\n- Lint, verify type consistency\n\n- Unit test, execute Vitest test suite\n\n```bash\nnpm run start:ci\n```\n\n### Contributing\n\nSee our [contributing guide](./CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerdao%2Fgovernance-portal-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerdao%2Fgovernance-portal-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerdao%2Fgovernance-portal-v2/lists"}