{"id":16783153,"url":"https://github.com/bengreenier/browserd","last_synced_at":"2025-03-17T02:31:44.949Z","repository":{"id":34989471,"uuid":"191368341","full_name":"bengreenier/browserd","owner":"bengreenier","description":"Headless electron app platform for the cloud 🤕☁✨","archived":false,"fork":false,"pushed_at":"2023-01-04T04:33:08.000Z","size":1010,"stargazers_count":67,"open_issues_count":22,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T16:55:57.346Z","etag":null,"topics":["browser-app","docker","electron"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/bengreenier/browserd","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bengreenier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-11T12:36:17.000Z","updated_at":"2025-02-06T00:56:41.000Z","dependencies_parsed_at":"2023-01-15T11:36:42.870Z","dependency_job_id":null,"html_url":"https://github.com/bengreenier/browserd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Fbrowserd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Fbrowserd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Fbrowserd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Fbrowserd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bengreenier","download_url":"https://codeload.github.com/bengreenier/browserd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841125,"owners_count":20356440,"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":["browser-app","docker","electron"],"created_at":"2024-10-13T07:49:04.692Z","updated_at":"2025-03-17T02:31:44.279Z","avatar_url":"https://github.com/bengreenier.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# browserd\n\n![Project Logo](./.github/logo.png)\n\nHeadless electron app platform for the cloud 🤕☁✨\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bengreenier_browserd\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=bengreenier_browserd)\n\nWe needed a way to run chrome-based browser experiences inside a container, and to stream that container to remote clients using webrtc.\nBrowserd (named to indicate it's a browser [daemon](https://en.wikipedia.org/wiki/Daemon_(computing))) uses electron to do so.\n\nThis app is broken down into two main components the [stream-provider](components/stream-provider) which contains and provides the 'browser experiences' and the [stream-consumer](components/stream-consumer) an example of a 'remote client'. These components are supported by the [shared component](components/shared) which houses shared functionality.\n\n## Components\n\n### Stream-Consumer\n\n[This simple web app](./components/stream-consumer) connects to the stream-provider through a signaling server. It receives and displays a stream from the cloud, and it can send input to the cloud.\n\n[![Build Status](https://dev.azure.com/bengreenier/browserd/_apis/build/status/stream-consumer?branchName=master)](https://dev.azure.com/bengreenier/browserd/_build/latest?definitionId=14\u0026branchName=master)\n\n### Stream-Provider\n\n[This electron app](./components/stream-provider) connects to the stream-consumer through a signaling server. It receives input from the consumer, and streams its view to the consumer.\n\n[![Build Status](https://dev.azure.com/bengreenier/browserd/_apis/build/status/stream-provider?branchName=master)](https://dev.azure.com/bengreenier/browserd/_build/latest?definitionId=11\u0026branchName=master)\n\n[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://deploy.azure.com/?repository=https://github.com/bengreenier/browserd/blob/repo-restructure/components/stream-provider#/form/setup)\n\n## Using Lerna\n\nWe use [Lerna](https://github.com/lerna/lerna) to help manage our monorepo. It links our local dependencies and it reduces redundant packages and ensures consistent versioning. To run anything locally, you will need to npm install Lerna globally. With Lerna, we can automatically install all node_modules for all components, cross link them, and move shared dependencies up to the root.\n \n```\nnpm install -g lerna\n```\n\n## Signaling server\n\nOur service is compatible with any standard WebRTC signaling implementation. If you need a simple one that communicates over HTTP/1.1, [webrtc-signal-http](https://github.com/bengreenier/webrtc-signal-http) is a good option.\n\n## Configuration\n\nOur service can be configured using a [dotenv](https://www.npmjs.com/package/dotenv) file - `.env` containing one environment variable\nkey and value per line. For example `KEY=value`. Below are the possible options:\n\n+ `SERVICE_URL` (string) - the web service address (to render)\n+ `TURN_URL` (string) - a turn address\n+ `TURN_USERNAME` (string) - a turn username\n+ `TURN_PASSWORD` (string) - a turn password credential\n+ `POLL_URL` (string) - a signaling server base address\n+ `POLL_INTERVAL` (number) - a signaling poll interval in ms\n+ `HEIGHT` (number) - the window height\n+ `WIDTH` (number) - the window width\n+ `EXP_HIDE_STREAMER` (boolean) - experiment flag for hiding the streamer window\n+ `TWILIO_ACCOUNT_SID` (string) - a Twilio AccountSid required to get a Network Traversal Service Token\n+ `TWILIO_AUTH_TOKEN` (string) - a Twilio AuthToken required to get a Network Traversal Service Token\n\n## Turn server\n\nOur service supports both [coturn](https://github.com/coturn/coturn) and [Twilio's STUN/TURN service](https://www.twilio.com/docs/stun-turn).\nIn the dotenv file, if `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN` values are set, our service will attempt to get a turn server from Twilio. Otherwise, you can leave them empty to use a stun server or coturn turn server.\n\n## Electron security\n\nOur service follows [electron security guideline](https://electronjs.org/docs/tutorial/security) and enables the following behaviors:\n\n+ Enabling [contextIsolation](https://electronjs.org/docs/tutorial/security#3-enable-context-isolation-for-remote-content), which allows scripts running in the renderer to make changes to its javascript environment without worrying about conflicting with the scripts in the electron API or the preload script.\n+ Blocking [mouse middle-clicking](https://www.blackhat.com/docs/us-17/thursday/us-17-Carettoni-Electronegativity-A-Study-Of-Electron-Security-wp.pdf), which opens a new window and makes our remote input stop working.\n+ Disabling popup dialog for file downloading (when clicking on a link) so that it doesn't interfere with the streamer window.\n+ Displaying warning about using [insecure http protocol](https://electronjs.org/docs/tutorial/security#1-only-load-secure-content) or when the streamer window [navigates to a new origin](https://electronjs.org/docs/tutorial/security#12-disable-or-limit-navigation), which is different from the `SERVICE_URL`.\n\n## Running\n\n\u003e Note: Please refer the README of any component subdirectory for more detailed instructions.\n\nEnsure you've installed dependencies (`npm i`) before continuing.\n\nFollow these steps to get browserd up and running:\n\n\u003e Note: `npm run magic` will complete all these steps for you.\n\n+ `npm run bootstrap` - this runs [lerna bootstrap](https://github.com/lerna/lerna/tree/master/commands/bootstrap#readme) to setup the project, installing dependencies as it goes.\n+ `npm run build` - this builds all the packages needed to run.\n+ `npm run start` - this starts the [`stream-provider`](./components/stream-provider). Note that it requires some [environment variable configuration](#configuration), as mentioned above.\n\n## Contributing\n\nComing soon. ✨\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbengreenier%2Fbrowserd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbengreenier%2Fbrowserd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbengreenier%2Fbrowserd/lists"}