{"id":22166684,"url":"https://github.com/alextanhongpin/chat-playground","last_synced_at":"2026-04-16T17:36:08.653Z","repository":{"id":79114700,"uuid":"155060193","full_name":"alextanhongpin/chat-playground","owner":"alextanhongpin","description":"Simple standalone chat app with shareable link, inspired by go-playground","archived":false,"fork":false,"pushed_at":"2018-11-01T16:07:25.000Z","size":104,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T16:38:33.069Z","etag":null,"topics":["chat","chat-server","go","golang","gorilla","websocket"],"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/alextanhongpin.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,"publiccode":null,"codemeta":null}},"created_at":"2018-10-28T10:45:59.000Z","updated_at":"2021-11-19T16:05:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"854c6083-380c-47a3-ab00-766e6e01cb14","html_url":"https://github.com/alextanhongpin/chat-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alextanhongpin/chat-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Fchat-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Fchat-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Fchat-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Fchat-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alextanhongpin","download_url":"https://codeload.github.com/alextanhongpin/chat-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alextanhongpin%2Fchat-playground/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265846884,"owners_count":23838160,"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":["chat","chat-server","go","golang","gorilla","websocket"],"created_at":"2024-12-02T05:20:37.560Z","updated_at":"2025-10-16T14:51:21.350Z","avatar_url":"https://github.com/alextanhongpin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chat-playground\n\nA stateless chat app that is inspired by play.golang, with sharable links for others to join the room. Once all users leave the room, the room and the messages will be deleted.\n\n![app](./assets/app.png)\n\n## Requirements\n\nFunctional requirements:\n- System should allow users to chat with another user\n- System should store the conversations of the users\n- System should notify users when another user join the group\n- System should tolerate refresh from frontend\n\nNon-functional requirements:\n- System should be stateful (no database, just in-memory)\n\nExtended requirements:\n- Should encrypt conversations (e.g. with Signal Protocol)\n- Should notify users when another user is typing \n- Should send notification to user that is offline\n- Should allow users to upload files\n\n## Capacity Estimation and Constraints\n\nWe can easily interpolate the results by just taking a base estimate of 100 msg/second and msg size of 72 bytes (can be estimated by taking the `unsafe.Sizeof(msgStruct)`). \n\nAmount:\n```\n1 second = 100 msgs\n1 month = 259,200,000 msgs (259.2M)\n```\n\nTraffic Read/Write:\n```\nread:write ratio = 100:1\n10,000 msg/s : 100 msg/s\n```\n\nStorage:\n```\nNot required, as everything is in-memory\n```\n\nBandwidth:\n```\nread:write ratio = 100:1\nwrite: 7KB/s\nread: 0.7MB/s\n```\n\nMemory:\n```\nPersisted for one day\n100 * 86400 * 72 bytes ~= 595MB\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextanhongpin%2Fchat-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falextanhongpin%2Fchat-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falextanhongpin%2Fchat-playground/lists"}