{"id":51485686,"url":"https://github.com/leisurelyleon/cosync","last_synced_at":"2026-07-07T06:02:29.378Z","repository":{"id":362203365,"uuid":"1257859407","full_name":"leisurelyleon/cosync","owner":"leisurelyleon","description":"Real-time collaborative editor — multiple users edit a shared document live, with presence (who's online + live cursors). Rust WebSocket server (axum/tokio) holds authoritative room state and broadcasts ordered edits; Next.js/TypeScript frontend. Backend on Fly.io, frontend on Vercel.","archived":false,"fork":false,"pushed_at":"2026-06-03T06:18:37.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T06:18:44.081Z","etag":null,"topics":["backend","broadcast","editor","flyio","frontend","nextjs","rust","typescript","vercel","websocket"],"latest_commit_sha":null,"homepage":"","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/leisurelyleon.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-03T04:24:15.000Z","updated_at":"2026-06-03T06:18:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leisurelyleon/cosync","commit_stats":null,"previous_names":["leisurelyleon/cosync"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leisurelyleon/cosync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leisurelyleon%2Fcosync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leisurelyleon%2Fcosync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leisurelyleon%2Fcosync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leisurelyleon%2Fcosync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leisurelyleon","download_url":"https://codeload.github.com/leisurelyleon/cosync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leisurelyleon%2Fcosync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35216572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"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":["backend","broadcast","editor","flyio","frontend","nextjs","rust","typescript","vercel","websocket"],"created_at":"2026-07-07T06:02:28.285Z","updated_at":"2026-07-07T06:02:29.316Z","avatar_url":"https://github.com/leisurelyleon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cosync\n\nA **real-time collaborative editor**. Multiple users join a room, edit a shared\ndocument, and see each other's changes live — with presence showing who's\nconnected. The Rust server holds the authoritative document and broadcasts\nordered edits to everyone in the room.\n\n## How it works\n\n- **Authoritative WebSocket server** (Rust, axum + tokio). Each room owns its\n  document and a broadcast channel; edits are applied server-side and fanned out\n  to all participants. (ADR 0001)\n- **Direct WebSocket connection.** The browser connects straight to the server via\n  `NEXT_PUBLIC_WS_URL` — Next.js rewrites can't proxy WebSocket upgrades. (ADR 0002)\n- **Presence.** Participants get a color and appear in a live roster; joins and\n  leaves broadcast to the room. (ADR 0003)\n\n## Layout\n\n| Path                   | What it is                              |\n|------------------------|-----------------------------------------|\n| `crates/cosync-server` | Rust WebSocket server                   |\n| `web/`                 | Next.js frontend                        |\n| `docs/`                | Architecture + ADRs                     |\n\n## Develop\n\nPrerequisites: Rust and Node 20+. (A `.devcontainer` ships both.)\n\n```bash\n# Server (listens on :8080)\ncargo run -p cosync-server\n\n# Frontend, in another terminal\ncd web\nnpm install\n# point the client at the server:\necho \"NEXT_PUBLIC_WS_URL=ws://localhost:8080\" \u003e .env.local\nnpm run dev      # http://localhost:3000\n```\n\nOpen the page in two tabs — type in one, watch it sync to the other.\n\n## Deploy\n\n- **Server** -\u003e Fly.io (always-on; WebSockets need a persistent machine).\n- **Frontend** -\u003e Vercel, Root Directory = `web`, with `NEXT_PUBLIC_WS_URL` set to\n  the `wss://` Fly URL.\n\n## Status\n\n- [x] Authoritative WebSocket server\n- [x] Live document sync + presence\n- [x] Deployed (Fly.io + Vercel)\n- [x] Live cursors / CRDT merge (ADR 0003)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleisurelyleon%2Fcosync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleisurelyleon%2Fcosync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleisurelyleon%2Fcosync/lists"}