|
1 | 1 | # Rex Staking Portal
|
2 |
| - |
3 | 2 | This is a staking UI for EOS REX built in SvelteKit.
|
4 | 3 |
|
5 |
| -It simplifies the process of staking, unstaking, and claiming rewards post tokenomics-2 upgrade. |
| 4 | +It simplifies the process of staking, un-staking, and claiming rewards post-tokenomics-2 upgrade. |
| 5 | + |
| 6 | +You can see it live at [https://stake.eosnetwork.com](https://stake.eosnetwork.com). |
| 7 | + |
| 8 | +<!-- contents box begin --> |
| 9 | +<table> |
| 10 | +<tr/> |
| 11 | +<tr> |
| 12 | +<td> |
| 13 | +<p/> |
| 14 | +<div align="center"> |
| 15 | +<b>Contents</b> |
| 16 | +</div> |
| 17 | +<p/> |
| 18 | +<!-- contents markdown begin --> |
6 | 19 |
|
7 |
| -You can see it live at https://stake.eosnetwork.com/ |
| 20 | +1. [Development](#development) |
| 21 | + 1. [Prerequisites](#prerequisites) |
| 22 | + 1. [Initialization](#initialization) |
| 23 | + 1. [Build](#build) |
| 24 | + 1. [Serve](#serve) |
| 25 | +1. [See Also](#see-also) |
| 26 | + |
| 27 | +<!-- contents markdown end --> |
| 28 | +<p/> |
| 29 | +</td> |
| 30 | +</tr> |
| 31 | +</table> |
| 32 | +<!-- contents box end --> |
8 | 33 |
|
9 | 34 | ## Development
|
| 35 | +Start here to build this project or to contribute to this repo. |
| 36 | + |
| 37 | +> [!NOTE] |
| 38 | +> The source of truth for the version of nodeJS this project supports is the [`.nvmrc`](./.nvmrc) file. Backward- or forward-compatibility with other versions of `node` is made on a best-effort basis, but is not guaranteed. |
10 | 39 |
|
| 40 | +### Prerequisites |
| 41 | +You will need the following tools: |
| 42 | +- [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) |
| 43 | +- [nodeJS](https://www.w3schools.com/nodejs/nodejs_intro.asp) |
| 44 | + Install `node` using `nvm`. In the root of this repo: |
| 45 | + ```bash |
| 46 | + nvm install |
| 47 | + ``` |
| 48 | + This will automagically install and use the correct version of `node` for this project, as defined in the [`.nvmrc`](./.nvmrc) file. |
| 49 | +- [yarn](https://yarnpkg.com) version 1 |
| 50 | + The easiest way to install this is using `npm`, which is installed with `node` by `nvm`. |
| 51 | + ```bash |
| 52 | + npm install --global yarn |
| 53 | + ``` |
| 54 | +These tools are all you need to get started! |
| 55 | + |
| 56 | +### Initialization |
| 57 | +Once you have the [prerequisites](#prerequisites) installed, you can get going by making sure `nvm` is using the correct version of nodeJS... |
| 58 | +```bash |
| 59 | +nvm install |
| 60 | +``` |
| 61 | +...and then downloading all project dependencies. |
11 | 62 | ```bash
|
12 |
| -bun i |
13 |
| -bun dev |
| 63 | +yarn |
14 | 64 | ```
|
| 65 | +Easy. |
| 66 | + |
| 67 | +### Build |
| 68 | +This is how release artifacts are generated. |
| 69 | +```bash |
| 70 | +yarn build |
| 71 | +``` |
| 72 | +The "build" generates a `build` folder in the root of the repo that can be uploaded directly to AWS S3 using the web console, AWS CLI, or with something like ~~Terraform~~ Tofu. |
| 73 | + |
| 74 | +### Serve |
| 75 | +Running this... |
| 76 | +```bash |
| 77 | +yarn serve |
| 78 | +``` |
| 79 | +...uses [Caddy](https://caddyserver.com) in `file_server` mode to publish the build artifacts in the `build` folder in the root of the repo at port `8443` to emulate an S3 bucket. You can load this in your browser by nativating to [https://localhost:8443](https://localhost:8443). |
| 80 | + |
| 81 | +Press `[Ctrl]` + `[C]` to stop the server. |
| 82 | + |
| 83 | +## See Also |
| 84 | +More resources. |
| 85 | +- [aws-cloudwatch-alarm-handler](https://github.com/eosnetworkfoundation/aws-cloudwatch-alarm-handler) lambda |
| 86 | +- [devhub](https://github.com/eosnetworkfoundation/devhub) - learn portal |
| 87 | +- [telegram-bot](https://github.com/eosnetworkfoundation/telegram-bot) lambda |
| 88 | + |
| 89 | +--- |
| 90 | +> **_Legal Notice_** |
| 91 | +> This repo contains assets created in collaboration with a large language model, machine learning algorithm, or weak artificial intelligence (AI). This notice is required in some countries. |
0 commit comments