{"id":31651321,"url":"https://github.com/bws9000/robot-simulator","last_synced_at":"2025-10-07T08:54:03.674Z","repository":{"id":42201543,"uuid":"356432758","full_name":"bws9000/robot-simulator","owner":"bws9000","description":"A lightweight WebSocket-driven robot simulator that visually demonstrates reactive UI updates; a hands-on exploration of how frontend frameworks work under the hood.","archived":false,"fork":false,"pushed_at":"2025-06-20T22:27:20.000Z","size":10153,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-20T23:27:30.759Z","etag":null,"topics":["javascript","node","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/bws9000.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}},"created_at":"2021-04-10T00:50:47.000Z","updated_at":"2025-06-20T23:04:53.000Z","dependencies_parsed_at":"2022-08-12T09:11:04.673Z","dependency_job_id":null,"html_url":"https://github.com/bws9000/robot-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bws9000/robot-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bws9000%2Frobot-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bws9000%2Frobot-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bws9000%2Frobot-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bws9000%2Frobot-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bws9000","download_url":"https://codeload.github.com/bws9000/robot-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bws9000%2Frobot-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278747542,"owners_count":26038707,"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-10-07T02:00:06.786Z","response_time":59,"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":["javascript","node","websocket"],"created_at":"2025-10-07T08:54:02.608Z","updated_at":"2025-10-07T08:54:03.663Z","avatar_url":"https://github.com/bws9000.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robot Simulator or Reactivity Sandbox\n\nA minimalist robot simulation app that demonstrates frontend reactivity concepts using Node.js, WebSockets, and plain JavaScript DOM manipulation. Originally built for a different purpose, it now offers a surprisingly clear — though not sophisticated — look into how modern JavaScript frameworks update the UI in response to state changes. \n\n## How It Works\n\nThis project mimics how modern frameworks like React or Angular manage state and update the UI.\n\n- The **backend** is a Node.js app with WebSocket and command-line input\n- The **frontend** is a grid rendered in the browser, updated via WebSocket messages\n- All updates to the robot's position/state are reflected live in the DOM\n\n## Features\n\n- Command-line interface to control the robot (via `stdin`)\n- Realtime robot state syncing to browser using WebSocket\n- Custom grid-based UI showing robot position and active zones\n- No framework — just raw DOM updates for learning and experimentation\n\n## Structure\n\n```\nrobot-simulator/\n├── index.js             # Node.js server + WebSocket + robot logic\n├── public/\n│   └── index.html       # Grid display \u0026 frontend logic\n├── wsdata/\n│   └── RobotData.js     # Robot state management\n├── frontend/\n│   └── Grid1.js         # UI update logic for the robot grid\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js (v18+ recommended)\n\n### Run the App\n\n```bash\nnpm install\nnode index.js\n```\n\n### Open the frontend\n\nVisit `http://localhost:3000` in your browser.\n\n### Send commands\n\nIn the terminal, type:\n\n```bash\nactivate\nmove up\nmove left\nmove right\n```\n\nThe grid will update in real time.\n\nThis project is designed to:\n- Visualize how state updates can drive the DOM\n- Simulate how frameworks like Angular or React operate under the hood\n- Explore WebSocket communication and reactive UI updates\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbws9000%2Frobot-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbws9000%2Frobot-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbws9000%2Frobot-simulator/lists"}