Skip to content

0. Getting Started

Nick Holbrook edited this page Apr 21, 2021 · 27 revisions

Front End

Running Locally

After cloning this repository, navigate to the /AR-frontend/ subdirectory and run pod install to install the CocoaPods packages. To open the Xcode project, go to /ARmaps/Ar-frontend/ and double-click the ARmap.xcworkspace. Select the ARmap project in the sidebar, in the middle pane select Signing & Capabilities, and select a team to use when building and running the app. In the upper-left corner of the window, select a device to run the project on and click the run button to build and run the project on the device you selected.

Third-Party Dependencies (CocoaPods packages)

To setup the CocoaPods packages from scratch, follow these installation instructions for each dependency our app relies on:


Back End (Developing Locally)

  1. Clone the GitHub repository to the machine that you wish to run the server on

  2. Open up a new bash terminal with backend-api as the current directory (cd ARmaps/backend-api)

  3. Initialize a python virtual environment (python3 -m venv env)

  4. Activate your python virtual environment (source env/bin/activate)

  5. Download and install the latest version of python3 and pip

  6. Install the necessary dependencies (pip install -r requirements.txt)

  7. Download and install Docker Desktop. To install follow the link and download the installed. Once downloaded follow the system prompts to complete the install process.

  8. After Docker is running, either run locally or deploy server

Running Locally

First, make sure Docker is installed and running, as explained above. Next, navigate to the backend-api directory of the cloned repo. Then, assuming the above steps have been followed, run make local-start. This will start a local Postgres Database on localhost:5432, an Adminer console on localhost:5000 to manage the database, and the ARmaps api on localhost:8080.

Once changes are made to the code that you want to test, run make local-start to update and restart the API locally.

If you want to stop all locally running instances, run make local-clean.

Server Deployment

The server is currently hosted at https://api.armaps.net/

Our backend is managed via terraform. To install terraform, go to https://www.terraform.io/downloads.html and find the install link for your system. Install Terraform by unzipping the file and moving it to a directory included in your system's PATH.

Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied. For more informations look here https://www.terraform.io/intro/index.html.

To deploy new changes, from the terraform directory, first run make init. This initializes a new terraform workspace on your computer. Then you can run make plan, which compares the actual resources in AWS to your local state and notifies you of what changes you would be making if you run make apply. Running make apply provisions / deletes all of the resources notified in the plan stage.

Our backend is hosted on AWS utilizing a variety of services. For more information on the services we utilize, see the following links:

Third-Party Dependencies (python packages)

  • Flask==1.1.2
  • pathlib==1.0.1
  • psycopg2-binary==2.8.6
  • geopy==1.23.0
  • dijkstra==0.2.1
Clone this wiki locally