Skip to content

tarunvelli/ordbot

Repository files navigation


Ordbot

SAAS Project that enables small to medium vendors to sell via WhatsApp

Installation

Prerequisites

Local

  • Ruby: we recommend using rvm to manage the Ruby versions. Install the requried ruby version with rvm. rvm install 2.6.5
  • Yarn 1.x: please refer to their installation guide.
  • PostgreSQL 11 or higher.

Production

Steps

  • Clone repository
git clone https://github.com/tarunvelli/ordbot.git
  • Change into into repo directory
cd ordbot
  • Install gems
bundle install
  • Install node_modules
yarn install
  • Add .env file (can copy .env_sample) and add required values

    • To generate keys for ACCOUNT_SID_ENCRYPTION_KEY and AUTH_TOEKN_ENCRYPTION_KEY run the following in rails console and copy to .env
    `rake secret\`[0..31]
    
    • To generate keys for CIPHER_KEY run the following in rails console and copy to .env
    len   = ActiveSupport::MessageEncryptor.key_len
    salt  = SecureRandom.random_bytes(len)
    key   = ActiveSupport::KeyGenerator.new('<some_password>').generate_key(salt, len)
    Base64.encode64(key)
    
  • Run the server

rails server