Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Latest commit

 

History

History
79 lines (45 loc) · 3.82 KB

CONTRIBUTING.md

File metadata and controls

79 lines (45 loc) · 3.82 KB

Contributing to SMSWithoutborders

Thank you for supporting SMSWithoutBorders. Please follow the steps below to get started. This SMSWithoutBorders.com is built with React

Existing features can be found in FEATURES.md;

Project Structure

We use three main branches in our workflow: stable(main), dev and testing

  • The stable branch contains the code for the latest release version of the project
  • dev is the active development branch. All recent changes and contributions go here
  • testing is where we try out newly developed features in prepartion for a release.

In summary, we build, test then deploy

Getting started

Create a fork of the project

Switch to the dev branch

git checkout dev

You can confirm you are on the dev branch by running

git branch

Create the branch you will be working from

git checkout -b <your branch name here>

Style Guide

This project was bootstraped with Create React App which specifies environment variable naming conventions.

We use Redux for state management and as such RTK Query for data fetching and API Calls.

Files are grouped by type and placed in subfolders under src. Each subfolder contains an index file for barrel exports.

We follow the conventional commits specification for all commits. Please reference this guide when writting commit messages.

Adding features

Please create a new branch to work on a new feature. That way you can easily roll back if something goes wrong. Once complete open a pull request and we will be happy to review and merge your contribution.

New features are very welcome but should first be discussed with the team for guidance.

New pages, components and features can be created in their respective folders and linked accordingly. Helper functions can be defined under utils

All routes are defined in App.js and any new routes can be added there.

Testing

Some parts of the project are inter-connected. Whenever a component gets updated, it is good practice to test all other components related to it. Please see the testing guide

Testing protected pages

All pages in the dashboard area are protected and require certain parameters to access them. Testing these pages could be a bit challenging during development since it becomes combersome to keep filling in required information each time.

A nifty workaround is to comment out the redirection checks in the respective route guard component. This will give you full access to the page without the checks. Be sure to uncomment them before opening your PR though

Reporting Issues

New issues can be opened on Github. Please check to make sure it has not been reported before.

Fixing Issues

When writting commit messages for fixes, please reference the issue being solved by adding the issue number in the commit message like below. learn more

fix:  critical bug in example component, fixes #12