Git Product home page Git Product logo

www.validators.app's Introduction

Validators.app

This is code repository for Validators.app.
https://www.validators.app/

System dependencies

  • Ruby 2.7.5 (as denoted in the .ruby-version file)
  • Rails 6.1+
  • MySQL 8
  • Redis 6+
  • Node 16.14+
  • Solana CLI (see instruction below)

Configuration Notes

  • Ask someone in charge about the development master.key
  • To edit credentials run EDITOR=vim rails credentials:edit. To open in a different editor, e.g. in atom, use EDITOR="atom --wait" rails credentials:edit
  • Copy config/cluster.yml.example to config/cluster.yml
  • Copy config/database.yml.example to config/database.yml and edit to reflect the proper database name, user name and other settings.
  • Developers using Mac OS will need to brew install shared-mime-info before bundle install
  • Copy config/sidekiq.yml.example to config/sidekiq.yml. This repo is configured for the free version of Sidekiq. Review the Gemfile and config/routes.rb files if you are using Sidekiq Pro.

Database

  • Make sure you have database.yml with correct settings.
  • run rake db:setup to create and migrate the database from schema (db/schema.rb).
  • run rake db:seed for basic data generation.
  • Then follow instructions in database_instructions on Keybase.

Copying data to staging

To enable copying records to staging database set copy_records_to_stage in credentials file to true.

Solana CLI

https://docs.solana.com/cli/install-solana-cli-tools

Installation

sh -c "$(curl -sSfL https://release.solana.com/v<version>/install)"

Upgrade

solana-install init <version>

Check current version

solana -V

Attribute Encryption

Attribute encryption on models is required for any attribute that contains personal information or other sensitive data. The default solution is the attr_encrypted gem. A more secure alternative is Vault.

Vault

Vault is an optional component to this project. We mostly are using its Encryption As A Service feature. This functionality is wrapped by the vault-rails gem.
In the test and development modes you do not need an actual Vault server running. The gem will intercept and perform all encryption that would normally by done by the Vault encryption server.
To use Vault, search the project for 'vault' and read the comments.

Captcha

Visit https://developers.google.com/recaptcha/intro to see how to use reCAPTCHA. You'll need to register your website at https://www.google.com/recaptcha/admin/, choose captcha type, and you'll get site_key and secret_key. Put them in the credentials.
For development, you will find sample keys in config/credentials.yml.enc.

Tests

How to run the test suite:

  • To run all tests: rails test
  • To run all tests from specific directory: rails test test/models
  • To run all tests from specific file: rails test test/models/article_test.rb
  • To run specific test and line: rails test test/models/article_test.rb:6

If you see errors related to yarn while running tests locally, try rake assets:clobber and yarn install.

Continuous Integration

We use Github Actions. See .github directory for more details.
The test credentials are kept in config/credentials/test.yml.enc. We have encrypted test.key to decrypt these credentials.
To decrypt the file: gpg --output config/credentials/test.key --decrypt config/credentials/test_key.gpg.
To encrypt the file: gpg -c --output config/credentials/test_key.gpg config/credentials/test.key.
To decrypt and encrypt the file you need a passphrase, please ask your team leader about it.

Deployment

Deployments are handled by Capistrano. Follow the instructions for Capistrano.

  • To deploy run: cap production deploy.
  • To rollback to the previous version: cap production deploy:rollback ROLLBACK_RELEASE=2022XXXXXXXX
  • To restart application: cap production deploy:restart

Data Centers

  • To append validator to Data Center of your choice use append_to_data_center.rb .
  • To change validator's Data Center with usage of MaxMind service use change_validator_data_center.rb service.

Validators Stack

Gems

www.validators.app's People

Contributors

brianlong avatar maciejkocylapc avatar kbiala avatar radek-polcode avatar tvannurden avatar kamtarnowski avatar dependabot[bot] avatar msowanska avatar psuchta avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.