{"id":21806781,"url":"https://github.com/ritulbhatnagar/scalable-chat-app","last_synced_at":"2026-04-08T11:31:13.392Z","repository":{"id":221550413,"uuid":"754702091","full_name":"RitulBhatnagar/scalable-chat-app","owner":"RitulBhatnagar","description":"Majorly focus on scalabilty not on UI","archived":false,"fork":false,"pushed_at":"2024-02-09T03:39:26.000Z","size":852,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T14:21:45.165Z","etag":null,"topics":["digitalocean","docker","fastify","github-actions","nextjs","redis","shadcn-ui","tailwindui","vercel","websockets"],"latest_commit_sha":null,"homepage":"https://scalable-chat-app-ui.vercel.app/                    ","language":"TypeScript","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/RitulBhatnagar.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":"2024-02-08T15:55:13.000Z","updated_at":"2024-02-09T03:33:58.000Z","dependencies_parsed_at":"2024-11-27T12:40:15.413Z","dependency_job_id":null,"html_url":"https://github.com/RitulBhatnagar/scalable-chat-app","commit_stats":null,"previous_names":["ritulbhatnagar/scalable-chat-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RitulBhatnagar/scalable-chat-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitulBhatnagar%2Fscalable-chat-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitulBhatnagar%2Fscalable-chat-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitulBhatnagar%2Fscalable-chat-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitulBhatnagar%2Fscalable-chat-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RitulBhatnagar","download_url":"https://codeload.github.com/RitulBhatnagar/scalable-chat-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RitulBhatnagar%2Fscalable-chat-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31553985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["digitalocean","docker","fastify","github-actions","nextjs","redis","shadcn-ui","tailwindui","vercel","websockets"],"created_at":"2024-11-27T12:29:53.554Z","updated_at":"2026-04-08T11:31:13.053Z","avatar_url":"https://github.com/RitulBhatnagar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Build and Deploy a Chat Application That Scales Horizontally with WebSockets and Upstash Redis\n### Ui repo link -\u003e https://github.com/RitulBhatnagar/scalable-chat-app-ui/tree/master\n## What I have use?\n1. Fastify - Backend\n1. Websockets - Realtime \n1. Next.js - Frontend\n1. Tailwind \u0026 Shadcn UI - Styling\n1. Redis - Pub/Sub\n1. Docker/docker-compose - Containerization\n1. GitHub actions - CI/CD\n1. DigitalOcean - Host the backend\n1. Vercel - Host the frontend\n\n## System architecture\n![Screenshot](system-arch.png)\n## Data flow\n![Screenshot](data-flow.png)\n\n## Debugging\n### Websockets\n1. Using `wss://` and not `ws://` in production\n2. Use debug mode in Caddy server\n```\n{\n    debug\n}\n```\n\n### Docker\n1. List our running docker containers\n```bash\ndocker ps\n```\n1. Stop a running container\n```bash\ndocker stop \u003ccontainer id\u003e\n```\n\n1. Remove a container\n```bash\ndocker rm \u003ccontainer id\u003e\n```\n\n1. List out networks\n```bash\ndocker network ls\n```\n\n1. Remove a network\n```bash\ndocker network rm \u003cnetwork id\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritulbhatnagar%2Fscalable-chat-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fritulbhatnagar%2Fscalable-chat-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritulbhatnagar%2Fscalable-chat-app/lists"}