Skip to content

ArthurHoeke/cyclops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Cyclops keeps a watchful eye on your Polkadot validators, giving you a clear vision of their performance and rewards.
View demo »

· Report Bug · Request Feature

About Cyclops

image

Cyclops is a validator dashboard application built using Angular and Node/Express that helps Polkadot network validators easily keep track of all their validators, their income, and performance. Cyclops uses the Polkadot Subscan API to gather data and provide a reliable source of validator information.

Built With

  • Angular
  • Typescript
  • Expressjs
  • Sqlite
  • Bootstrap
  • Sass

Getting Started

Cyclops requires both the front-end and back-end to be running in order for the application to work. Each folder has its own readme file with instructions on how to launch the front-end and back-end servers.

Prerequisites

  • Node package manager

    apt install nodejs
  • Angular

    npm install -g @angular/cli

Front-end

The front-end of Cyclops is built using Angular. For instructions on how to launch the front-end server, please see the readme file located in the front-end folder.

Back-end

The back-end of Cyclops is built using Node/Express. For instructions on how to launch the back-end server, please see the readme file located in the back-end folder.

Usage

To use Cyclops, both the front-end and back-end servers need to be running.

First, navigate to the front-end folder and run npm install to install all the necessary dependencies. Then, run ng serve to start the front-end server. Next, navigate to the back-end folder and run npm install to install all the necessary dependencies. Finally, run npm start to start the back-end server. Once both servers are running, you can navigate to localhost:4200 in your browser to access Cyclops.

Please refer to the individual readme files in each folder for more detailed instructions on how to setup the servers.

By default cyclops will run over the HTTP protocol, note that this is only meant for internal testing. HTTP should never be used for production, and will cause API issues with the w3f 1kv end-points. Once you have confirmed Cyclops to be running properly locally, you should obtain an SSL certificate and enable HTTPS by doing the following:

  1. Obtain an SSL certificate. I'd highly recommend using letsencrypt, a service which provides free SSL certificates. The next couple of bullet points will go over obtaining a certificate using letsencrypt, if you're using your own method please skip to bullet point 4.
  2. Install letsencrypt's certbot sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot
  3. Generate your certificate using certbot certonly --manual and follow the setup steps.
  4. Uncomment the following lines from app.js: 24, 25, 26, 28, 29, 30, 31, 32, 69 and replace the variable app with server on line 98. If you are not using certbot, please replace the paths of privkey.pem, cert.pem and chain.pem.

Once the back-end server is running using HTTPS, make sure to adjust the front-end API end-point on this line and create a build of the front-end using ng build. ng serve should never be used to host the production front-end.

Contributing

Contributions to Cyclops are welcome and greatly appreciated!

  1. Start by forking this repository and creating a new branch for your changes. (git checkout -b feature/myFeature)
  2. Make your changes and commit them to your branch. (git commit -m 'Some feature') (git push origin feature/myFeature)
  3. Submit a pull request with your changes

Be sure to provide a clear and detailed description of your changes in the pull request, and include any relevant information about why your changes are important or necessary.

License

Distributed under the Apache 2.0 License. See LICENSE.txt for more information.