Git Product home page Git Product logo

bot-busters's Introduction

Bot Busters

Chat, be human and bust bots!

Local development

Before running the app in dev mode, make sure you have a running instance of Docker, and run the following command from the root directory to spin up a database instance:

yarn db:run

Create a .env file from .env.example:

cp .env.example .env

Building and running

To build and run the application locally, run the following commands:

yarn install
yarn build
yarn start

Running in dev mode

⚠️ There are currently some issues with router redirection when using yarn dev. Please prefer running it with yarn start until those issues are fixed.

Build and run the development web socket:

yarn dev:ws

Open another terminal window and run the application in dev mode:

yarn dev

Happy hacking!

Generating database migrations

Whenever you make some changes to the database schemas and tables, make sure to run the following commands to generate the migrations:

yarn build
yarn db:gen-migrations

Run yarn start and navigate to the application URL to make sure they are running correctly.

Getting started with Aleo

Aleo is aiming to build a platform for web applications that are performant, secure, and private.

Getting started

Before getting started there are a few prerequisites that you need to have installed on your machine. these are listed below:

Now its time to install the Aleo tools. There are two tools that you need to install:

Leo: a high-level language that abstracts low-level cryptography concepts and makes it easy to integrate private applications into your stack. This language is used to create programs on the Aleo network.

# Download the source code
git clone https://github.com/AleoHQ/leo
cd leo

# Build and install
cargo install --path .

snarkOS: this is a decentralized operating system for zero-knowledge applications. This code forms the backbone of Aleo network, which verifies transactions and stores the encrypted state applications in a publicly-verifiable manner.

git clone https://github.com/AleoHQ/snarkOS.git
cd snarkOS
git checkout testnet3
cargo install --path .

Now that we have installed the necessary tools we can start building our first smart contract. Let's first use SnarkOS to run a local Aleo node where we are going to deploy our programs during development.

Run the chain locally

To run a local instance of an Aleo network, you have to install SnarkOS CLI and tmux on your computer, then run the following command from the Bot Busters root directory:

yarn aleo:devnet

You can type ctrl+b and type :kill-session to stop the network.

Deploy the Leaderboard program locally

To deploy the Leaderboard program locally, set the following variables in your .env file:

ALEO_NETWORK_URL="http://localhost:3030"
ALEO_PRIVATE_KEY="APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH"
LEADERBOARD_PROGRAM_NAME="leaderboard.aleo"

These are the same as the defaults copied from .env.example.

Build the program:

yarn aleo:build-leaderboard

Deploy the program:

yarn aleo:deploy-leaderboard

It's normal for the script to take a while to complete.

If you wish to re-deploy the leaderboard you will have to update its name in the .env before re-running the deploy script. Aleo uses program names as identifiers, thus 2 programs with the same name cannot co-exist on the same network.

Deploy HPA

Create monitoring namespace:

kubectl create namespace monitoring

Deploy Prometheus:

kubectl apply -f deployment/templates/prometheus/

Deploy Prometheus adapter:

kubectl apply -f deployment/templates/prometheus-adapter/

You may need to restart the Prometheus adapter pod.

bot-busters's People

Contributors

silimarius avatar privilegemendes avatar mautjee avatar ramidecodes avatar tsungaichipato avatar carlos-kryha avatar frankbenji 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.