Skip to main content

Setup

If you have a Windows operating system, complete these steps before continuing.
It is a bit of a nightmare to get the Windows environment set up.We’ve found the fastest workaround to be installing the Windows Subsystem for Linux (WSL). For more details, see this article.

Step 1: Open PowerShell or Windows Command Prompt

You must do this in administrator mode by right-clicking and selecting “Run as administrator”.

Step 2: Installing WSL

Run the following command:
powershell
wsl --install

Step 3: Open Ubuntu

Open the Start Menu, search for Ubuntu (or the name of the Linux distribution you installed), and click on the app to open it.When you launch Ubuntu for the first time, it will take a few minutes to set up, and you may be prompted to create a new username and password for your Linux environment.

Step 1: Install Homebrew

The easiest way to install the required dependencies is to use Homebrew. Run the following command in your terminal:
bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2: Install required tools

Yarn, our package manager:
bash
brew install yarn
MongoDB, for our databases:
bash
brew tap mongodb/brew
brew update
brew install mongodb-community@8.2
Then run MongoDB as a service. If you’re on MacOS:
zsh
brew services start mongodb-community@8.2
If you’re on Windows running WSL:
bash
sudo systemctl start mongod
We use VSCode for development. Download it and get the following extensions:

Step 3: Clone the repositories.

We use GitHub for version control. You will need to have GitHub Personal Access Tokens set up.
  1. Run git config --global credential.helper store
  2. Create a Personal Access Token - either fine-grained or classic is fine
  3. Next time you run a git command in terminal it will ask for credentials
bash
git clone https://github.com/HoagieClub/mail.git
git clone https://github.com/HoagieClub/api.git
git clone https://github.com/HoagieClub/stuff.git
NOTE: Environment variables are not included in cloned repositories.

Step 4: Environment variables

After you have the repository on your local device, you’ll need to add the environment variables. Switch into the preview branch:
bash
git switch preview
For all three repositories, rename the .env.local.txt file to .env.local. For mail and stuff, copy over the environment variables from Slack.

Step 5: Download dependencies

You will need to download the required dependencies before you can run the apps. From the api repository, run:
bash
go get
From the mail and stuff repositories, run:
bash
yarn

Step 6: Run the apps

You will need to run the frontend and backend simultaneously.

Backend

The backend is written in Go. Run main.go from the api repository.
bash
go run main.go reset
It might take a second to start up. Once it displays [i] Running on https://localhost:8080, you’re all set.

Frontend

From either the stuff or mail repository, run:
bash
yarn dev
Open the localhost link in your browser.
You’re all set! Happy coding. Be sure to check out the Development Workflow guide!
I