Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
87 changes: 82 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,91 @@
# Rex Staking Portal

This is a staking UI for EOS REX built in SvelteKit.

It simplifies the process of staking, unstaking, and claiming rewards post tokenomics-2 upgrade.
It simplifies the process of staking, un-staking, and claiming rewards post-tokenomics-2 upgrade.

You can see it live at [https://stake.eosnetwork.com](https://stake.eosnetwork.com).

<!-- contents box begin -->
<table>
<tr/>
<tr>
<td>
<p/>
<div align="center">
<b>Contents</b>
</div>
<p/>
<!-- contents markdown begin -->

You can see it live at https://stake.eosnetwork.com/
1. [Development](#development)
1. [Prerequisites](#prerequisites)
1. [Initialization](#initialization)
1. [Build](#build)
1. [Serve](#serve)
1. [See Also](#see-also)

<!-- contents markdown end -->
<p/>
</td>
</tr>
</table>
<!-- contents box end -->

## Development
Start here to build this project or to contribute to this repo.

> [!NOTE]
> 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.

### Prerequisites
You will need the following tools:
- [nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
- [nodeJS](https://www.w3schools.com/nodejs/nodejs_intro.asp)
Install `node` using `nvm`. In the root of this repo:
```bash
nvm install
```
This will automagically install and use the correct version of `node` for this project, as defined in the [`.nvmrc`](./.nvmrc) file.
- [yarn](https://yarnpkg.com) version 1
The easiest way to install this is using `npm`, which is installed with `node` by `nvm`.
```bash
npm install --global yarn
```
These tools are all you need to get started!

### Initialization
Once you have the [prerequisites](#prerequisites) installed, you can get going by making sure `nvm` is using the correct version of nodeJS...
```bash
nvm install
```
...and then downloading all project dependencies.
```bash
bun i
bun dev
yarn
```
Easy.

### Build
This is how release artifacts are generated.
```bash
yarn build
```
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.

### Serve
Running this...
```bash
yarn serve
```
...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).

Press `[Ctrl]` + `[C]` to stop the server.

## See Also
More resources.
- [aws-cloudwatch-alarm-handler](https://github.com/eosnetworkfoundation/aws-cloudwatch-alarm-handler) lambda
- [devhub](https://github.com/eosnetworkfoundation/devhub) - learn portal
- [telegram-bot](https://github.com/eosnetworkfoundation/telegram-bot) lambda

---
> **_Legal Notice_**
> 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.
Binary file removed bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions scripts/serve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ echo -e '\e[1;36mURL: https://localhost:8443\e[0m'
echo -e '\e[1;93mPress [Ctrl] + C to exit...\e[0m'

ee "docker run -v \"\$(git rev-parse --show-toplevel):/http\" -w '/http' -p '8443:8443' caddy caddy run --config caddyfile"
echo "Done. - ${BASH_SOURCE[0]}"
Loading