{"id":15173991,"url":"https://github.com/mutasim77/fast-redis-chat","last_synced_at":"2026-01-27T04:32:46.449Z","repository":{"id":251158629,"uuid":"836234100","full_name":"mutasim77/fast-redis-chat","owner":"mutasim77","description":"💬🚀 Scalable real-time chat app with WebSockets and Redis, featuring horizontal scaling and live connection tracking.","archived":false,"fork":false,"pushed_at":"2024-08-01T07:03:18.000Z","size":206,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-24T16:52:40.396Z","etag":null,"topics":["caddy","docker","fastify","horizontal-scaling","nextjs","redis","reverse-proxy","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/mutasim77.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}},"created_at":"2024-07-31T12:28:13.000Z","updated_at":"2025-09-22T17:09:41.000Z","dependencies_parsed_at":"2024-08-01T08:07:31.055Z","dependency_job_id":null,"html_url":"https://github.com/mutasim77/fast-redis-chat","commit_stats":null,"previous_names":["mutasim77/fast-redis-chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mutasim77/fast-redis-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Ffast-redis-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Ffast-redis-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Ffast-redis-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Ffast-redis-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mutasim77","download_url":"https://codeload.github.com/mutasim77/fast-redis-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Ffast-redis-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28802063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"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":["caddy","docker","fastify","horizontal-scaling","nextjs","redis","reverse-proxy","websocket"],"created_at":"2024-09-27T11:22:41.328Z","updated_at":"2026-01-27T04:32:46.431Z","avatar_url":"https://github.com/mutasim77.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Banner](https://github.com/user-attachments/assets/7c03832d-c6d9-47f1-8871-01aa753e8bb0)\n\n\u003ch1 align=\"center\"\u003e\n  Real-time Scalable Messaging 🚀\n\u003c/h1\u003e\n\n\n## 🌟 Introduction\nFastChat is a high-performance, real-time chat application that demonstrates the power of WebSockets and Redis for scalable messaging. Built with modern web technologies, it offers a seamless chatting experience that can easily scale to handle a large number of concurrent users.\n\n## 🎯 Features\n- ✉️ Real-time messaging using WebSockets\n- 👥 Live user `connection count` across multiple instances using Redis [Pub/Sub](https://github.com/mutasim77/knowledge-sharing/tree/master/Redis#pubsub-messaging-)\n- 🚀 Horizontally scalable architecture with multiple backend instances\n- ⚖️ Load balancing with Caddy as a reverse proxy\n- 🖥️ Sleek, responsive UI built with Next.js and Tailwind CSS\n- 🐳 Dockerized for easy deployment and scaling\n\n## 🛠️ Tech Stack\n\n### Backend 🖥️\n- ⚡ Fastify: Fast and low overhead web framework\n- 🔌 Socket.io: Real-time bidirectional event-based communication\n- 🗄️ Redis (Upstash): In-memory data structure store, used as a database, cache, and message broker\n- 🐳 Docker \u0026 docker-compose: Containerization and multi-container Docker applications\n- 🌐 Caddy: Open source web server with automatic HTTPS\n\nFrontend 🎨\n- ⚛️ Next.js: React framework for production-grade applications\n- 🎭 Tailwind CSS: Utility-first CSS framework\n- 🔗 Socket.io-client: Client-side library for real-time web applications\n\n## 🚀 Getting Started\n\n### Prerequisites\n- Node.js (v18 or later)\n- pnpm || yarn || npm\n- Docker and docker-compose\n- Redis instance ([Upstash](https://upstash.com/) account)\n- Make (usually pre-installed on most systems)\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/mutasim77/fast-redis-chat.git\n   cd fast-redis-chat\n   ```\n\n2. Set up environment variables:\n  - Create a `.env` file in the server directory with:\n    ```bash\n    UPSTASH_REDIS_REST_URL=rediss://.....\n    ```\n    Replace `...` with your actual Upstash Redis URL.\n  - Create a `run.sh` file in  the server directory and populate it with:\n    ```bash\n    docker-compose down\n    \n    export UPSTASH_REDIS_REST_URL=rediss://...\n    export CORS_ORIGIN=http://localhost:3000  # or your specific CORS origin\n    \n    docker-compose -p chat_project up -d --build\n    ```\n    Replace `...` in the UPSTASH_REDIS_REST_URL with your actual Upstash Redis URL.\n\n  - Make sure to make the `run.sh` file executable by running:\n    ```bash\n    chmod +x run.sh\n    ```\n\n3. Use the Makefile to install dependencies and run the application:\n  ```bash\n  # Install dependencies for both client and server\n  make install\n  \n  # Run both the backend and frontend\n  make run\n\n  # Or simply just run\n  make all\n  ```\n\u003e This will start the backend server using the `run.sh` script and the frontend development server.\n\n## 💻 Usage\nOnce you've run `make run` or `make all`:\n1. Open your browser and navigate to `http://localhost:3000`\n2. Click Start Chatting\n3. Start sending messages in real-time!\n\n\u003e To stop the application, press Ctrl+C in the terminal where you ran `make run`.\n\u003e To clean up the project (remove node_modules, etc.), you can run:\n  ```bash\n  make clean  \n  ```\n\n## 📸 Preview\n\u003cimg width=\"1300\" alt=\"Home Page\" src=\"https://github.com/user-attachments/assets/6e51dc6d-618d-4222-b29d-91a73aca5ea5\"\u003e\n\u003cimg width=\"1300\" alt=\"Chat SS\" src=\"https://github.com/user-attachments/assets/9ac7a857-ce73-4e4c-a5a3-4a74bbf0f75a\"\u003e\n\n## 🤝 Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📜 License\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n\u003cp align=\"center\"\u003e Made with ❤️ by Mutasim \u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutasim77%2Ffast-redis-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmutasim77%2Ffast-redis-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutasim77%2Ffast-redis-chat/lists"}