{"id":29040722,"url":"https://github.com/pushchain/push-delivery-node","last_synced_at":"2025-06-26T14:36:42.723Z","repository":{"id":70431950,"uuid":"513561427","full_name":"pushchain/push-delivery-node","owner":"pushchain","description":"The Delivery node can be hosted separately by third-party customers and hackers and receive notifications from the push node.","archived":false,"fork":false,"pushed_at":"2025-03-03T16:09:36.000Z","size":465,"stargazers_count":4,"open_issues_count":6,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-23T13:54:03.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pushchain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license-v1.md","code_of_conduct":null,"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}},"created_at":"2022-07-13T14:49:40.000Z","updated_at":"2024-12-24T10:03:53.000Z","dependencies_parsed_at":"2023-12-02T19:29:47.186Z","dependency_job_id":"813f61f4-98c9-429a-8a78-9a925f838233","html_url":"https://github.com/pushchain/push-delivery-node","commit_stats":null,"previous_names":["push-protocol/push-delivery-node","pushchain/push-delivery-node"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pushchain/push-delivery-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-delivery-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-delivery-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-delivery-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-delivery-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pushchain","download_url":"https://codeload.github.com/pushchain/push-delivery-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushchain%2Fpush-delivery-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262085910,"owners_count":23256541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-26T14:36:38.110Z","updated_at":"2025-06-26T14:36:42.675Z","avatar_url":"https://github.com/pushchain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push Delivery Node\n\nThe Push Delivery Node is a service that facilitates push notifications for third-party customers, hackers and apps. It can be hosted separately and receives notifications from the push node.\n\n## Prerequisites\n\n- MYSQL (Version \u003e= 5.7)\n- Redis (Version \u003e= 6.0)\n- Docker (For local setup)\n- Google FCM Account Setup\n\n\nHere is the step by step guide for setting up the delivery node.\n\n\n## Step-1: Clone Push Delivery Node Repo\n\n```\n  git clone https://github.com/ethereum-push-notification-service/push-delivery-node.git\n```\n\n## Step-2: Environment Variables and `config` File Configuration \n\n\nRefer env sample file. The MYSQL DB credentials and Redis URL needs to be updated. The remaining conf need not be edited as of now. In case your using docker-compose for the local setup MYSQL DB and Redis config can be left as it is.\n\n\n```\n# REDIS\n\nREDIS_URL=redis://localhost:6379\n\n# DELIVERY NODE MYSQL DATABASE\n\nDELIVERY_NODE_DB_HOST=localhost\nDELIVERY_NODE_DB_NAME=dbname\nDELIVERY_NODE_DB_USER=user\nDELIVERY_NODE_DB_PASS=pass\nDELIVERY_NODE_DB_PORT=3306\n\n```\n\nAs per the environments, there are three config files:\n\n`config-staging` for staging environment\n\n`config-prod` for production environment\n\nIn the `.env.`, the value of `DELIVERY_NODES_NET` determines the config file that will be used. The `CHANNEL_ADDRESS` parameter in the config files specifies which channel's notification will be delivered. Therefore, the user has the option to deliver notifications for either a subset of channels or for all channels. \n\nThere are three level of conditioning that can be made in the config:\n\nFor better understanding, we will consider an example where Ethereum channel address is `0xEth` and it's alias(same as channel address) is in Polygon. The channel in caip format will be `eip155:1:0xEth` and the alias in caip format will be `eip155:137:0xEth`.\n\n1. empty array: If the array is empty, all of the channels' notifications will be delivered. In this case `CHANNEL ADDRESSES = []`\n2. channel address with no CAIP format: If the user wants to deliver notifications for both the channel and it's alias, then can enter the address without any CAIP. In this case `CHANNEL ADDRESSES = [0xEth]`\n3. channel address with no CAIP format: If the user wants to deliver notifications for only the Ethereum channel or the alias channel, they can specify it in the CAIP format of that specific chain. In this case, for delivering Ethereum channel's notification, it will be  `CHANNEL ADDRESSES = [eip155:1:0xEth]` and for delivering Polygon alias channel's notification, it will be `CHANNEL ADDRESSES = [eip155:137:0xEth]`\n\n## Step-3: Infra Setup - Local\n\nThe docker-compose will bring up the MYSQL, Redis and PHPMyAdmin containers for the Delivery Node.\n\n```sh\ndocker compose up\n```\n\n\n## Step-3: (Alternate) Infra Setup - Production\n\n- Host MYSQL and Redis seperately\n- Add MYSQL and Redis credentials in the .env file\n\n\n\n## Step-4: FCM Project Setup\n\n- Refer https://firebase.google.com/docs/admin/setup\n- Create firebase-adminsdk.json file in the root folder and add the FCM JSON to this file\n\n## Step-5: Build the Delivery node project\n\nYou should then be able to build the project using:\n\n```sh\ncd push-delivery-node\nnpm install\n```\n\n## Step-6: Start the Delivery node project\n\nYou should then be able to start the server using:\n\n```sh\ncd push-delivery-node\nnpm start\n```\n\n\n\n## Step-7: Device Registration\n\n- There is and endpoint hosted as part of the Delivery Node Project which can used for the Device Registartion.\n- Below is the API to create a mapping between the wallet address and the device token for which the messages need to be delivered.\n- \u003cdelivery_node_url\u003e is the base URL of the Delivery node which you have hosted.\n\n\n```\n\ncurl --location --request POST 'https://\u003cdelivery_node_url\u003e/apis/v1/pushtokens/register' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \n    \"wallet\": \"eip155:0x35B84d6848D16415177c64D64504663b998A6ab4\",\n    \"device_token\": \"device_token\",\n    \"platform\": \"android\"\n}'\n\n```\n\n\n\n## Upcoming features\n\n- Dockerization\n- Analytics\n- Video Tutorials\n- Monitoring APIs\n- Demo APP to Test Delivery Node Notifications\n\n\n## Note\n\nThe Push delivery node is  a copyrighted work owned by Push org (Ethereum Push Notification Service). Unauthorized use of the Push delivery node product for profit or by competitors is strictly prohibited. While the Push delivery node product may be used for demonstration or illustrative purposes in the context of web3, it may not be used to compete with or copy the products or services of the Push Protocol. Any violation of this disclaimer may result in legal action.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushchain%2Fpush-delivery-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushchain%2Fpush-delivery-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushchain%2Fpush-delivery-node/lists"}