{"id":21677189,"url":"https://github.com/3loop/example-push-notifications","last_synced_at":"2025-09-14T20:17:47.171Z","repository":{"id":204099121,"uuid":"711108378","full_name":"3loop/example-push-notifications","owner":"3loop","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-29T18:17:46.000Z","size":807,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-20T09:46:59.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3loop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-10-28T08:36:18.000Z","updated_at":"2025-02-07T04:43:05.000Z","dependencies_parsed_at":"2025-01-25T10:23:31.150Z","dependency_job_id":null,"html_url":"https://github.com/3loop/example-push-notifications","commit_stats":null,"previous_names":["3loop/example-push-notifications"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/3loop/example-push-notifications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3loop%2Fexample-push-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3loop%2Fexample-push-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3loop%2Fexample-push-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3loop%2Fexample-push-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3loop","download_url":"https://codeload.github.com/3loop/example-push-notifications/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3loop%2Fexample-push-notifications/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275160467,"owners_count":25415785,"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","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-25T14:18:35.465Z","updated_at":"2025-09-14T20:17:47.146Z","avatar_url":"https://github.com/3loop.png","language":"TypeScript","readme":"# Ethereum Firebase Push Notifications\n\n\u003e [!NOTE]  \n\u003e This project demonstrates how to use Firebase Cloud Functions to send push notifications for any EVM transaction. It is not a production-ready solution and does not cover various aspects of a production app, such as security, performance, or cost optimizations.\n\n## High-Level Architecture\n\nAt a high level, the process of sending push notifications for Ethereum transactions can be broken down into three parts:\n\n1. Listening to Ethereum events\n2. Decoding and interpreting the events\n3. Delivering push notifications\n\n### Listening to Ethereum events\n\nTo begin listening for events, we need to store all the addresses we are interested in.\n\nBased on these addresses, we have multiple options to start listening to transactions:\n\n1. Use a third-party service such as Alchemy or Quicknode.\n2. Run our own Ethereum node/transaction monitoring service and watch for new blocks.\n3. Listen to events directly from the RPC.\n\nBy listening directly, we can have a client app that runs in the background and never connects to a third-party service, which can work well for people who want complete independence and privacy. However, such a mechanism is not supported on iOS, and on Android, the app can quickly drain the battery.\n\nFor simplicity we are using a third-party service, Alchemy, to listen to events.\n\n### Decoding and interpreting the events\n\nWe are using `@3loop/transaction-decoder` and `@3loop/transaction-interpreter` to decode and interpret transactions into human readable. Because the library is written in Typescript, we can use it in the context of Firebase Cloud Functions, or directly on the client, depending on the use case.\n\n### Delivering push notifications\n\nWe are using Firebase Cloud Messaging to deliver push notifications to the client. The client app is responsible for registering the device with FCM and sending the token to Firebase Firestore.\n\nOne could opt for a different delivery service, such as push.org or directly use platform native push notifications services with APNS and Web Push.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3loop%2Fexample-push-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3loop%2Fexample-push-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3loop%2Fexample-push-notifications/lists"}