{"id":18657121,"url":"https://github.com/qharny/chat_server","last_synced_at":"2025-11-05T21:30:29.294Z","repository":{"id":251802648,"uuid":"838490372","full_name":"Qharny/chat_server","owner":"Qharny","description":"This project is a simple chat server implemented in Dart using WebSockets. It allows multiple clients to connect and exchange messages in real-time.","archived":false,"fork":false,"pushed_at":"2024-08-06T11:42:25.000Z","size":2374,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-27T15:10:23.387Z","etag":null,"topics":["chat-server","cli","server"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/Qharny.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-08-05T18:42:47.000Z","updated_at":"2024-08-08T20:58:05.000Z","dependencies_parsed_at":"2024-11-07T07:41:56.892Z","dependency_job_id":null,"html_url":"https://github.com/Qharny/chat_server","commit_stats":null,"previous_names":["qharny/chat_server"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fchat_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fchat_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fchat_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qharny%2Fchat_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qharny","download_url":"https://codeload.github.com/Qharny/chat_server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239474169,"owners_count":19644858,"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-server","cli","server"],"created_at":"2024-11-07T07:26:44.150Z","updated_at":"2025-11-05T21:30:29.255Z","avatar_url":"https://github.com/Qharny.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dart Chat Server\n\nThis project is a simple chat server implemented in Dart using WebSockets. It allows multiple clients to connect and exchange messages in real-time.\n\n## Features\n\n- WebSocket-based communication\n- Support for multiple concurrent clients\n- Real-time message broadcasting\n- Basic logging functionality\n\n## Prerequisites\n\nTo run this project, you need to have the following installed:\n\n- Dart SDK (version 2.12 or later)\n- Git (for version control)\n\n## Setup\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/yourusername/dart-chat-server.git\n   cd dart-chat-server\n   ```\n\n2. Install dependencies:\n   ```\n   dart pub get\n   ```\n\n3. Run the server:\n   ```\n   dart run bin/server.dart\n   ```\n\nThe server will start running on `ws://localhost:8080` by default.\n\n## Project Structure\n\n```txt\nchat_server/\n│\n├── bin/\n│   └── server.dart       # Main entry point for the server\n│\n├── lib/\n│   ├── models/\n│   │   └── message.dart  # Message model\n│   │\n│   ├── services/\n│   │   └── socket_service.dart  # WebSocket handling\n│   │\n│   └── utils/\n│       └── logger.dart   # Logging utility\n│\n├── test/\n│   └── server_test.dart  # Tests for the server\n│\n├── pubspec.yaml          # Dart package manager file\n└── README.md             # This file\n```\n\n## Usage\n\nOnce the server is running, clients can connect to it using a WebSocket client. Here's a simple example of how to connect and send messages using Dart:\n\n```dart\nimport 'package:web_socket_channel/io.dart';\nimport 'dart:convert';\n\nvoid main() {\n  final channel = IOWebSocketChannel.connect('ws://localhost:8080');\n  \n  channel.stream.listen((message) {\n    final decodedMessage = jsonDecode(message);\n    print('Received: ${decodedMessage['content']}');\n  });\n\n  channel.sink.add(jsonEncode({\n    'sender': 'Client',\n    'content': 'Hello, server!',\n    'timestamp': DateTime.now().toIso8601String(),\n  }));\n}\n```\n\n## Testing\n\nTo run the tests:\n\n```\ndart test\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqharny%2Fchat_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqharny%2Fchat_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqharny%2Fchat_server/lists"}