{"id":13833582,"url":"https://github.com/glific/glific","last_synced_at":"2026-06-15T02:05:27.639Z","repository":{"id":37012960,"uuid":"268527652","full_name":"glific/glific","owner":"glific","description":"The Main application that provides the core interface via the glific APIs","archived":false,"fork":false,"pushed_at":"2026-05-20T18:15:17.000Z","size":20027,"stargazers_count":214,"open_issues_count":166,"forks_count":86,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-05-20T22:53:49.057Z","etag":null,"topics":["elixir","graphql","postgres","whatsapp-business-api"],"latest_commit_sha":null,"homepage":"https://glific.org","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glific.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-01T13:18:02.000Z","updated_at":"2026-05-20T17:27:00.000Z","dependencies_parsed_at":"2023-12-29T23:22:55.072Z","dependency_job_id":"3285e817-5c5e-47d7-b70b-eeabdb82fe03","html_url":"https://github.com/glific/glific","commit_stats":null,"previous_names":[],"tags_count":374,"template":false,"template_full_name":null,"purl":"pkg:github/glific/glific","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glific%2Fglific","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glific%2Fglific/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glific%2Fglific/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glific%2Fglific/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glific","download_url":"https://codeload.github.com/glific/glific/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glific%2Fglific/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33488942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T14:31:05.219Z","status":"ssl_error","status_checked_at":"2026-05-25T14:31:02.878Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","graphql","postgres","whatsapp-business-api"],"created_at":"2024-08-04T12:00:51.284Z","updated_at":"2026-05-25T19:02:54.138Z","avatar_url":"https://github.com/glific.png","language":"Elixir","funding_links":[],"categories":["Running the update"],"sub_categories":["By Popularity"],"readme":"# Glific - Two Way Open Source Communication Platform\n\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n![](https://github.com/glific/glific/workflows/Continuous%20Integration/badge.svg)\n[![Code coverage badge](https://img.shields.io/codecov/c/github/glific/glific/master.svg)](https://codecov.io/gh/glific/glific/branch/master)\n[![Glific on hex.pm](https://img.shields.io/hexpm/v/glific.svg)](https://hexdocs.pm/glific/)\n![GitHub issues](https://img.shields.io/github/issues-raw/glific/glific)\n[![Discord](https://img.shields.io/discord/717975833226248303.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/MVf2KF)\n[![codebeat badge](https://codebeat.co/badges/dd951390-5f51-4c98-bddc-0b618bdb43fd)](https://codebeat.co/projects/github-com-glific-glific-master)\n[![Commits](https://img.shields.io/github/commit-activity/m/glific/glific)](https://img.shields.io/github/commit-activity/m/glific/glific)\n[![Glific](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/ocex65\u0026style=flat\u0026logo=cypress)](https://dashboard.cypress.io/projects/ocex65/runs)\n\n## Table of Contents\n\n* [Pre-requisites](#1-pre-requisites)\n   * [Software Dependencies](#software-dependencies)\n     * [Erlang / Elixir](#erlang--elixir)\n     * [Postgres](#postgres)\n     * [mkcert](#3-install-certificate---use-ssl-for-frontend-and-backend)\n* [External Services](#4-external-services)\n   * [Gupshup](#gupshup)\n   * [Oban](#oban)\n* [Clone Backend Repository](#2-clone-backend-repository)\n* [Install Frontend](#6-install-frontend)\n* [Unit Testing](#8-unit-testing)\n* [Optional - Setup HSM Messaging](#optional---setup-hsm-messaging)\n* [Optional - Using NGROK](#optional---using-ngrok)\n* [Updating Your Instance](#updating-your-instance)\n* [Documentation](#documentation)\n* [Learn More](#learn-more)\n* [Chat With Us](#chat-with-us)\n* [Funders](#funders)\n\n---\n\n## 1. Pre-requisites\n\n### Software Dependencies\n\n#### Erlang / Elixir\n\nInstall Elixir using `asdf` (check package versions below).\nFor Ubuntu users, you also need to install the `inotify-tools` package:\n\n```bash\nsudo apt install inotify-tools\n```\n\nWe tested and developed against the following versions (please check `.tool-versions` in the repository for the latest version we are using):\n\n- erlang : 27.3.3\n- elixir : 1.18.3-otp-27\n\nAfter installing the `asdf` core, install the Erlang and Elixir plugins:\n\n```bash\nasdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git\nasdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git\n```\n\nInstall all required versions listed in `.tool-versions` by\n```bash\nasdf install\n```\n\nIf you get any warnings for missing packages, just install them using `apt` and try again.\n\n\u003e **Note**: It is important to use `asdf` to install Erlang and Elixir.\n\n\u003e **Note**: Windows users should use WSL (Windows Subsystem for Linux) to install and manage Elixir and Erlang via asdf\n\n#### Postgres\n\nInstall from [PostgreSQL official site](https://www.postgresql.org/download/)\n\nTested with Postgres versions:\n\n* v13.x\n* v14.x\n* v17.x\n\n## 2. Clone Backend Repository\n\n```bash\ngit clone git@github.com:glific/glific.git\n```\n\n## 3. Install certificate - Use SSL for frontend and backend\n\nBefore completing the install, you need to create an SSL cert. Go to the glific folder in the terminal console, and:\nInstall from [mkcert GitHub repo](https://github.com/FiloSottile/mkcert)\n\nTo generate a certificate:\n\n```bash\nmkcert --install\nmkcert glific.test api.glific.test\nmkdir priv/cert\nmv glific.test* priv/cert\ncd priv/cert\nls -1  # Check that glific.test+1-key.pem and glific.test+1.pem exist\n```\n\nCheck port 4001:\n```bash\nsudo lsof -n -i:4001 | grep LISTEN\n```\nshould return nothing.\n\nCheck `host file`:\n```bash\ngrep glific /etc/hosts\n```\nIf it returns nothing, add these 3 lines to the hosts file:\n```\n127.0.0.1 glific.test\n127.0.0.1 api.glific.test\n127.0.0.1 postgres\n```\n### For Windows, the steps is are as Follows:\n\n```bash\nmkcert --install\nmkcert glific.test api.glific.test\nmkdir priv/cert\nmv glific.test* priv/cert\ncd priv/cert\ndir # Check that glific.test+1-key.pem and glific.test+1.pem exist\n```\n\nCheck port 4001:\n```bash\nnetstat -ano | findstr :4001\n```\nshould return nothing.\n\nCheck `host file by type`:\n```bash\n%SystemRoot%\\System32\\drivers\\etc\\hosts | findstr glific\n```\nIf it returns nothing, add these 3 lines to the hosts file:\n```\n127.0.0.1 glific.test\n127.0.0.1 api.glific.test\n127.0.0.1 postgres\n```\n## 4. External Services\n\n### Gupshup\nGupshup is a messaging platform that enables bots and businesses to communicate with users over WhatsApp and other channels. In Glific, we use Gupshup to send and receive WhatsApp messages via API integration.\n\n * Register: [Gupshup Developer](https://www.gupshup.io/developer/home)\n * Create an app and select Access API\n * You can name it NewNameHere \"GlificTest \u003c-- Bot Name is already in use, then use another one\"\n * Run the following command cp config/dev.secret.exs.txt config/dev.secret.exs\n * Now, in Gupshup, find your API Key: check the top right corner and click the profile picture or inside the curl sample message\n * Enter your APP name and API Key in the dev.secret.exs file using any text editor.\n\n### Oban\n\n [Oban](https://getoban.pro) is a job processing library for Elixir. It supports features like background jobs and scheduled tasks (cron-style).\n Oban is **required** before running mix for Glific to operate.\n\n **For contributors on social impact projects (including NGOs):**\n\n  Please get in touch with the team on Discord and request a limited-time Oban Pro key.\n  Once provided, run the following command to add the Oban repository with your credentials:\n   ```bash\n  mix hex.repo add oban https://getoban.pro/repo --fetch-public-key SHA256:4/abc/edf/gef+aIWPc --auth-key abcdefghi\n   ```\n\n **For others, if you want to use the free Oban solution**\n People have contributed code changes to allow Glific to work with the free version of Oban. You can view the details here: https://github.com/glific/glific/pull/2391\n\n **For production use:**\n\n  *You must purchase a license for Oban Pro to use advanced features in production.\n\n  *Note: Oban Web is now open source and does not require a license.\n\n  *If you're using Oban Pro, after purchasing the license:\n\n\n   Go to your Oban account dashboard.\n\n   Run the following command inside your glific_backend directory:\n\n  ```bash\n     mix hex.repo add oban https://getoban.pro/repo --fetch-public-key SHA256:4/abc/edf/gef+aIWPc --auth-key abcdefghi\n  ```\n\n   where public key \"SHA256:4/abc/edf/gef+aIWPc\" is replaced by your public key and auth key \"abcdefghi\" is replaced by your auth key.\n\n   Make sure your key is in the list:\n\n   ```bash\n   mix hex.repo list\n   ```\n\n     Name        URL                             Public key                                          Auth key\n     hexpm       https://repo.hex.pm             SHA256:abc/edf/gef+aIWPc\n     oban        https://getoban.pro/repo        SHA256:4/abc/edf/gef+aIWPc   abdedcqweasdj__KEY_AUTH__asdafasdf\n\n   If you see two Auth key entries - caused by Oban moving from a public to a private repository - it will fail.\n   This is what an example of failing looks like:\n\n     Name        URL                             Public key                                          Auth key\n     hexpm:oban  https://repo.hex.pm/repos/oban  SHA256:abc/edf/gef+aIWPc     abdedcqweasdj__KEY_AUTH__asdafasdf\n     oban        https://getoban.pro/repo        SHA256:4/abc/edf/gef+aIWPc   abdedcqweasdj__KEY_AUTH__asdafasdf\n\n   This is wrong. When you run mix deps.get as is, it will try to fetch from the public repository instead of the private one and fail.\n   Simply follow the instructions below to remove the public key:\n\n   ```bash\n    mix hex.repo remove hexpm:oban\n   ```\n\n  Now, check again:\n\n   ```bash\n    mix hex.repo list\n   ```\n\n     Name        URL                             Public key                                          Auth key\n     oban        https://getoban.pro/repo        SHA256:4/abc/edf/gef+aIWPc   abdedcqweasdj__KEY_AUTH__asdafasdf\n\n### 5. Backend - Config\n\n - Run: `cp config/.env.dev.txt config/.env.dev`\n - Run `mix deps.get`\n   if this fails try `mix local.hex --force` followed by `mix deps.get`\n\n   if you see the error below, then your Oban key is wrong or failing. Check step 5 or contact Oban.\n\n   ❯ mix deps.get\n   Failed to fetch record for 'hexpm:oban/oban_pro' from registry (using cache instead)\n   This could be because the package does not exist, it was spelled incorrectly or you don't have permissions to it\n   Failed to fetch record for 'hexpm:oban/oban_web' from registry (using cache instead)\n   This could be because the package does not exist, it was spelled incorrectly or you don't have permissions to it\n   \\*\\* (Mix) Unknown package oban_pro in lockfile\n\n - Run `mix setup`\n  At this point, you may get an error saying `password authentication failed for user \"postgres\"`, in which case, you need to configure the postgres server properly:\n\n ```bash\n createuser postgres -s # needed for more recent versions of postgres on MacOS\n sudo -u postgres psql\n ALTER USER postgres WITH PASSWORD 'postgres';\n ```\n Exit the PostgreSQL terminal by typing `\\q` and pressing Enter.\n\n#### Setting up SSL for Postgres (Optional but recommended)\n\nSSL (Secure Sockets Layer) provides encrypted connections between Glific and your PostgreSQL database. In Glific, SSL is enabled by default for all environments except test to ensure secure database communications. While optional, it's recommended for production deployments. You can disable SSL by setting the `ENABLE_DB_SSL` environment variable to `false`. If you are disabling SSL, skip to the end of this section.\n\n To enable SSL connections to Postgres:\n\n 1. Find your Postgres data directory:\n ```bash\n psql -U postgres -c \"SHOW data_directory;\"\n ```\n\n 2. Create SSL certificates using mkcert:\n ```bash\n mkcert -cert-file server.crt -key-file server.key postgres localhost 127.0.0.1 ::1\n ```\n In case you get the following error/warning:\n\n ```\n Note: the local CA is not installed in the Java trust store.\n Run \"mkcert -install\" for certificates to be trusted automatically ⚠️\n ```\n\n Run `mkcert -install` and then run the above command again.\n\n 3. Move the certificates to Postgres data directory and set the permissions:\n ```bash\n sudo mv server.crt /path/to/postgres/data/directory/\n sudo mv server.key /path/to/postgres/data/directory/\n sudo chmod 600 /path/to/postgres/data/directory/server.key\n ```\n\n If you installed Postgres using the Postgress.app,\n ```bash\n sudo chown username:_postgres /path/to/postgres/data/directory/server.key\n ```\n\n 4. Configure Postgres to use SSL. Edit postgresql.conf:\n ```bash\n sudo nano /path/to/postgres/data/directory/postgresql.conf\n ```\n Add:\n ```conf\n ssl = on\n ssl_cert_file = 'server.crt'\n ssl_key_file = 'server.key'\n ```\n\n 5. Configure client authentication. Edit pg_hba.conf:\n ```bash\n sudo nano /path/to/postgres/data/directory/pg_hba.conf\n ```\n Add:\n ```conf\n hostssl glific_dev      all             127.0.0.1/32            trust\n hostssl glific_test     all             127.0.0.1/32            trust\n hostssl postgres        all             127.0.0.1/32            trust\n ```\n\n 6. Restart Postgres:\n ```bash\n # For Linux:\n sudo systemctl restart postgresql\n # For MacOS:\n brew services restart postgresql\n # For MacOS, if you installed Postgres with Postgres.app, quit and run Postgres.app\n ```\n\n If you get errors, try selecting the correct postgres version in your device\n\n ```bash\n # For Linux:\n sudo systemctl restart postgresql@\u003cversion\u003e\n # For MacOS:\n brew services restart postgresql@\u003cversion\u003e\n ```\n\n 8. Test SSL connection:\n First get the mkcert root path\n ```bash\n echo \"$(mkcert -CAROOT)\"\n ```\n\n ```bash\n psql \"sslmode=verify-full dbname=glific_dev host=localhost sslrootcert=path/to/mkcert/rootCA.pem\"\n ```\n\n You should see SSL connection details. Verify with:\n ```sql\n SHOW ssl;\n SELECT * FROM pg_stat_ssl WHERE pid=pg_backend_pid();\n ```\n\n 9. Configure SSL environment variables:\n \n After setting up SSL for Postgres, you need to add the following environment variables to your `config/.env.dev` file:\n\n **Required for primary database:**\n ```env\n PRIMARY_CACERT_ENCODED=\u003cbase64_encoded_root_certificate\u003e\n PRIMARY_DB_SERVER_NAME_INDICATION=localhost\n ```\n\n **Optional for read replica (only if using a separate read replica database):**\n ```env\n REPLICA_CACERT_ENCODED=\u003cbase64_encoded_root_certificate\u003e\n REPLICA_DB_SERVER_NAME_INDICATION=localhost\n ```\n\n To get the base64 encoded certificate, run:\n ```bash\n base64 -i \"$(mkcert -CAROOT)\"/rootCA.pem\n ```\n \n Copy the output and paste it as the value for `PRIMARY_CACERT_ENCODED`. If you're using a read replica with the same SSL setup, use the same value for `REPLICA_CACERT_ENCODED`.\n\n **Note:** If you're not using a read replica (or your read replica URL is the same as your primary database URL), you can skip the `REPLICA_*` environment variables. The replica configuration will automatically fall back to using the primary SSL settings.\n\n Run `mix setup` again.\n\n - Run `iex -S mix phx.server`\n\n Now you can visit [`https://glific.test:4001`](https://glific.test:4001) from your browser.\n\n\n\n**For Windows the steps is as follows:**\n\n - Copy the file: `cp config/dev.secret.exs.txt config/dev.secret.exs`\n - Copy the file: `cp config/.env.dev.txt config/.env.dev`.\n   You may not need to edit the default values for DB URL and hostnames in this file if they look suitable for your needs.\n\n - Run this on the command prompt:\n   ```\n   cd \u003cpath-to-glific-backend\u003e\n   set /p=DUMMY \u003c config\\.env.dev\n   ```\n   Replace \u003cpath-to-glific-backend\u003e with the actual path to the glific_backend directory. This will load the environment variables from the .env.dev file.\n - Run `mix deps.get`\n   if this fails try `mix local.hex --force` followed by `mix deps.get`\n\n   if you see the error below, then your Oban key is wrong or failing. Check step 5 or contact Oban.\n\n   ❯ mix deps.get\n   Failed to fetch record for 'hexpm:oban/oban_pro' from registry (using cache instead)\n   This could be because the package does not exist, it was spelled incorrectly or you don't have permissions to it\n   Failed to fetch record for 'hexpm:oban/oban_web' from registry (using cache instead)\n   This could be because the package does not exist, it was spelled incorrectly or you don't have permissions to it\n   \\*\\* (Mix) Unknown package oban_pro in lockfile\n\n - Run `mix setup`\n - Run `iex -S mix phx.server`\n - Inside the iex (you might need to hit enter/return to see the prompt)\n   - Update HSM templates by running the following command:\n   - `Glific.Templates.sync_hsms_from_bsp(1)`\n\n Now you can visit [`https://glific.test:4001`](https://glific.test:4001) from your browser.\n\n## 6. Install Frontend\n  [Glific Frontend Repo](https://github.com/glific/glific-frontend)\n\n### Frontend credentials\n\n * Phone: `917834811114`\n * Password: `Secret1234!`\n## 7. Sync Gupshup Settings\n  After setting up both backend and frontend repositories, you need to sync the Gupshup settings:\n   - Login to the frontend using the credentials provided above\n   - Go to Settings -\u003e Gupshup Settings\n   - Click on \"Save\" button\n   - Wait for confirmation that settings were synced successfully.\n\n  This step is crucial as it fetches and stores your Gupshup `app_id` in the database, which is required for proper functioning of various APIs including the wallet API.\n\n\n\n## 8. Unit Testing\n  Execute All Tests with:\n ```bash\n mix test_full\n ```\n  To run Specific test File\n  ```bash\n mix test Path_to_the_specific_test_file_you_want_to_run.\n ```\n\n## Optional - Setup HSM Messaging\n\n * Add ISV credentials in the database\n * Sync HSMs:\n\n ```elixir\n Glific.Templates.sync_hsms_from_bsp(1)\n ```\n\n## Optional - Using NGROK\n\n * Download: [ngrok](https://ngrok.com/download)\n * Run:\n\n ```bash\n ngrok http 4000 --host-header=glific.test:4000\n  ```\n\n * Set webhook in Gupshup app settings to `https://\u003cngrok-url\u003e/gupshup`\n\n### Updating Your Instance\n Run the following commands to update your codebase from the Glific repository.\n ```bash\n * Ensure you are in the top-level directory of the Glific API code.\n * Get the latest code from master: git switch master \u0026\u0026 git pull\n * Ensure you have not modified any files in this directory, by running: git status\n * Run the setup command: mix deps.get, compile, ecto.migrate\n ```\n\n### Documentation\n\n * [User Guide](https://docs.glific.com)\n * [API docs](https://api.glific.com/)\n * [Code Documentation](https://hexdocs.pm/glific/5.1.6/readme.html)\n * [Recipes](https://github.com/glific/recipes)\n\n### Learn More\n\n * [Demo Video](https://drive.google.com/file/d/1T8nBKMt1oFndfIHEVlQ38K8lGqjajYaZ/view?usp=sharing)\n * [One Pager](https://docs.google.com/document/d/1XYxNvIYzNyX2Ve99-HrmTC8utyBFaf_Y7NP1dFYxI9Q/edit?usp=sharing)\n * [Product Features](https://docs.google.com/document/d/1uUWmvFkPXJ1xVMr2xaBYJztoItnqxBnfqABz5ad6Zl8/edit?usp=sharing)\n * [Glific Blogs](https://chintugudiya.org/tag/glific/)\n * [Google Drive](https://drive.google.com/drive/folders/1aMQvS8xWRnIEtsIkRgLodhDAM-0hg0v1?usp=sharing)\n\n### Chat With Us\n\n * [Join Discord](https://discord.gg/me6NCMu)\n\n### Funders\n\n Thanks to our funders for supporting Glific:\n\n * [Project Tech4Dev](https://chintugudiya.org/tech4dev/)\n * [The Agency Fund](https://agency.fund/)\n * [Cisco](https://www.cisco.com/c/en/us/about/csr.html)\n * [Omidyar Network India](https://www.omidyarnetwork.in)\n * [FOSS United](https://fossunited.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglific%2Fglific","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglific%2Fglific","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglific%2Fglific/lists"}