Skip to content

Latest commit

 

History

History
165 lines (110 loc) · 2.97 KB

README.md

File metadata and controls

165 lines (110 loc) · 2.97 KB

GovTool Frontend

Installed on your machine:

  1. Node.js >= 18 (official website)
  2. npm or yarn (recommended) - for package management

Clone the project

git clone https://github.com/IntersectMBO/govtool

Fill .env based on env.example file

Go to the project directory

cd govtool/frontend

Install dependencies

npm install

or (recommended)

yarn install

Start the server

npm run dev

or (recommended)

yarn dev

Developing

Frontend Built With

  1. TypeScript - ^5.0.2
  2. React - ^18.2.0
  3. React Router Dom - ^6.13.0
  4. Vite - ^4.3.9
  5. Material UI - ^5.14.4
  6. Storybook - ^7.4.5
  7. Axios - ^1.4.0
  8. React Query - ^3.39.3
  9. React-Hook-Form - ^7.47.0
  10. Yup - ^1.3.2
  11. Keen-Slider - ^6.8.5
  12. Sentry - ^7.77.0
  13. Cardano serialization lib - 12.0.0-alpha.19
  14. i18next - ^23.7.19

Code Quality and Checks Are Handled BY

  1. eslint - ^8.38.0
  2. vitest - ^1.1.0
  3. chromatic - ^10.0.0

Prerequisites

Install Git - version control. Recommended React developer tools.

To automatically set correct node version:

  1. Install nvm
  2. Install lts/hydrogen version of node
  nvm install lts/hydrogen
  1. Having that every time you enter the govtool/frontend package nvm automatically sets the correct version of node.

To Develop

Standard way

  1. Install modules
npm install

or (recommended)

yarn install
  1. Launch Server
npm run dev

or (recommended)

yarn dev

Using Nix and Direnv

  1. Get Nix.

  2. Get direnv.

  3. Fill .envrc based on envrc.example file in project root.

  4. Enter govtool/frontend directory:

cd govtool/frontend
  1. Allow direnv to setup your environment:
direnv allow
  1. Run project
yarn dev

To update the yarn.lock file after changes are made, run nix develop .#js for a developer shell with correct yarn/nodejs versions

After development

Check our Contributing Documentation on how to submit a PR.

Users

The GovTool application can read and display data from the Cardano chain using REST API. We distinguish two types of users:

without a connected wallet who can:

  1. See the governance actions along with their details and the number of votes

with connected wallet who can:

  1. See the governance actions along with their details and the number of votes.
  2. Display the wallet status.
  3. Delegate his or her voting power in a form of ADA to dReps.
  4. Register as DRrep or Direct Voter.
  5. Vote for the Governance Actions of his or her choice (if the user is registered).
  6. Create their own Governance Action.