{"id":28375282,"url":"https://github.com/lukehollis/react-urban-mobility","last_synced_at":"2026-03-06T07:01:45.703Z","repository":{"id":293559672,"uuid":"984427823","full_name":"lukehollis/react-urban-mobility","owner":"lukehollis","description":"React starter for urban mobility simulations of human-like behaviors connecting to a MARL model API backend","archived":false,"fork":false,"pushed_at":"2025-05-20T04:09:37.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T22:41:24.619Z","etag":null,"topics":["multi-agent-reinforcement-learning","react","simulations","traffic-simulation","urban-planning"],"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/lukehollis.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,"zenodo":null}},"created_at":"2025-05-15T23:16:02.000Z","updated_at":"2025-05-28T20:10:44.000Z","dependencies_parsed_at":"2025-05-16T00:36:45.324Z","dependency_job_id":null,"html_url":"https://github.com/lukehollis/react-urban-mobility","commit_stats":null,"previous_names":["lukehollis/react-urban-mobility"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lukehollis/react-urban-mobility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukehollis%2Freact-urban-mobility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukehollis%2Freact-urban-mobility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukehollis%2Freact-urban-mobility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukehollis%2Freact-urban-mobility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukehollis","download_url":"https://codeload.github.com/lukehollis/react-urban-mobility/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukehollis%2Freact-urban-mobility/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30164883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"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":["multi-agent-reinforcement-learning","react","simulations","traffic-simulation","urban-planning"],"created_at":"2025-05-29T22:36:57.098Z","updated_at":"2026-03-06T07:01:45.685Z","avatar_url":"https://github.com/lukehollis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\nhttps://github.com/user-attachments/assets/119a45b3-50c4-41fe-9e55-5cf4204eff30\n\n\n\n\n# MARL Urban Mobility Agent Viewer (React Example)\n\nThis is a basic React application (bootstrapped with Vite and TypeScript) that demonstrates how to connect to the Multi-Agent Reinforcment Learning Urban Mobility WebSocket API and display agent information.\n\nThis is an example application that connects to the Urban Mobility server MARL API and accessible (defaults to `wss://urban-marl.mused.com/ws/marl_state`).\n\nI've been using this for my research for creating simulations of human behaviors in geospatial environments. I hope to continue to extend it with more features in the future. \n\n\nThis repo is a basic example for usage on a map -- and has a 2d example. Each agent will return elevation data, but you don't have to use it. \n\n\n\nhttps://github.com/user-attachments/assets/e2b5f322-0b8d-4b42-b20c-825a1341c017\n\n\n\n## Setup \u0026 Running\n\n1.  **Clone this repo**:\n    ```bash\n    git clone git@github.com:lukehollis/react-urban-mobility.git\n    ```\n\n2.  **Install Dependencies**:\n    If using pnpm (recommended for consistency with the parent project's preferences if applicable):\n    ```bash\n    pnpm install\n    ```\n    Alternatively, use npm or yarn:\n    ```bash\n    npm install\n    # or\n    yarn install\n    ```\n\n3.  **Start the Development Server**:\n    ```bash\n    pnpm run dev\n    ```\n    Or, if using npm/yarn:\n    ```bash\n    npm run dev\n    # or\n    yarn dev\n    ```\n    This will typically open the application in your web browser at `http://localhost:5173` (Vite's default port, but check your terminal output).\n\n## Features\n\n*   Connects to the MARL WebSocket server.\n*   Requests initial agent data upon connection.\n*   Displays the WebSocket connection status.\n*   Shows a placeholder for a map where agents would be visualized.\n*   Lists a summary of received agent data (ID, type, position, fleeing status).\n*   Handles `add_agent`, `initial_population_complete`, `new_path`, and `update_flee_status` messages from the server.\n\n## Customization\n\n*   **WebSocket URL**: The URL is defined in `src/App.tsx` (`WS_URL`). Modify this if your server runs on a different host or port.\n*   **Map Implementation**: The `src/MapPlaceholder.tsx` component is a simple placeholder. To visualize agents on an actual map, you would replace its content with a map library integration (e.g., Leaflet, React Leaflet, Mapbox GL JS, Google Maps React components).\n*   **Agent Properties**: The `Agent` interface in `src/App.tsx` can be extended to include more properties if your server sends additional data per agent.\n*   **Styling**: Basic styles are in `src/index.css`.\n\n## Building for Production\n\nTo create a production build:\n```bash\npnpm run build\n# or npm run build / yarn build\n```\nThis will generate static assets in the `dist` folder. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukehollis%2Freact-urban-mobility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukehollis%2Freact-urban-mobility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukehollis%2Freact-urban-mobility/lists"}