Skip to content

shubhiscoding/Notification_App

Repository files navigation

Notification App

Running The Bot:

create a .env file with the following details:

MY_TOKEN=TELEGRAM_BOT_TOKEN
MY_CHAT_ID=SERVER_CHAT_ID
MY_TASK_CREATED_SQS=PAID_TASK_SQS_PATH_URL
MY_TASK_PAID_SQS=PAID_EVENT_SQS_PATH_URL
TASK_CREATED_VIDEO_URL=Video_Url
TASK_PAID_VIDEO_URL=Video_Url
TASK_BASE_URL=BASE_URL

EMAIL_SERVICE_SQS=EMAIL_SERVICE_SQS_PATH_URL
[email protected]

AWS_ACCESS_KEY_ID=ACCESS_KEY
AWS_SECRET_ACCESS_KEY=SECRET_KEY
AWS_REGION=REGION
AWS_ENDPOINT_SQS=ENDPOINT_SQS
AWS_ENDPOINT_SES=ENDPOINT_SES

WEBSITE_URL=https://v2.gib.work/tasks/

Build The docker Image

docker build -t notification-app:latest .

Run the docker Image:

docker compose up

Expected SQS Message formats Telegram Bot:

Expected SQS Message formats Email:

Email Templates

In the server.js you can find the actual implementation of this at this switch case

1. New Service Request

  • Subject: "New Service Request Posted"
  • Template: new-service-request
  • Data Object:
    {
        "username": "string",
        "viewServiceLink": "string"
    }

2. Service Request Approved

  • Subject: "Your Service Request Has Been Approved!"
  • Template: service-request-approved
  • Data Object:
    {
        "username": "string",
        "serviceTitle": "string",
        "viewServiceLink": "string"
    }

3. Service Request Completed

  • Subject: "Service Request Completed - Time to Withdraw Your Earnings!"
  • Template: service-request-completed
  • Data Object:
    {
        "username": "string", 
        "serviceTitle": "string",
        "viewServiceLink": "string"
    }

About

An Notification System built for Gibwork

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published