Skip to content

AUBGTheHUB/monolith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@AUBGTheHUB's Monolith

Python API Tests

Notify Discord - New Issue

Notify Discord - New PR

> How to set up the project

Prerequisites

To understand why we need the following, read more about Dev Containers.

For WSL users


Run the following commands in PowerShell admin mode.

  • Check the version of your WSL.
wsl -l -v
  • If you don't have WSL version 2. Run:
wsl --set-version <distro name> 2

Change the to match the one that you are running. You could see your distro name from the result of the previous command.

  • After your WSL version is updated set it as default by running:
wsl --set-default-version 2
  • Set the chosen distro as default
wsl --set-default <distro name>
  • Close WSL and reopen it

After running the above commands. Close PowerShell.

  • Open Docker Desktop
  • Navigate to Settings
  • From the General tab, select Use WSL 2 based engine

You should be all set πŸŽ‰


1. Add your SSH key to the ssh-agent and GitHub

Here is the guide:

2. Clone the repository to your machine

git clone git@github.com:AUBGTheHUB/monolith.git

3. Navigate to the project directory

cd monolith

Extra Step: For WSL users

In order to make sure that your WSL SSH keys are forwarded to the DEV Container you should run the following script:

bash wsl_ssh_forwarding.sh

Learn More about how this is done


4. Open your project in Visual Studio code. Run:

code .

5. Navigate to Visual Studio Code and perform:

  • command + shift + P (Mac) or ctrl + shift + P (Windows) to open the command palette
  • In the command palette write and select:
>Dev Containers: Reopen in Container

After this step you should wait until the container is built. It will install all the dependencies needed for development on its own.

6. Check if Dev Container is running successfully

If your Dev Container is running successfully you should be able to see the following in the bottom-right of your Visual Studio Code client.


HOW TO RUN THE PROJECT:

Run the following command after navigating to the project root directory

make gum

Spin up local server instances:

Directory structure

.
└── services
    β”œβ”€β”€ py-api
    β”œβ”€β”€ questionnaire
    β”œβ”€β”€ react-email-starter
    β”œβ”€β”€ url_shortener
    └── web


How to work on a feature and open a Pull Request?

  1. Choose an issue you want to work on (e.g. #11 - Optimizations)
  2. Create a new branch by running the following command:
git checkout -b "11-specific-optimizations"
  1. When commiting, place the issue number at the beginning of the commit message
git add .                               # be careful if something important is not gitignored
git commit -m "#11 Added a new feature"
  1. Push your updates to the remote branch
git push --set-upstream origin 11-Optimizations
  1. Contribute 😎 (Open a Pull Request towards the main branch)
  • Reference the issue in the title
  • Write a brief discription of what you have worked on

Important:

  • If you encounter any issues setting up the project, ping the team in Discord or Messenger
  • If you are stuck and you need help, ping the dev group chat in facebook 🀼
  • Do not forget to crack open a cold one 🍻 with your fellow colleagues after spending countless hours debugging rendering issues 😁

Possible problems:

MONGO DNS issue:

make run-api
cd ./packages/api/ && go run main.go
2022/10/03 01:57:24 error parsing uri: lookup thehubwebsite.h9aqj.mongodb.net on 192.168.68.1:53: cannot unmarshal DNS message
exit status 1
make: *** [Makefile:11: run-api] Error 1

--> resolve by doing this

Tips & Tricks:

  • If you suspend either the react app job or the api job by mistake and cannot kill the job for some reason, use this to unbind the port lsof -ti:PortNumberGoesHere | xargs kill -9

CODEOWNERS: NOSYNCDEV

After you are done working on a feature, you may add yourself to the CODEOWNERS file.