Skip to content

Ground station setup

The following assumes that you have already read Initial Setup guide. You should be able to develop from any of the platforms mentioned: Linux, WSL or Mac.

  1. All our Ground Station code is hosted in the ground-station repository on our Github. So let’s clone that first. Run the following command in a directory of your choice to clone the repository:

    Terminal window
    # if you use https (common way of doing git)
    git clone https://github.com/UWOrbital/ground-station.git
    # or if you use SSH
    git clone git@github.com:UWOrbital/ground-station.git
  2. Setup the pre-commit by running the following command in the repository’s root directory:

    Terminal window
    pre-commit install
  3. Now you can follow either the Backend section for Backend setup or the Frontend for Frontend setup.

  1. Be sure to have python version 3.12 installed on your system.

  2. Install a python build tool called uv. Instructions can be found here.

  3. From the repository’s root run the following command to add all the necessary packages you need.

    Terminal window
    uv sync --extra dev
  4. (Highly Recommended) If you are working with the database, you should set it up as well. The guide can be found below in the Database Setup section.

  5. To run the backend, run the following from the repository root:

    Terminal window
    # Make sure the db container is running if it isn't already
    docker compose up -d postgres
    # Run the backend server
    uv run fastapi dev backend/main.py
    # Or if virtual environment is activated
    fastapi dev backend/main.py
  6. To run tests, use the following command:

    Terminal window
    uv run pytest
    # Or if virtual environment is activated
    pytest
  1. Install Docker and Docker Compose with the official installation guide

  2. Verify the installation by running the following commands in your terminal.

    Terminal window
    docker --version
    docker-compose --version
  3. Make sure you are added to the docker group:

    Terminal window
    sudo usermod -aG docker $USER
  4. Log out and log back in to apply the docker group changes.

  5. From the root directory, run the following commands to create a new .env file:

    Terminal window
    cp ./template.env .env
  6. Start the database by running the following command:

    Terminal window
    docker compose up postgres -d # Start the container in detached mode
  7. Check that the database is running properly:

    Terminal window
    docker ps # List all running containers and get the container ID (first column)
    docker logs <container_id> # View the logs of the database container: make sure there are no errors

    Replace <container_id> with the actual container ID from the output of docker ps, or use the container name in the NAME column.

  8. From the root directory, run the following command to initialize your database with the correct schema:

    Terminal window
    sudo apt install alembic
    # Make sure you are running the venv located in .venv in the root directory
    source .venv/bin/activate
    cd backend
    alembic upgrade head
    # Go back to the root
    cd ..

    Your database should now be setup! Now you can revisit the Backend Setup section and do the remaining steps (Step 5 and 6)

    If you ever want to stop the database, run the following:

    Terminal window
    # Stops all running containers related to this project
    docker compose down
    # Alternatively, if you need to keep other containers running, use:
    docker stop <container_id>
    # The container_id can be found using `docker ps`
  1. Install Nodejs on your systems using the instructions found here. It is recommended you choose the instructions for Linux or macOS using nvm.

  2. Go to the website of your choice in the frontend/ directory: either aro or mcc. Run the following command to install dependencies:

    Terminal window
    npm install
  3. To see a preview of the site you can run the following command to see a dev preview:

    Terminal window
    npm run dev
  4. Alternatively, if you have docker, run the docker scripts!

    Terminal window
    docker-compose up --build

Before you get coding and build some amazing skills make sure you understand the task workflow which you can find below!