/mars-rover

Primary LanguageTypeScriptMIT LicenseMIT

Build Status code style: prettier Codecov

Mars Rover

Simulation about how the Rovers can move through a grid after a sequence of orders were given to them.

Getting Started

  1. Clone this repository and cd to the newly create folder
> git clone https://github.com/byverdu/mars-rover.git
> cd mars-rover
  1. Change the scripts folder permissions so you can execute the scripts
> chmod +x scripts/*
  1. Run the setup.sh script
> ./scripts/setup.sh

Prerequisites

You must have installed Docker and NodeJs. You need to use a Unix-like operating system.

Installing

Docker must be running before you execute the install script

Execute the install script that will bootstrap the project and install all the needed dependencies on your system.

# lerna bootstrap && yarn tsc
> ./scripts/install.sh

Create the docker images and start the containers by running the following command

> docker-compose up --build

Once docker has finished, the API will be running on port 9000 and the UI on port 3000

Running the tests

Previous running the tests all the npm packages must have been installed

Run all the suites

# from the root project folder

> yarn test

Unit tests for the API

# from the root project folder

> cd packages/api
> yarn test:api

Unit tests for the UI

# from the root project folder

> cd packages/client
> yarn test:client

Built With

  • NodeJs - Javascript runtime environment
  • Typescript - Type superset of Javascript
  • Lerna - JavaScript projects manager
  • ExpressJs - The web framework used
  • Mongoose - Mongodb object modeling for nodeJs
  • React - JavaScript library for building user interfaces
  • SCSS - CSS pre-processor
  • Jest - Testing framework

Authors

  • Albert Vallverdu - Initial work - @Byverdu

License

This project is licensed under the MIT License - see the LICENSE.md file for details

TODO