{"id":19856791,"url":"https://github.com/yomorun/presencejs","last_synced_at":"2026-03-07T11:01:31.953Z","repository":{"id":196350244,"uuid":"693916161","full_name":"yomorun/presencejs","owner":"yomorun","description":"Edge Infra for realtime web applications, geo-distributed architecture.","archived":false,"fork":false,"pushed_at":"2024-01-10T01:47:12.000Z","size":280,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-03T04:46:38.027Z","etag":null,"topics":["presencejs","realtime","realtime-collaboration","websocket","webtransport"],"latest_commit_sha":null,"homepage":"https://presence.js.org","language":"Go","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/yomorun.png","metadata":{"files":{"readme":"README-original.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["yomorun"]}},"created_at":"2023-09-20T01:14:33.000Z","updated_at":"2025-11-14T02:41:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"d32a8952-a2c5-4054-a5d8-72484fd2a0aa","html_url":"https://github.com/yomorun/presencejs","commit_stats":{"total_commits":14,"total_committers":3,"mean_commits":4.666666666666667,"dds":0.1428571428571429,"last_synced_commit":"def448e93f2d9f68c5d9285347658027922bf232"},"previous_names":["yomorun/presencejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yomorun/presencejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fpresencejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fpresencejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fpresencejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fpresencejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yomorun","download_url":"https://codeload.github.com/yomorun/presencejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fpresencejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30212103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["presencejs","realtime","realtime-collaboration","websocket","webtransport"],"created_at":"2024-11-12T14:16:35.881Z","updated_at":"2026-03-07T11:01:31.898Z","avatar_url":"https://github.com/yomorun.png","language":"Go","funding_links":["https://github.com/sponsors/yomorun"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cbr/\u003e\n    \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/@yomo/presence\"\u003e\n        \u003cimg alt=\"NPM version\" src=\"https://badgen.net/npm/v/@yomo/presence\"\u003e\n    \u003c/a\u003e\n    \u003ca aria-label=\"License\" href=\"https://github.com/yomorun/presencejs/blob/main/LICENSE\"\u003e\n        \u003cimg alt=\"License\" src=\"https://badgen.net/npm/license/@yomo/presence\"\u003e\n    \u003c/a\u003e\u003cbr/\u003e\u003cbr/\u003e\n    \u003ca href=\"https://www.producthunt.com/posts/cursor-chat-anywhere?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-cursor-chat-anywhere\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=333289\u0026theme=dark\" alt=\"Cursor Chat Anywhere - Add Figma like cursor chat to your own products | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 🧬 Introduction\n\n`Presencejs` is a JavaScript library that enables the creation of real-time web\napplications with a secure, low-latency, and high-performance geo-distributed\narchitecture.\n\nKey Features:\n\n- **Geo-distributed Architecture**: Deploy your real-time backend close to users\n  all over the world for better performance.\n- **WebTransport Support**: WebTransport is an new API that offers low-latency,\n  bidirectional, client-server messaging.\n- **Secure**, **low-latency**, and **high-performance**: PresenceJS prioritizes\n  security, speed, and performance for a seamless user experience.\n- **Real-time and collaborative experience**: With PresenceJS, components\n  receive data flow in real time, ensuring fast and reactive UI by offering the\n  flexibility to send either unreliable or reliable data\n- **Easy to use**: PresenceJS is simple to implement, making it an accessible\n  solution for developers.\n- **Free for self-managed hosting**: PresenceJS is free to use for self-managed\n  hosting, making it an affordable choice for projects of any size.\n\n## 🌟 Showcase\n\nThese React Serverless Components are built with `presencejs`:\n\n### 👯‍♀️ GroupHug\n\n\u003e Live collaborator avatars for multiplayer web apps\n\n\u003cimg width=\"800\" alt=\"image\" src=\"https://user-images.githubusercontent.com/65603/225336005-56f3605e-a150-4c9a-891c-fc5f51f46c5c.png\"\u003e\n\n- [Preview](https://allegrocloud.io/preview/clewfjysp0008osvwuina6qnf)\n- Source code: [./components/react/grouphug-react](./components/react/group-hug)\n\n## 🥷🏼 Quick Start\n\n### 1. Add `presencejs` to your web app\n\nUsing npm\n\n```\n$ npm i --save @yomo/presence\n```\n\nUsing yarn\n\n```\n$ yarn add @yomo/presence\n```\n\nUsing pnpm\n\n```\n$ pnpm i @yomo/presence\n```\n\n#### Create a `Presence` instance\n\n```js\nimport createPresence from \"@yomo/presence\";\n\n// create an instance.\nconst presencePromise = createPresence(\"https://prsc.yomo.dev\", {\n  publicKey: process.env.NEXT_PUBLIC_PRESENCE_PUBLIC_KEY,\n  id,\n  debug: true,\n});\n\npresencePromise.then((presence) =\u003e {\n  console.log(\"Presence: \", presence);\n});\n\n// or\n// (async () =\u003e {\n//   const presence = await presencePromise;\n// })()\n```\n\n#### Create `Channel`\n\nadd subscribe to peers online event:\n\n```js\nconst channel = presence.joinChannel('group-hug', myState);\n// join multiple channels\n// const channel2 = presence.joinChannel('live-cursor', myState);\n// const channel3 = presence.joinChannel('cursor-chat', myState);\n\nchannel.subscribePeers((peers) =\u003e {\n    peers.forEach((peer) =\u003e {\n      console.log(peer + \" is online\")\n    }\n});\n```\n\n#### Broadcast messages to all peers in this channel\n\n```js\nconst cb = () =\u003e {\n  const state = document.hidden ? \"away\" : \"online\";\n  c.broadcast(\"hidden-state-change\", { state });\n};\ndocument.addEventListener(\"visibilitychange\", cb);\n```\n\n#### Subscribe messages from the other peers\n\n```js\nconst unsubscribe = channel.subscribe(\n  \"hidden-state-change\",\n  ({ payload, peerState }) =\u003e {\n    console.log(`${peerState.id} change visibility to: ${payload}`);\n  },\n);\n\nunsubscribe();\n```\n\n### 2. Start `prscd` backend service\n\nsee [prscd](./prscd)\n\n## 🤹🏻‍♀️ API\n\nSee docs: https://presence.js.org\n\n## 👩🏼‍🔬 Development\n\n- frontend project: `bun install`\n- `packages/presence`: `bun run build`\n- `packages/group-hug-react`: `bun run build:js`\n- local backend dev server: [see prscd](./prscd)\n\n## 🏡 Self-managed hosting\n\nDocs: https://presence.js.org\n\n## License\n\nThe [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyomorun%2Fpresencejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyomorun%2Fpresencejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyomorun%2Fpresencejs/lists"}