{"id":25339789,"url":"https://github.com/basemax/tcp-typescript-bun","last_synced_at":"2026-04-10T23:50:50.465Z","repository":{"id":277444996,"uuid":"931117791","full_name":"BaseMax/TCP-Typescript-BUN","owner":"BaseMax","description":"A lightweight and efficient TCP chat server built with TypeScript and Bun. This project demonstrates how to handle multiple client connections, broadcast messages, and manage user sessions using Bun's high-performance networking capabilities.","archived":false,"fork":false,"pushed_at":"2025-02-11T19:07:39.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T04:17:32.541Z","etag":null,"topics":["bun","bun-tcp","javascript","js","tcp","tcp-bun","tcp-chat","tcp-chat-room","tcp-chat-server","tcp-chatroom","tcp-client","tcp-server","ts","typescript","typescript-bun"],"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/BaseMax.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":"2025-02-11T18:40:45.000Z","updated_at":"2025-02-12T12:19:35.000Z","dependencies_parsed_at":"2025-02-14T14:33:50.660Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/TCP-Typescript-BUN","commit_stats":null,"previous_names":["basemax/tcp-typescript-bun"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTCP-Typescript-BUN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTCP-Typescript-BUN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTCP-Typescript-BUN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTCP-Typescript-BUN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/TCP-Typescript-BUN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829502,"owners_count":21002995,"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":["bun","bun-tcp","javascript","js","tcp","tcp-bun","tcp-chat","tcp-chat-room","tcp-chat-server","tcp-chatroom","tcp-client","tcp-server","ts","typescript","typescript-bun"],"created_at":"2025-02-14T07:28:59.359Z","updated_at":"2026-04-10T23:50:50.435Z","avatar_url":"https://github.com/BaseMax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TCP-Typescript-BUN\n\nA lightweight and efficient TCP chat server built with TypeScript and Bun. This project demonstrates how to handle multiple client connections, broadcast messages, and manage user sessions using Bun's high-performance networking capabilities.\n\n## Features\n\n- 🚀 Blazing-fast TCP server powered by Bun\n- 👥 Multi-user support with real-time message broadcasting\n- 🔒 Automatic user registration with nickname validation\n- 🔌 Handles disconnections gracefully\n- 🎉 Welcomes new users and provides an online user list\n\n## Installation\n\nMake sure you have Bun installed on your system.\n\n**Clone the repository:**\n\n```\ngit clone https://github.com/BaseMax/TCP-Typescript-BUN.git\ncd TCP-Typescript-BUN\n```\n\n**Install dependencies:**\n\n```\nbun install\n```\n\n## Usage\n\nTo start the server, run:\n\n```\nbun run index.ts\n```\n\nBy default, the server runs on `127.0.0.1:3000`. You can connect to it using a TCP client like `nc` (Netcat):\n\n```\nnc 127.0.0.1 3000\n```\n\n## How It Works\n\nWhen a client connects, they are prompted to enter a nickname.\n\nIf the nickname is unique, they join the chatroom and receive a welcome message.\n\nMessages sent by a user are broadcasted to all other connected clients.\n\nIf a user disconnects, a notification is sent to the remaining users.\n\n## Project Structure\n\n- `index.ts` - Main entry point of the TCP server\n- `package.json` - Project dependencies and scripts\n- `bun.lockb` - Bun's lock file for package management\n\n## Contributing\n\nContributions are welcome! Feel free to fork the repo, create a feature branch, and submit a pull request.\n\n## License\n\nThis project is open-source and available under the MIT License.\n\nCopyright 2025, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Ftcp-typescript-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Ftcp-typescript-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Ftcp-typescript-bun/lists"}