{"id":17825433,"url":"https://github.com/soapdog/sbot_native_app","last_synced_at":"2025-08-13T20:33:03.204Z","repository":{"id":146158242,"uuid":"114399198","full_name":"soapdog/sbot_native_app","owner":"soapdog","description":"Companion native app to provide scuttlebutt features for WebExtensions through native messaging API","archived":false,"fork":false,"pushed_at":"2017-12-20T23:45:19.000Z","size":43,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T18:37:00.742Z","etag":null,"topics":["decentralized","sbot","scuttlebutt","webextension"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/soapdog.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}},"created_at":"2017-12-15T18:17:16.000Z","updated_at":"2021-06-02T10:10:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb9de2e0-8925-49f5-9599-fad2761dc115","html_url":"https://github.com/soapdog/sbot_native_app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soapdog/sbot_native_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Fsbot_native_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Fsbot_native_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Fsbot_native_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Fsbot_native_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soapdog","download_url":"https://codeload.github.com/soapdog/sbot_native_app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soapdog%2Fsbot_native_app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305842,"owners_count":24562109,"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-08-13T02:00:09.904Z","response_time":66,"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":["decentralized","sbot","scuttlebutt","webextension"],"created_at":"2024-10-27T18:13:50.790Z","updated_at":"2025-08-13T20:33:02.930Z","avatar_url":"https://github.com/soapdog.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sbot Native App for Firefox WebExtensions\n\nThis is an **ALPHA** quality native companion app to supply features for Firefox WebExtensions posting to the [scuttlebutt](https://www.scuttlebutt.nz/) platform.\n\nThis is needed because there are no WebExtension APIs for TCP and UDP so we can't implement the correct protocols for scuttlebutt. Instead we have a way to use the [Native Messaging API](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging) to establish communication between a native application (this app) and an authorized WebExtension. Through this communication channel, an add-on can call on features provided by this native app. We can think of it much like we do with back-end and front-end web programming, this app is the back-end providing features and all the authorized add-ons are front-end interfacing with Firefox users.\n\n\n# Features provided 🐚\nThis is quite *alpha* software, I am quite happy that it actually runs... WebExtensions can post commands to `sbot_native_app`, the commands are in the following format:\n\n```\n{\n    cmd: \u003cthe command\u003e,\n    data: \u003coptional data\u003e\n}\n```\n\nThe current implemented commands are:\n\n### whoami\nThis commands returns the default identity. It doesn't require any data parameter.\n\n### publish\nThis commands calls `sbot.publish()` passing the `data` argument to the call. It can be used to post to your feed. For sample usage, check out the [Share on Scuttlebutt WebExtension](https://github.com/soapdog/webextension-share-on-scuttlebutt)\n\n\n# Dependencies\n\nThis native application is [NodeJS](https://nodejs.org) based and you need to have a recent version of it installed.\n\n## How to setup the native app\n\nYou need to install the dependencies first:\n\n```\n$ npm install\n```\n\nAfter that the procedure changes depending on which OS you're running as the configuration of _native apps_ differs by operating system with Windows being a quite convoluted process. To setup the application, meaning place the correct _app manifest_ json in the correct place and fix the paths, run:\n\n```\n$ npm run setup-win\n```\n\nor \n\n```\n$ npm run setup\n```\n\nDepending if you're running Windows 10 or other operating system. Also, if you are running under a unix-like system, you will need to double check the shebang invocation on top of the `index.js` file to make sure that it points to your NodeJS location. I tried using `env` there but it didn't work when started from inside Firefox, so it is hardcoded to the default location of NodeJS installation.\n\nBe aware that the setup procedure will place hardcoded paths in files critical for running this app. **If you move this application to a different folder or rename any folder in its path, you'll need to run this setup again.**\n\n## Commentary, getting help\n\nActually, I kinda think the whole process is quite bad from a developer ergonomics perspective and I have no idea why Google implemented it like that in the first place but it set a precedent and now Firefox is doing it similarly. I am trying to supply some _configuration verification scripts_ but in case everything fails, read the documentation about WebExtensions and native messaging to get back on track:\n\n* [MDN Web Docs - WebExtensions](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/).\n* [Native Messaging API](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging)\n* [Native Messaging setup](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging#Setup)\n\nDon't hesitate to reach out to me at:\n\n* Scuttlebutt: @gaQw6z30GpfsW9k8V5ED4pHrg8zmrqku24zTSAINhRg=.ed25519\n* Mastodon: @soapdog@toot.cafe\n* Twitter: @soapdog\n\n## Verifying your configuration on Windows 10\n\nRun the verification script as:\n\n```\n$ npm run check-win\n```\n\nor\n\n```\n$ npm run check\n```\n\nDepending if you're running Windows 10 or other operating system.\n\n# Contributing\n\nThis is free software under the terms of the MIT license. I would love contributions to this WebExtension. I tried to make it as vanilla as possible to the point that it is quite naive. My objective is to make it approachable for new contributors with minimal knowledge of JS.\n\nThe WebExtension is running on a different and isolated DOM than the page being displayed so we don't need to worry about many stuff that is common to Web Development.\n\nIf you want to contribute, these are some ideas:\n\n* Need to expose more API calls.\n* Need a shim to make WebExtension developer life easier so they don't keep programming in such low-level API like `ports`.\n* Need robust setup code and instructions.\n\n# Sponsorship\n\nDo you want a decentralized internet too? Are you worried about the loss of net neutrality and realized that radical decentralization is the way to fight back? Have some cryptobucks to spare? If you want to make a financial contribution to help me fund development of this and other dex focused software, I would love to receive contributions in the following cryptocurrencies:\n\n* Ethereum: 0x0bd1bbb25cc9dd2ce8ea1fba4e333ff091f671a9\n* Bitcoin: 1Px1PeVBJ2Mz1iC6UF8UZVXW7zPoonMVKJ\n* DASH: Xh5b2TfS7CTUgSMUENWUQFmTqZyk3DUdQX\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoapdog%2Fsbot_native_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoapdog%2Fsbot_native_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoapdog%2Fsbot_native_app/lists"}