Skip to content

Commit

Permalink
[#543] Update frontend package readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Mar 25, 2024
1 parent 4f56941 commit 90df4b8
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ changes.
- Fix all the existing eslint errors [Issue 514](https://github.com/IntersectMBO/govtool/issues/514)
- Fix all the existing typescript errors [Issue 514](https://github.com/IntersectMBO/govtool/issues/514)
- Fix endless spinner on a dashboard [Issue 539](https://github.com/IntersectMBO/govtool/issues/539)
- Update frontend package readme to reflect recent changes [Issue 543](https://github.com/IntersectMBO/govtool/issues/543)

### Added

Expand Down
65 changes: 52 additions & 13 deletions govtool/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installed on your machine:

1. Node.js >= 18 ([official website](https://nodejs.org/en))
2. npm or yarn - for package management
2. npm or yarn (recommended) - for package management

Clone the project

Expand All @@ -16,7 +16,7 @@ Fill .env based on env.example file
Go to the project directory

```bash
cd voltaire-era/govtool/frontend
cd govtool/frontend
```

Install dependencies
Expand All @@ -25,7 +25,7 @@ Install dependencies
npm install
```

or
or (recommended)

```bash
yarn install
Expand All @@ -37,7 +37,7 @@ Start the server
npm run dev
```

or
or (recommended)

```bash
yarn dev
Expand All @@ -59,12 +59,30 @@ yarn dev
10. Yup - ^1.3.2
11. Keen-Slider - ^6.8.5
12. Sentry - ^7.77.0
13. Cardano serialization lib - 12.0.0-alpha.13
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`](https://git-scm.com/) - version control
Recommendetd [`React developer tools`](https://react.dev/learn/react-developer-tools)
Install [`Git`](https://git-scm.com/) - version control.
Recommended [`React developer tools`](https://react.dev/learn/react-developer-tools).

To automatically set correct node version:

1. Install [`nvm`](https://github.com/nvm-sh/nvm)
2. Install `lts/hydrogen` version of node

```bash
nvm install lts/hydrogen
```

3. Having that every time you enter the `govtool/frontend` package [`nvm`](https://github.com/nvm-sh/nvm) automatically sets the correct version of node.

## To Develop

Expand All @@ -76,12 +94,24 @@ Recommendetd [`React developer tools`](https://react.dev/learn/react-developer-t
npm install
```

or (recommended)

```bash
yarn install
```

2. Launch Server

```bash
npm run dev
```

or (recommended)

```bash
yarn dev
```

#### Using Nix and Direnv

1. Get [Nix](https://nixos.org/download).
Expand All @@ -108,17 +138,26 @@ direnv allow
yarn dev
```

## After development

Check our [Contributing Documentation](../../CONTRIBUTING.md) 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

1. See the governance actions along with their details and the number of votes
<!-- 2. See the list of DReps. -->

#### 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
5. vote for the governance actions of his or her choice (if the user is registered)

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 Sole Voter.
5. Vote for the Governance Actions of his or her choice (if the user is registered).
6. Create their own Governance Action.
<!-- 7. See the list of DReps from which they can submit their vote. -->

0 comments on commit 90df4b8

Please sign in to comment.