{"id":16226770,"url":"https://github.com/xandao-dev/voyager-rover","last_synced_at":"2026-04-29T12:33:20.188Z","repository":{"id":98780509,"uuid":"556990012","full_name":"xandao-dev/voyager-rover","owner":"xandao-dev","description":"Voyager Rover Simulation","archived":false,"fork":false,"pushed_at":"2022-10-31T00:45:12.000Z","size":303,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T02:41:49.692Z","etag":null,"topics":["algorithm","docker","jest","nodejs"],"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/xandao-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-10-24T22:25:04.000Z","updated_at":"2022-10-31T00:46:39.000Z","dependencies_parsed_at":"2023-04-09T10:02:11.125Z","dependency_job_id":null,"html_url":"https://github.com/xandao-dev/voyager-rover","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandao-dev%2Fvoyager-rover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandao-dev%2Fvoyager-rover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandao-dev%2Fvoyager-rover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandao-dev%2Fvoyager-rover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xandao-dev","download_url":"https://codeload.github.com/xandao-dev/voyager-rover/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773729,"owners_count":20993633,"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":["algorithm","docker","jest","nodejs"],"created_at":"2024-10-10T12:50:25.027Z","updated_at":"2026-04-29T12:33:15.167Z","avatar_url":"https://github.com/xandao-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eVoyager Rover\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A fictional calculator of final coordinates of a squadron of robotic rovers landed by NASA on a plateau on Mars.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/xandao-dev/voyager-rover\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/xandao-dev/voyager-rover/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/xandao-dev/voyager-rover/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#mars-rover\"\u003eMars Rover\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#input\"\u003eInput\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#output\"\u003eOutput\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#rover-data-example\"\u003eRover Data Example\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eDebug\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/xandao-dev/voyager-rover\"\u003e\n    \u003cimg src=\"static/simulator.png\" alt=\"Voyager Rover Simulator\"\u003e\n    \u003cimg src=\"static/coverage.png\" alt=\"Test coverage\"\u003e \n  \u003c/a\u003e\n\u003c/div\u003e\n\n### Mars Rover\n\nA squad of robotic rovers are to be landed by NASA on a plateau on Mars. \u003cbr /\u003e\n\nThis plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth. \u003cbr /\u003e\n\nA rover’s position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North. \u003cbr /\u003e\n\nIn order to control a rover , NASA sends a simple string of letters. The possible letters are ‘L’, ‘R’ and ‘M’. ‘L’ and ‘R’ makes the rover spin 90 degrees left or right respectively, without moving from its current spot. ‘M’ means move forward one grid point, and maintain the same heading. \u003cbr /\u003e\n\nAssume that the square directly North from (x, y) is (x, y 1).\n\n### Input\n\nThe first line of input is the upper-right coordinates of the plateau, the lower-left coordinates are assumed to be 0,0. \u003cbr /\u003e\n\nThe rest of the input is information pertaining to the rovers that have been deployed. Each rover has two lines of input. The first line gives the rover’s position, and the second line is a series of instructions telling the rover how to explore the plateau. \u003cbr /\u003e\n\nThe position is made up of two integers and a letter separated by spaces, corresponding to the x and y co-ordinates and the rover’s orientation. \u003cbr /\u003e\n\nEach rover will be finished sequentially, which means that the second rover won’t start to move until the first one has finished moving.\n\n### Output\n\nThe output for each rover should be its final co-ordinates and heading.\n\n### Rover Data Example\n\nExample 1 - Regular\n\n```\nPlateau Size: 10 10\nLanding Position: 1 2 N\nInstruction: LMLMLMLMM\nFinal Position: 1 3 N\n\nLanding Position: 3 3 E\nInstruction: MRRMMRMRRM\nFinal Position: 2 3 S\n```\n\nExample 2 - Avoid collision\n\n```\nPlateau Size: 10 10\nLanding Position: 2 0 N\nInstruction: MM\nFinal Position: 2 2 N\n\nLanding Position: 4 2 W\nInstruction: MMMRM\nFinal Position: 3 3 N\n```\n\n### Features\n\n- [x] Read inputs from command line\n- [x] Validate inputs (sanitize, regex validation and coercion)\n- [x] Calculate final position of each rover\n- [x] Avoid collision between rovers\n- [x] Avoid rovers to go out of the plateau\n- [x] Avoid rovers to be landed outside the plateau\n- [x] Avoid rovers to be landed on another rover\n\n### Built With\n\n- [MVC Architecture](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) - Model-View-Controller Architecture\n- [Factory Method Design Pattern](https://refactoring.guru/design-patterns/factory-method) - Design Pattern similar to classes\n- [Node.js](https://nodejs.org/) - a JavaScript runtime built on Chrome's V8 JavaScript engine\n- [Jest](https://jestjs.io/) - a delightful JavaScript Testing Framework with a focus on simplicity (unit and integration tests)\n- [Eslint](https://github.com/eslint/eslint) with [Eslint Google config](https://github.com/google/eslint-config-google) - code quality linter with the opinionated Google config\n- [Prettier](https://github.com/prettier/prettier) and [eslint config](https://github.com/prettier/eslint-config-prettier) - formatter linter with eslint integration\n- [Docker](https://www.docker.com/) - OS-level virtualization to deliver software in containers\n- [Docker compose](https://docs.docker.com/compose/) - use a YAML file to configure your application’s services\n\n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n### Installation\n\n1. Clone the repo\n   ```sh\n   git clone https://github.com/xandao-dev/voyager-rover.git\n   ```\n2. [Install Docker Engine](https://docs.docker.com/engine/install/)\n3. [Install Docker Compose](https://docs.docker.com/compose/install/)\n\n## Usage\n\n- Run the app\n  ```sh\n  docker compose run --rm voyager-rover\n  ```\n\n## Debug\n\n- Run the app in debug mode\n\n  ```sh\n  docker compose -f docker-compose.debug.yml run --rm voyager-rover\n  ```\n\n- Execute the debug config in VSCode\n\n## Roadmap\n\nSee the [open issues](https://github.com/xandao-dev/voyager-rover/issues) for a list of proposed features (and known issues).\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nVoyage Rover uses [Conventional Commits](www.conventionalcommits.org)!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See [LICENSE](./LICENSE.md) for more information.\n\nFree software =)\n\n## Contact\n\nAlexandre Calil - [Linkedin](https://www.linkedin.com/in/xandao-dev/) - [alexandre@xandao.dev](mailto:alexandre@xandao.dev)\n\nProject Link: [https://github.com/xandao-dev/voyager-rover](https://github.com/xandao-dev/voyager-rover)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxandao-dev%2Fvoyager-rover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxandao-dev%2Fvoyager-rover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxandao-dev%2Fvoyager-rover/lists"}