whatsapp.hyperjump.tech

Environment Variables

Environment variables for the project

About

This project uses env-to-t3 to generate strongly typed code to read environment variables. All apps and packages would use the same environment variables. Follow these guides to use it in your app or package:

  1. In your app or package, don't read environment variables using process.env directly. Instead, use the env package.
  2. Every time you make changes (change the name, add new variables, delete variables) to the .env file in the packages/env package, you need to run pnpm run build from the packages/env package.
  3. If you make changes to the .env file in the packages/env package, make sure to update the env.example file in the same package.
  4. In the env.example file, make sure to include comments to explain the purpose of the environment variable.
  5. Add a #required comment to the environment variable that is required. env-to-t3 will automatically add validation to make sure the environment variable is set.

Environment Variables

Environment Variables

VariableRequiredDescription
DATABASE_URLThe URL of the Postgres database pool to store user data. This variable is read by Prisma to connect to the database during runtime.
DATABASE_DIRECT_URLThe URL of the direct Postgres database. Used for Prisma migrations.
NEXT_PUBLIC_BASE_URLThe base URL of the whatsapp.hyperjump.tech. E.g., https://whatsapp.hyperjump.tech
FACEBOOK_WEBHOOK_APP_SECRETThe secret to use to check the signature of the request sent by facebook to us. You can get the secret from the App Dashboard in Facebook developers dashboard.
FACEBOOK_WEBHOOK_VERIFY_TOKENThe token to verify the GET request from facebook webhook request. You can get the token from the App Dashboard in Facebook developers dashboard.
WHATSAPP_API_BASE_URLThe base URL of the Facebook Whatsapp API. In production, set this to the URL that Facebook provides, e.g., https://graph.facebook.com/v15.0
WHATSAPP_API_PHONE_IDThe Whatsapp API phone id. This is the main phone number that is used to send the messages.
WHATSAPP_API_ACCESS_TOKENThe access token to use to access the Facebook Whatsapp API. You can get the access token from https://developers.facebook.com/apps/{app_id}/whatsapp-business/wa-dev-console/?business_id={whatsapp_business_account_id}. Replace {app_id} with the app id and {whatsapp_business_account_id} with the whatsapp business account id.
NEXT_PUBLIC_MONIKA_NOTIF_DOCThe URL of the docs on how to use Monika with WhatsApp, e.g., https://monika.hyperjump.tech/guides/notifications#whatsapp
DEBUGComma separated app's name (e.g., web, facebook-webhooks) to enable debugging. Leave empty if not needed.
POSTGRES_USERThe user to use to connect to the Postgres database. This is only used by the docker-compose file for development purposes.
POSTGRES_PASSWORDThe password to use to connect to the Postgres database. This is only used by the docker-compose file for development purposes.
NEXT_PUBLIC_MONIKA_NOTIFY_API_URLThe base URL of the monika notify URL that user can use in their monika configuration. In production, set this to the URL of the deployed notify-api server.
NEXT_PUBLIC_WEBHOOK_RESEND_COOLDOWN_TIMEThe number of seconds before user can ask for resending instruction.