Code Monkey home page Code Monkey logo

govgen-governance-dapp's Introduction

GovGen Governance dApp

GovGen governance dApp is a platform facilitating web-based access to GovGen governance where users can seamlessly engage with proposals, view proposal statistics, participate in discussions as well as perform transactions to vote or deposit on proposals. Prioritizing security, GovGen encourages the use of CLI commands for interactions with the dApp, using your wallet of choice or a public address you can gain immediate access to GovGen's governance functionalities.

Our goal with the GovGen governance dApp is to empower the community to effortlessly participate in these types of processes by gauging community sentiment in regards to the potential outcome of AtomOne while making it more accessible to engage, regardless of their technical expertise or background.

Usage

NOTE: The mainnet deployment is not live yet

You can visit the deployed dApp at https://app.govgen.io/ for mainnet (pending) or https://app.govgen.dev/ for devnet.

The following is a showcase of the existing functionality.

Homepage

The home page provides a paged view of all existing governance proposals. It shows 16 proposals per page and you can navigate across pages using the navigation arrows at the bottom right.

The default ordering is to show active proposals first (i.e. those in VOTING or DEPOSIT state) but you can use the dropdown control to switch to PASSED first, REJECTED first or FAILED first.

There is also a dropdown control to filter by proposal status altogether as well as a search box to search proposals based on Title and Description content.

In all the pages, there is a button at the top that allows you to connect your address in order to display balances or voting history as well as enable governance-related transactions. There are 2 possible options:

  • You can either simply supply your public govgen address with which the dApp can generate the appropriate CLI commands for voting and depositing txs signable by an offline computer as described here. RECOMMENDED
  • Or you can simply connect your Keplr/Leap/Cosmostation wallets and authorize and submit TXs through their familiar interface.

Proposal page

The page for a specific proposal (URL format: https://app.govgen.io/proposals/XXX or https://app.govgen.dev/proposals/XXX for mainnet and devnet respectively, where XXX is the id of the proposal) provides a view of all the proposal's details in a tabbed interface.

There is a hero component that includes the title, status, turnout, necessary quorum, expected result, and current vote tallies. It also consists of a call-to-action to Vote or Deposit (depending on the proposal status).

Under the hero component, you will find the following tabs:

  • Description (default): Contains the proposal description (also renders markdown)
  • Info: Contains the general proposal information such as proposer address, submission time, initial and total deposit, voting start time/end time and deposit end time (if appropriate) along with the messages contained in the proposal.
  • Voters: Contains an in-depth analysis of how all accounts have voted and how validators have voted including a complete breakdown of unique votes.
  • Discussions: Contains the discussion for this specific proposal. The discussion is backed by GitHub discussions and requires authenticating with a GitHub account before you can participate and authorizing the Discusser app.
  • Links: Contains useful/helpful links provided by the community that add information and context relevant to the proposal. It also contains an upvote/downvote ratio slider that you can use to filter out downvoted links to your liking.

Deposit popup

It allows you to add to a proposal's deposit to help push it into the voting period. Once you choose the amount you want to deposit you can either generate the CLI command required to create and then sign the TX using the CLI or use your connected wallet to authorize and broadcast.

Voting popup

Gives you te ability to vote on a proposal either with a single vote (YES/NO/NO WITH VETO/ABSTAIN) or a weighted vote with the weights you require for those 4 options. Like the deposit popup, you can then either generate the CLI command required to create and then sign the TX using the CLI or use your connected wallet to authorize and broadcast.

Local deployment

If you don't want to use the deployed version, you can deploy it locally. The only requirements are node v18+ and pnpm.

First, clone the repo using your favorite git tool.

Then install all packages in the repository:

pnpm i

Then copy the .env.prod or .env.dev file to .env depending on whether you want to deploy for mainnet or devnet respectively.

cp .env.dev .env

Finally, spin up a local instance using:

pnpm dev

Bugs & Feedback

Please use Github Issues to inform us of any bugs or issues you encounter and to request features and improvements.

Thank you.

govgen-governance-dapp's People

Contributors

clockworkgr avatar stuyk avatar alexiscolin avatar albttx avatar kristovatlas avatar ticojohnny avatar dependabot[bot] avatar

Stargazers

 avatar Luigi avatar  avatar  avatar

Watchers

Jae Kwon avatar  avatar  avatar  avatar

Forkers

gin kristovatlas

govgen-governance-dapp's Issues

check: sanitization of html

Should double check the html sanitization from GitHub, potentially need to purify further and remove form elements if at all possible.

bug: Deposit popup not launching

Steps to reproduce:

  • Load app.govgen.dev
  • Connect wallet
  • Click on a proposal in deposit period
  • click on Deposit button

Screen blurs but popup does not show.

If you swap steps 2,3 above (i.e. visit proposal page and then connect wallet) it works fine

feat: Implement voting history page

A page where the user can review his past voting behavior across the chain's proposals.

May include multiple vote casts for a single proposal so should flag the latest/valid vote as well as the previous overridden ones

feat: Implement voting alignment page

Implement a page where the user can compare his voting behaviour against others.

This should have 2 different functionalities:

  • Compare against a given address -> returns a voting alignment score (say 0-100) and the opportunity to see the complete analysis breakdown of voting behaviour for both over all proposals
  • Compare against validators -> returns validators ordered by alignment score (high to low). for each one , you can also click to see the analysis breakdown as described above

Voting alignment alforithm TBD. Preliminary discussion in: https://allinbits.slack.com/archives/C55CRKM61/p1707216002059669

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.