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.
General Setup
Section titled “General Setup”-
All our Ground Station code is hosted in the
ground-stationrepository 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 SSHgit clone git@github.com:UWOrbital/ground-station.git -
Setup the pre-commit by running the following command in the repository’s root directory:
Terminal window pre-commit install -
Now you can follow either the Backend section for Backend setup or the Frontend for Frontend setup.
Backend Setup
Section titled “Backend Setup”-
Be sure to have python version 3.12 installed on your system.
-
Install a python build tool called
uv. Instructions can be found here. -
From the repository’s root run the following command to add all the necessary packages you need.
Terminal window uv sync -
(Highly Recommended) If you are working with the database, you should set up Postgres as well. The guide can be found in the section below this one called Database Setup.
-
Hopefully your database is now setup! To do a sanity check try running our test suite for the backend and see if some tests pass (some of them will fail, to get them working refer to Working with commands). Use the following commands from the root of the respository:
Terminal window # Activate venv (choose the proper way to activate based on dev environment)source .venv/bin/activate# Run Pytestuv run pytest -
To run the backend from the root repository, and initialize the database (make sure the venv is activated):
Terminal window fastapi dev backend/main.py -
Alternatively, if you have docker, run the docker scripts!
Terminal window docker-compose -f scripts/dev/docker-compose.yml up --build
Database Setup
Section titled “Database Setup”-
Open a terminal and run the following commands to install PostgreSQL (make sure you are in the root of the ground-station repository):
Terminal window sudo apt updatesudo apt install postgresql-16 -
Run
sudo -u postgres psql --versionto ensure PostgreSQL was installed properly. It should print that the major version is 16. -
Run the following commands to setup PostgreSQL for the ground station.
Terminal window # Connect to PostgreSQL CLI as the postgres superusersudo -u postgres psql# Replace your_username and your_password with your desired valuesCREATE USER your_username WITH PASSWORD 'your_password' SUPERUSER;CREATE DATABASE gs; -
Log out, then verify that you can log in to your newly created user and database:
Terminal window \q # Log out# Replace your_username with your actual usernamepsql -U your_username -d gs# You should be logged into the database\q # Log out again -
From the root directory, run the following commands to create a new
.envfile:Terminal window cp ./template.env ./.env -
Edit the
.envfile to add your login details for the database user you created in Step 3 in the quotes. In Linux/WSL, you can usevimornanoas the editor. -
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 directorysource ./.venv/bin/activatecd backendalembic upgrade head# Go back to the rootcd ..Your database should now be setup! Now you can revisit the Backend Setup section and do the remaining steps (Step 5 and 6)
Frontend Setup
Section titled “Frontend Setup”-
Install Nodejs on your systems using the instructions found here. It is recommended you choose the instructions for
LinuxormacOSusingnvm. -
Go to the website of your choice in the
frontend/directory: eitheraroormcc. Run the following command to install dependencies:Terminal window npm install -
To see a preview of the site you can run the following command to see a dev preview:
Terminal window npm run dev -
Alternatively, if you have docker, run the docker scripts!
Terminal window docker-compose -f scripts/dev/docker-compose.yml up --build
Contributing
Section titled “Contributing”Before you get coding and build some amazing skills make sure you understand the task workflow which you can find below!