{"id":28936312,"url":"https://github.com/sun1211/socket-example","last_synced_at":"2026-05-16T18:35:44.449Z","repository":{"id":299211125,"uuid":"1002318471","full_name":"sun1211/socket-example","owner":"sun1211","description":"A simple real-time chat application demonstrating Socket.IO with a standalone HTML client and Node.js server.","archived":false,"fork":false,"pushed_at":"2025-06-15T10:15:45.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-25T22:47:54.599Z","etag":null,"topics":["express","socket-io","websocket"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/sun1211.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,"zenodo":null}},"created_at":"2025-06-15T07:48:00.000Z","updated_at":"2025-06-15T10:15:48.000Z","dependencies_parsed_at":"2025-06-15T11:40:57.665Z","dependency_job_id":null,"html_url":"https://github.com/sun1211/socket-example","commit_stats":null,"previous_names":["sun1211/socket-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sun1211/socket-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1211%2Fsocket-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1211%2Fsocket-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1211%2Fsocket-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1211%2Fsocket-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sun1211","download_url":"https://codeload.github.com/sun1211/socket-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sun1211%2Fsocket-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33114455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"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":["express","socket-io","websocket"],"created_at":"2025-06-22T20:08:24.155Z","updated_at":"2026-05-16T18:35:44.413Z","avatar_url":"https://github.com/sun1211.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Socket.IO Demo\n\nA simple real-time chat application demonstrating Socket.IO with a standalone HTML client and Node.js server.\n\n## Features\n\n- **Real-time messaging** - Instant chat between multiple clients\n- **Typing indicators** - See when others are typing\n- **Connection status** - Visual connection state indicators\n- **Custom events** - Send and receive custom Socket.IO events\n- **Responsive design** - Works on desktop and mobile\n- **Sound notifications** - Audio alerts for new messages\n\n## Quick Start\n\n### 1. Start the Server\n\n```bash\n# Install dependencies\nnpm install\n\n# Run the server\nnpm start\n```\n\nThe server will start on `http://localhost:3000`\n\n### 2. Open the Client\n\nSimply open `index.html` in your web browser. The client will automatically connect to `http://localhost:3000`.\n\n## Usage\n\n1. **Connect** - Click the \"Connect\" button to establish connection\n2. **Chat** - Type messages and press Enter or click Send\n3. **Custom Events** - Use the \"Custom Event\" button to test custom Socket.IO events\n4. **Disconnect** - Use the \"Disconnect\" button to close the connection\n\n## Server Events\n\nThe server handles these Socket.IO events:\n\n- `chat message` - Broadcasts messages to all clients\n- `typing` - Shows typing indicators to other users\n- `custom event` - Processes custom data and responds\n- `private message` - Sends direct messages between users\n\n## Client Features\n\n- **Auto-reconnection** - Automatically reconnects on connection loss\n- **Message history** - Scrollable chat history\n- **Typing detection** - Shows when users are typing\n- **Connection info** - Displays Socket ID and connection status\n\n## Customization\n\n- Change server URL in the client interface\n- Modify styling in the HTML file\n- Add new Socket.IO events in `server.ts`\n- Customize message handling and UI behavior\n\n## Requirements\n\n- Node.js (for server)\n- Modern web browser (for client)\n- Socket.IO v4.7.5+\n\n## Architecture\n\n- **Client**: Standalone HTML file with Socket.IO client library\n- **Server**: Express.js + Socket.IO server with TypeScript\n- **Communication**: WebSocket with polling fallback","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun1211%2Fsocket-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsun1211%2Fsocket-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsun1211%2Fsocket-example/lists"}