Skip to content

Latest commit

 

History

History
162 lines (111 loc) · 4.25 KB

CONTRIBUTING.md

File metadata and controls

162 lines (111 loc) · 4.25 KB

Contributing to The Web Exploration Engine

Resource Link
1. Installation Setting up the project for the first time
2. Deploy Locally Local deployment
3. Coding Standards GitFlow and branch naming strategies to follow

1. First Time Installation

Prerequisites :

  1. Docker
  2. Nodejs and npm

Clone the repo

git clone https://github.com/COS301-SE-2024/Web-Exploration-Engine.git

Go to the root directory

cd Web-Exploration-Engine

Install Nx globally

npm add --global nx@latest
cd wee
npm install

Install the missing packages

npm install -g --save-dev jest @types/jest ts-jest

2. Deploy Locally

Run docker container

For local development (you need the redis docker container running BEFORE starting up the webscraper and frontend app - otherwise the backend won't work):

docker pull redis
docker run -d -p 6379:6379 --name myRedisContainer redis redis-server --requirepass <ADD YOUR REDIS PASSWORD HERE>

To re-run container :

docker start myRedisContainer

Redis Notes: View keys currently in cache:

keys *

Get object stored to the corresponding key:

get key_name

Remove everything in cache:

flushall

Example: In your cmd prompt: image

Now go to docker - it should look like follows after starting up the redis container: image

Go to the 'Exec' tab in the docker container (this is where all the redis command will be executed so that you can see what is going on in the cache): image image

image

Deploy the webscraper

npx nx serve webscraper

Deploy the api service

npx nx serve api-service

Deploy the frontend application

npx nx dev frontend

3. GitFlow and Git Standards

Branches

1. Master

The source code within the master branch should always reflect a production-ready state.

2. Development

The development branch serves as the ‘central hub’ for adding new features, running experiments, and reviewing or refactoring the source code.

3. Feature

Feature branches may branch off from development and must merge back into development.

4. Hotfix

Hotfix branches branch off from master and must merge into master and development, used to fix bugs in the production environment.

5. Documentation

This branch will be used to update the documentation pertaining to the project.

6. Config

include changes to the ci/cd pipeline, changing linter settings, any changes to packages, etc

Git Branch Naming Conventions

All branches will follow the conventions listed below:

  • Descriptive
    • The name should be concise, written in lowercase and be descriptive, clearly reflecting what work will be done in the branch.
    • e.g.)
      • feature/new-login
      • backend/python
      • hotfix/cycle-detection-edge-cases
      • feature/new-login
      • config/prettier
  • Alphanumeric Characters
  • No Continuous Hyphens

For a full specificiation on our coding standards, you may look at Tech Odyssey Coding Standards