Glific - Two Way Open Source Communication Platform

License: AGPL v3Code coverage badgeGlific on hex.pmGitHub issuesDiscordcodebeat badgeCommitsGlific

Pre-requisites

There is level of understanding middle to advanced level. It is assumed that you know how to use a terminal, install things and have git; for the backend, and for the frontend use install yarn and react.

  1. Software dependency - Postgres server
  2. Software dependency - Erlang / Elixir
  3. Backend - Download
  4. External service - Gupshup. <-- Get a Free trial to get API-key
  5. External service - Oban. <-- Needs 100 Euro per month
  6. Backend - Install certificate
  7. Backend - Config
  8. Frontend

1. Software dependency - Postgres server

For Postgres, for the development server, we default to using postgres/postgres as the username/password. This is configurable

We tested and developed against the following version:

    - postgres : v13.x

2. Software dependency - Erlang / Elixir

For Ubuntu users you also need to install the inotify-tools package

We tested and developed against the following versions:

    - erlang : 24.3.4
    - elixir : 1.14.2-otp-24

3. Backend - Download

git clone https://github.com/glific/glific

DO NOT run mix deps.get until the next steps are completed.

4. External service - Gupshup Create and link your Gupshup Account

Gupshup is an external service that connects to WhatsApp

You will need to do the following:

a. Create a Gupshup Account b. Create an app and select Access API c. You can name it NewNameHere "GlificTest <-- Bot Name is already in use, then use anotherone" d. Edit glific_backend/config/dev.secret.exs e. Find your API Key, check top left corner or inside the curl sample message f. Enter your APP name

5. External service - Oban Pro

Oban is a cron-like library. Glific depends 100% on job processing. Oban is required before running mix for Glific to operate.

For contributors: Please get in touch with the team on Discord and get a limited time key.

For production use: You must purchase license. When purchashing you must buy WEB+PRO . After you purchased Go to account and get this information and run this in glific_backend

mix hex.repo add oban https://getoban.pro/repo --fetch-public-key SHA256:4/abc/edf/gef+aIWPc --auth-key abdedcqweasdj__KEY_AUTH__asdafasdf

Copy the --auth KEY and run this other command

mix hex.organization auth oban --key abdedcqweasdj__KEY_AUTH__asdafasdf

Make sure your key is in the list

mix hex.repo list
Name        URL                             Public key                                          Auth key
oban        https://getoban.pro/repo        SHA256:4/abc/edf/gef+aIWPc   abdedcqweasdj__KEY_AUTH__asdafasdf

If you see it twice, it will not work and fail, since Oban moved from public repository to private this is how an example of failing looks like

Name        URL                             Public key                                          Auth key
hexpm:oban  https://repo.hex.pm/repos/oban  SHA256:abc/edf/gef+aIWPc     abdedcqweasdj__KEY_AUTH__asdafasdf
oban        https://getoban.pro/repo        SHA256:4/abc/edf/gef+aIWPc   abdedcqweasdj__KEY_AUTH__asdafasdf

this is wrong, and you run mix deps.get it will try to fetch from public and ignore private and fail simply remove the public one

mix hex.repo remove hexpm:oban

Now check again

mix hex.repo list
Name        URL                             Public key                                          Auth key
oban        https://getoban.pro/repo        SHA256:4/abc/edf/gef+aIWPc   abdedcqweasdj__KEY_AUTH__asdafasdf

6. Install certificate - Use SSL for frontend and backend

Before install also you need to create this SSL cert simila to this Go to glific_backend folder in the terminal console.

      ❯ ls -1
      glific.test+*-key.pem
      glific.test+*.pem
      glific.test+*-key.pem
      glific.test+*.pem
      ❯ cp glific.test+*-key.pem glific.test+1-key.pem
      ❯ cp glific.test+*.pem glific.test+1.pem
  And check again
      ❯ ls -1
      glific.test+*-key.pem
      glific.test+*.pem
      glific.test+*-key.pem
      glific.test+*.pem
      glific.test+*-key.pem
      glific.test+*.pem

7. Backend - Config

Now you can visit localhost:4000 from your browser.

8. Frontend - Install glific frontend

You cannot do much from the glific backend unless you are an API developer. To see Glific in its glory, please install Glific Frontend

Front end credentials

Optional - Using NGROK

Updating your instance

For v0.x releases, we will be resetting the DB and not saving existing state. Run the following commands to update your codebase from the glific repository.

Documentation

Learn more

Glific

Chat with us

Funders

Thanks to our generous funders over the past few years who have funded this project: