Clone this repo with
cd
to your preferred directoryRun
git clone https://github.com/dsc-project-mr/mr-external-fe.git
if you are using Git HTTPS i.e., Cloning from CLI of your choice.
Ensure you have these installed. I included the version I am currently using but whichever version you are using if it works it should be fine:
- Yarn - Installation Details (I am using v1.22.19)
- NodeJs - Installation Details (I am using v18.10.0)
We will be using yarn instead of npm.
Remember to
yarn install
in the directory to download and install all the dependencies.
Install these extensions (at least for VSCode):
- Prettier
- ESLint
- GitLens
Running the Frontend locally
yarn dev
Open http://localhost:3000 with your browser to see the result.
-
From discussions with business team, we will write up our own issues depending on the features/bugs that business side or our side requires. Choose the corresponding issue template. If you would like to or are assigned to an issue, change assingee to yourself.
-
Add domain label: User, Donation, Content
-
Add to the project: mr-fe-external
We will use the Feature Branch Workflow for our development.
TLDR: The core idea behind the Feature Branch Workflow is that all feature development should take place in a dedicated branch instead of the main branch. This encapsulation makes it easy for multiple developers to work on a particular feature without disturbing the main codebase.
After changing the assignee to yourself, to create a new branch for an issue, go to the issue and click Create a new branch
. The branch will automatically be created for you in the format issueNum-issue-title
We are using Husky for pre-commit hooks. Whenever you run git commit
, the pre-commit hooks will run and raise errors with the files you have changed if any. Try to fix as many of the errors as possible. If there are rules that were enforced that you think can be relaxed, do let me know so that we can relax the rules since I am also just using preconfigured rules.
If you feel that the remaining errors are negligable, you can do git commit --no-verify
to bypass them.
We will follow conventional commits for our commit messages.
<type>: <description>
Type | Overview |
---|---|
fix | patches a bug in your codebase |
feat | introduces a new feature to the codebase |
style | style changes |
refactor | refactor code |
chore | Other changes that don't modify src or test files |
Create a pull request with your new branch to trigger auto preview deployment to vercel. Follow the template when creating a new PR, you can always edit the description if you are not sure what to input yet.
Once you have tested both in your local and in vercel, add the Reviewable
label to your PR and add me as your reviewer.
// TODO: discuss whether to have peer code review as well
Once reviewed, reviewers will add the Code Review Done
label and you can merge you branch to main!
The project is deployed using Vercel which will automatically deploy a preview of your branch whenever you push to a branch with an open pull request.