Skip to content

Commit 3117c25

Browse files
committed
docs: updated readme with deployment section
1 parent a8d4723 commit 3117c25

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The VTS is a metric designed to help stakers evaluate the performance and reliab
101101
The VTS is displayed in the Nimiq Wallet, allowing stakers to compare validators and select the one that best meets their needs.
102102

103103
- [Read the docs](https://nimiq.com/developers/learn/validator-trustscore)
104-
- [See implementation](./packages/nimiq-validator-trustscore/)
104+
- Checkout the [pnpm package](./packages/nimiq-validator-trustscore/)
105105

106106
## Validators API
107107

@@ -116,12 +116,8 @@ The Validators API provides endpoints to retrieve validator information for inte
116116

117117
The Validators Dashboard is a simple Nuxt application that displays all validators along with their scores. You can access the dashboard here: https://validators-api-mainnet.pages.dev/
118118

119-
## Development
120-
121-
```bash
122-
pnpm install
123-
pnpm dev
124-
```
119+
> [!TIP]
120+
> Check also the [deployment](#deployment) section to learn how to access to the `testnet` and `preview` environments.
125121
126122
## How the API works
127123

@@ -176,18 +172,28 @@ It will also set empty values for `missed`, `rewarded`, `likelihood`, and `domin
176172
> [!NOTE]
177173
> Having a `UnelectedUntrackedValidator` should only be when the validator has been selected for the first time in history.
178174
179-
### Score calculator
180-
181-
To learn more about the algorithm the calculation of the score, check:
182-
183-
- [Documentation](./packages/nimiq-validator-trustscore/README.md).
184-
- [`nimiq-validator-trustscore`](https://www.nimiq.com/developers/learn/validator-trustscore) package.
185-
186-
#### Development
175+
## Development
187176

188177
Once it is cloned and installed the dependencies, you must run:
189178

190179
```bash
191180
pnpm db:generate
192181
pnpm dev # or pnpm dev:local to use the local database
193182
```
183+
184+
## Deployment
185+
186+
The deployment is handled by [`NuxtHub Action`](./.github/workflows/nuxt-hub.yml).
187+
188+
There are 4 different environments:
189+
190+
| Nuxt Hub Env | GitHub Env | Dashboard URL | Trigger |
191+
| ------------ | -------------------- | -------------------------------------------------------------------------- | ----------------------------- |
192+
| `production` | `production-mainnet` | [Validators API Mainnet](https://validators-api-mainnet.pages.dev) | Push to `main` branch |
193+
| `production` | `production-testnet` | [Validators API Testnet](https://validators-api-testnet.pages.dev) | Push to `main` branch |
194+
| `preview` | `preview-mainnet` | [Validators API Mainnet Preview](https://validators-api-preview.pages.dev) | Push any commit to any branch |
195+
| `preview` | `preview-testnet` | [Validators API Testnet Preview](https://validators-api-preview.pages.dev) | Push any commit to any branch |
196+
197+
Each Nuxt Hub environment has its own database, so effectively we have 4 different databases and there 4 tasks in the [`sync.yml`](./.github/workflows/sync.yml) workflow that are responsible for syncing the data from the Nimiq network to the database.
198+
199+
**Write operations to `main` are restricted**, only via PR.

0 commit comments

Comments
 (0)