{"id":23449116,"url":"https://github.com/oeway/hypha-core","last_synced_at":"2025-04-13T17:33:47.054Z","repository":{"id":245345873,"uuid":"756050145","full_name":"oeway/hypha-core","owner":"oeway","description":"Hypha Server in the browser","archived":false,"fork":false,"pushed_at":"2025-03-01T18:35:35.000Z","size":9023,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T08:22:07.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://oeway.github.io/hypha-core/","language":"JavaScript","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/oeway.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-11T20:38:59.000Z","updated_at":"2025-03-01T18:35:13.000Z","dependencies_parsed_at":"2024-06-28T20:58:34.909Z","dependency_job_id":"27d7e2fe-8a22-408c-9b74-b1e6154e6f0b","html_url":"https://github.com/oeway/hypha-core","commit_stats":null,"previous_names":["oeway/hypha-core"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeway%2Fhypha-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeway%2Fhypha-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeway%2Fhypha-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oeway%2Fhypha-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oeway","download_url":"https://codeload.github.com/oeway/hypha-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248752667,"owners_count":21156135,"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":"2024-12-23T22:20:06.334Z","updated_at":"2025-04-13T17:33:47.047Z","avatar_url":"https://github.com/oeway.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hypha Core\n\nHypha Core for running Hypha App and ImJoy Plugins in the browser.\n\n\n## Usage\n\nHypha core is available as a ES module, you can import it in your HTML file like this:\n\n```html\n\u003cscript src=\"https://rawcdn.githack.com/nextapps-de/winbox/0.2.82/dist/winbox.bundle.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\"\u003e\n    import { HyphaCore } from \"https://cdn.jsdelivr.net/npm/hypha-core@0.20.48/dist/hypha-core.mjs\";\n    const hyphaCore = new HyphaCore();\n    hyphaCore.on(\"add_window\", (config) =\u003e {\n        const wb = new WinBox(config.name || config.src.slice(0, 128), {\n            background: \"#448aff\",\n        });\n        wb.body.innerHTML = `\u003ciframe src=\"${config.src}\" id=\"${config.window_id}\" style=\"width: 100%; height: 100%; border: none;\"\u003e\u003c/iframe\u003e`;\n    });\n    const api = await hyphaCore.start();\n    // use api to interact with the server\n\n\n    // you can also create new connections to the server by calling:\n    // const api2 = await hyphaCore.connect();\n\u003c/script\u003e\n```\n\nIn the above example we use the `WinBox` library to create a window for each Hypha App or ImJoy Plugin. You can use any other window library or create your own window.\n\nImportantly, you need to serve the 3 template files under the root of your server, you can find the template files in the `public` folder of this repository:\n\n - [hypha-app-iframe.html](./public/hypha-app-iframe.html)\n - [hypha-app-webpython.js](./public/hypha-app-webpython.js)\n - [hypha-app-webworker.js](./public/hypha-app-webworker.js)\n\nYou can also configure the base url by passing {base_url: \"your_base_url\"} to the `HyphaCore` constructor.\n\nSee [lite.html](./public/lite.html) for an example of how to use Hypha Core in the browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foeway%2Fhypha-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foeway%2Fhypha-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foeway%2Fhypha-core/lists"}