{"id":19067093,"url":"https://github.com/x-cash-official/delegates-supervisor","last_synced_at":"2025-07-07T21:36:59.644Z","repository":{"id":43430398,"uuid":"244561816","full_name":"X-CASH-official/delegates-supervisor","owner":"X-CASH-official","description":"👩‍💻 Delegates status supervisor - Check delegates statistics and status ","archived":false,"fork":false,"pushed_at":"2022-06-03T01:51:15.000Z","size":993,"stargazers_count":3,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T09:41:23.688Z","etag":null,"topics":["dpos","website","xcash"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/X-CASH-official.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-03T06:44:31.000Z","updated_at":"2021-12-05T09:49:06.000Z","dependencies_parsed_at":"2022-09-09T08:22:30.803Z","dependency_job_id":null,"html_url":"https://github.com/X-CASH-official/delegates-supervisor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-CASH-official%2Fdelegates-supervisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-CASH-official%2Fdelegates-supervisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-CASH-official%2Fdelegates-supervisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-CASH-official%2Fdelegates-supervisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/X-CASH-official","download_url":"https://codeload.github.com/X-CASH-official/delegates-supervisor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249428484,"owners_count":21270467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dpos","website","xcash"],"created_at":"2024-11-09T00:59:11.367Z","updated_at":"2025-04-18T04:31:59.180Z","avatar_url":"https://github.com/X-CASH-official.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=middle\u003e\n\n\u003ca align=\"center\" href=\"https://x-network.io/xcash\"\u003e\u003cimg src=\"header.png\" alt=\"X-Cash Core\"\u003e\u003c/a\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat)](https://opensource.org/licenses/MIT)\n[![Discord](https://img.shields.io/discord/470575102203920395?logo=discord)](https://discordapp.com/invite/4CAahnd)\n\n\u003c/div\u003e\n\n# X-Cash Delegates Supervisor\n\n👨‍💻 **Easy access to your statistics and information on the latest block creation**\n\n*Admin-panel-styled dashboard forked from [cdk-admin](https://github.com/codetok/cdk-admin), an Angular 6 admin panel using angular material.*\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Features](#features)\n- [License](#license)\n- [Contributing](#contributing)\n- [Documentation](#documentation)\n- [Security](#security)\n- [Installation Process](#installation-process)\n  - [Dependencies](#dependencies)\n  - [Requirements](#requirements)\n  - [Develop](#develop)\n  - [Testing](#testing)\n- [Installation Process LXC](#installation-process-lxc)\n  - [Dependencies](#dependencies)\n  - [Requirements](#requirements)\n  - [Update Process](#update-process)\n  - [Testing](#testing)\n\n## Features\n\n\u003e This website is *optional* to run for solo delegates. It can be setup on a separate system than the `xcash-dpops` node as it's using API calls to the explorer.\n\n**One-stop Dashboard**  \nHave a quick view of the latest block creation and your delegate statistics.\n\n## License\n\n**The X-Cash Delegate Supervisor is an open-source project managed by the X-Cash Foundation**.  \nWe are operating under the [MIT License](LICENSE).\n\n## Contributing\n\n**Thank you for thinking of contributing! 😃**   \nIf you want to help out, check [CONTRIBUTING](https://github.com/X-CASH-official/.github/blob/master/CONTRIBUTING.md) for a set of guidelines and check our [opened issues](https://github.com/X-CASH-official/delegates-explorer/issues).\n\n## Documentation\n\nWe are hosting our documentation on **GitBook** 👉 [**docs.xcash.foundation**](https://docs.xcash.foundation/)\n\n\u003e You can contribute directly on our [`gitbook-docs`](https://github.com/X-CASH-official/gitbook-docs) repository.\n\n## Security\n\nIf you discover a **security** vulnerability, please send an e-mail to [security@xcash.foundation](mailto:security@xcash.foundation).  \nAll security vulnerabilities concerning the X-Cash blockchain will be promply addressed.\n\n## Installation Process\n\n### Dependencies\n\n\u003e The following table summarizes the tools and libraries required to run the delegates pool website.\n\n| Dependencies | Min. version   | Ubuntu package                                                      |\n| ------------ | -------------- | ------------------------------------------------------------------- |\n| `Node.js`      | 8              | install from binaries                                               |\n| `Angular`      | 6              | install from `npm`                                                    |\n| `Nginx`  | any | `nginx` |\n\n\n**If you want to run the website using SSL then you will need to install a webserver like nginx  \nThe readme shows you how to setup the website using HTTP, since there is no sensitive data in the website**\n\n### Requirements\n\n#### Installing NGINX\n`sudo apt update \u0026\u0026 sudo apt install -y nginx`\n\n#### Configure NGINX\nNGINX is already configured for a single website once installed.\n\nJust edit the nginx default configuration to enable subfolder:\n\n```bash\nsudo nano /etc/nginx/sites-available/default\n```\n\nChange\n```bash\nlocation / {\n  try_files $uri $uri/ =404;\n}\n```\nto\n```bash\nlocation / {\n  try_files $uri $uri/ /index.html;\n}\n```\n\nNow, you can copy the dist folder contents to `/var/www/html/` to install the website\n\n\n#### Intalling Node.js from binaries\n\n\u003e It is recommended to install the nodejs folder in the home directory `/home/$USER/` or root directory (`/root/`) in a new folder\n\nTo download, go to the Node.js official [release page](https://nodejs.org/en/download/current/) and download the **Linux Binaries**. Copy it to your deisgnated folder and run these commands:\n\n```bash\ntar -xf node*.tar.xz\nrm node*.tar.xz\n```\n\nThen add Node.js to your path:\n\n```bash\necho -e '\\nexport PATH=path_to_nodejs/bin:$PATH' \u003e\u003e ~/.profile \u0026\u0026 source ~/.profile\n```\n\u003e Replace `path_to_nodejs/bin` with the location of the `bin` folder where you installed Node.js\n\n#### npm\n\n\u003e Note if your installing on a `root` session, you need to run these additional commands before upgrading\n\u003e ```bash\n\u003e npm config set user 0\n\u003e npm config set unsafe-perm true\n\u003e ```\n\nUpdate `npm` globally:\n```bash\nnpm install -g npm\n```\n\n#### angular\n\nInstall the latest version of Angular globally:\n```shell\nnpm install -g @angular/cli@latest\n```\n\nThen install the compressor `UglifyJS` globally :\n```shell\nnpm install -g uglify-js\n```\n\n### Develop\n\n#### Clone repository\n\nIn your desired folder, clone the repository:\n```shell\ngit clone https://github.com/X-CASH-official/delegates-supervisor.git\n```\n\n#### Enable port 80 in the firewall\n\nUncomment these lines in `$HOME/firewall_script.sh`\n```\n# iptables -t filter -I INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 100 --connlimit-mask 32 -j DROP\n```\n\n```\n# iptables -A INPUT -p tcp --dport 80 -j ACCEPT\n```\n\nRun the firewall script  \n`$HOME/firewall_script.sh`\n\n#### Configure\n\nAdd your node wallet public address for the API calls:\n```shell\nnano delegates-supervisor/src/app/services/public_address.service.ts\n```\n\nEdit Line 7:\n\n`PUBLIC_ADDRESS:string = \"\"`\n\nto\n\n`PUBLIC_ADDRESS:string = \"\u003cYOUR_NODE_WALLET_PUBLIC_ADDRESS\u003e\"`\n\n\n#### Build\n\nTo build the delegates pool website, go to the `delegates-supervisor` folder and run:\n```shell\nnpm run build\n```\n\nIt will build in the `dist`folder.\n\nCompress the `.js` files with `Uglify-JS` and move all of the contents of this folder to your `xcash-dpops/` folder\n\n```shell\ncd dist\nfor f in *.js; do echo \"Processing $f file..\"; uglifyjs $f --compress --mangle --output \"{$f}min\"; rm $f; mv \"{$f}min\" $f; done\ncd ../\n```\n\nCopy the dist folders contents to the default nginx setup  \n`cp -a dist/* /var/www/html/`\n\n### Testing\n\n```shell\nnpm test\n```\n\nTo test that you have properly configured the delegates pool website, run `xcash-dpops` with the `--test_data_add` flag. *This will add test datas to the MongoDB.*\n\nNow run the website server again using the normal options.\n\nNext, navigate to your servers IP address or website domain. You should now see the website and some test data. You can navigate through the website using the test data.\n\nWhen you have verified that the website works correctly, remove the test data by shutting down the `xcash-dpops` and then running it again with the `--test_data_remove` flag.\n\n## Installation Process LXC\n\n### Dependencies\n\n\u003e The following table summarizes the tools and libraries required to run the delegates explorer.\n\n| Dependencies | Min. version   | Ubuntu package                                                      |\n| ------------ | -------------- | ------------------------------------------------------------------- |\n| `Node.js`      | 8              | install from binaries                                               |\n| `Angular`      | 6              | install from `npm`                                                    |\n| `nginx`                                  | latest version | install from script |\n\n### Requirements\n\n#### Update LXD\n\n\u003e LXD is a Linux Container system manager. Learn more [here](https://linuxcontainers.org/)\n\n*You can install and update the website in a LXD/LXC container using the [`xcash-dpops`](https://github.com/X-CASH-official/xcash-dpops/tree/master#system-requirements) auto-installer.*\n\nCheck if LXD is installed:\n```bash\nlxd --version\n```\n\nIf it displays a version, it is recommneded to uninstall it to update it manually. Run:\n```bash\nsudo apt remove -y --purge lxd lxd-client\n```\n\nThen reinstall the latest version:\n```bash\nsudo snap install lxd\n```\n\nRun the configuration for LXD and set the default selection to the configuration questions:\n\n```bash\nlxd init\n```\n\n\u003e For the size of the new loop device **specify 80-90% of your disk space**. Your containers won't have an artifical low disk space limit.\n\n#### Install from script\n\nRun the `autoinstaller.sh` to install the website into a LXC/LXD container:\n\n```bash\nbash -c \"$(curl -sSL https://raw.githubusercontent.com/X-CASH-official/delegates-supervisor/master/scripts/autoinstaller.sh)\"\n```\n\nThe website will be started in the LXC container.\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eContainer commands\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Start the container  \nlxc start container\n\n# Stop the container  \nlxc stop container\n\n# Delete the container (The container must be stopped first)  \nlxc delete container\n\n# Open a terminal inside the container  \nlxc exec container -- bash\n\n# Exit the terminal  \nexit\n\n# List all running containers  \nlxc list\n```\n\n\u003c/details\u003e\n\n#### Configure the container\n\nYou need to setup port forwarding on the container to route all traffic on `port 80` to the container.\n\nCheck the containers private IPV4 address:\n```bash\nlxc list\n```\n\nThen forward the ports to the containers private IP address:  \n```bash\nlxc config device add delegates-supervisor delegates-supervisor-80 proxy listen=tcp:PUBLIC_IP_OF_SERVER:80 connect=tcp:PRIVATE_IP_OF_CONTAINER:80\n```\n\n#### Remove proxy\n\n```bash\nlxc config device remove delegates-supervisor delegates-supervisor-80\n```\n\n\n### Update Process\n\nRun the `autoinstaller.sh` on the host and choose the update mode:\n\n```bash\nbash -c \"$(curl -sSL https://raw.githubusercontent.com/X-CASH-official/delegates-supervisor/master/scripts/autoinstaller.sh)\"\n```\n\n### Testing\n\n```bash\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-cash-official%2Fdelegates-supervisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-cash-official%2Fdelegates-supervisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-cash-official%2Fdelegates-supervisor/lists"}