{"id":21431664,"url":"https://github.com/tomdoestech/chat-tutorial","last_synced_at":"2025-09-07T14:07:06.831Z","repository":{"id":189882680,"uuid":"681488023","full_name":"TomDoesTech/chat-tutorial","owner":"TomDoesTech","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-29T11:32:37.000Z","size":87,"stargazers_count":24,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-14T14:04:59.346Z","etag":null,"topics":["chat","pubsub","react","realtime","redis"],"latest_commit_sha":null,"homepage":"https://youtu.be/cfEqS1A5diM","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/TomDoesTech.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":"2023-08-22T06:07:21.000Z","updated_at":"2025-07-04T00:30:40.000Z","dependencies_parsed_at":"2024-11-22T23:11:32.871Z","dependency_job_id":"30be0ee5-42ae-4ab2-8aa7-42bb4dbf66ab","html_url":"https://github.com/TomDoesTech/chat-tutorial","commit_stats":null,"previous_names":["tomdoestech/chat-tutorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomDoesTech/chat-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fchat-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fchat-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fchat-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fchat-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomDoesTech","download_url":"https://codeload.github.com/TomDoesTech/chat-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fchat-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274046000,"owners_count":25212982,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["chat","pubsub","react","realtime","redis"],"created_at":"2024-11-22T23:11:30.860Z","updated_at":"2025-09-07T14:07:06.772Z","avatar_url":"https://github.com/TomDoesTech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Build and Deploy a Chat Application That Scales Horizontally with WebSockets and Upstash Redis\n\n## Thank you to Upstash for sponsoring this video!\n\u003cimg src=\"upstash-inc-vector-logo.png\" width=\"200px\" /\u003e\n\u003cbr /\u003e\nUpstash is a serverless data platform that provides serverless Redis, kafka \u0026 QStash.\n\n## Who is this video for?\n1. Those who are already familiar with JavaScript/TypeScript\n\n## Features\n1. Send and receive messages\n1. Show current connection count\n\n## What will you learn?\n1. Create realtime communications with WebSockets\n1. Use Redis Pub/Sub to communicate across multiple instances\n1. Use Redis to stop data (connection count/ messages)\n1. Use Docker and docker-compose to containerize the application\n1. Docker multi-stage builds\n1. Use GitHub actions to automate CI/CD\n1. Graceful shutdowns\n\n## What are we using?\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## What will you need?\n1. [Upstash account](https://upstash.com/)\n1. [Node.js](https://nodejs.org/en)\n1. [Docker \u0026 docker-compose](https://docs.docker.com/engine/install/)\n1. An editor - [VSCode](https://code.visualstudio.com/)\n1. [DigitalOcean](https://www.digitalocean.com/) account\n1. [Vercel](https://vercel.com/) account\n1. [Vercel CLI](https://vercel.com/docs/cli)\n1. [GitHub](https://github.com) account\n\n\n## Video structure\n1. Build backend\n1. Dockerise backend\n1. Deploy backend\n    1. Create DigitalOcean droplet\n    1. Configure droplet\n    1. Write github action\n1. Build frontend\n1. Deploy frontend \n\n## Debugging\n### Websockets\n1. Make sure you are 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%2Ftomdoestech%2Fchat-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomdoestech%2Fchat-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Fchat-tutorial/lists"}