Ordbot

ยท 146 words ยท 1 minute read
Whatsapp chatbot to place and manage orders

ordbot

Github

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
  • The app will be available at http://localhost:3000