Thank you for your interest in contributing to YieldSafe Frontend. This guide explains, step by step, how to contribute successfully to this project even if this is your first time contributing to an open-source repository on GitHub.
This repository is built with Next.js and uses npm as its package manager.
Before any Pull Request (PR) can be reviewed and merged, it must pass the repository's automated GitHub CI checks:
npm run lintnpm run build
That means contributors are expected to test their changes locally before submitting.
The contribution process has two parts:
- One-Time Setup → Done only once when preparing your machine.
- Contribution Workflow → Done every single time you want to work on a new task.
Make sure the following are installed on your computer:
- Git → used for version control
- Node.js v20 or later
- npm → comes with Node.js
- A Code Editor such as VS Code
- A GitHub account
You can confirm installation by running:
git --version
node -v
npm -vBecause you do not have direct write access to the main organization repository, you must create your own copy.
- Go to the project repository:
https://github.com/YieldSafe/ys-frontend - Click the Fork button at the top-right corner.
- GitHub will create a copy under your own GitHub account.
Example:
https://github.com/YOUR-USERNAME/ys-frontendOpen your terminal and run:
git clone https://github.com/YOUR-USERNAME/ys-frontend.gitThen move into the project folder:
cd ys-frontendThis helps you pull future updates from the official YieldSafe repository.
Run:
git remote add upstream https://github.com/YieldSafe/ys-frontend.gitConfirm remotes:
git remote -vYou should see:
origin→ your forkupstream→ official YieldSafe repository
Run:
npm installThis installs all required project packages.
Run:
npm run devThis allows you preview the application locally while working.
You are now fully set up.
Everything above is usually done only once.
Whenever you are assigned a new issue/task, follow this exact workflow.
First switch to the develop branch:
git checkout developPull the latest changes from the official repository:
git pull upstream developThis prevents you from working on outdated code.
Never work directly on main or develop.
Create a new branch named after your task:
git checkout -b feature/your-task-nameExamples:
git checkout -b feature/navbar-ui
git checkout -b fix/login-validation
git checkout -b chore/footer-updateEach task must have its own separate branch.
Open the project in your code editor and make the requested changes.
As you work:
- save your files
- check the browser regularly
- confirm the feature behaves correctly
Before committing anything, you must run the same checks GitHub Actions will run.
npm run lintThis checks for code style errors and warnings.
npm run buildThis confirms the app builds successfully.
If any of these commands fail, your Pull Request will likely fail CI and will not be merged until fixed.
Do not skip this step.
After confirming everything works:
git add .This prepares all modified files for commit.
Write a clear commit message describing what you changed.
git commit -m "feat: implemented navbar responsiveness"Other examples:
git commit -m "fix: corrected login form validation"
git commit -m "chore: updated footer links"Use short and meaningful messages.
Run:
git push origin feature/your-task-nameThis uploads your work to your GitHub fork.
-
Go to your fork on GitHub.
-
GitHub will show a Compare & Pull Request button.
-
Click it.
-
Ensure:
- base repository =
YieldSafe/ys-frontend - base branch =
develop - compare branch = your feature branch
- base repository =
-
Add a PR title that clearly describes your task.
Example:
feat: completed navbar responsiveness task- In the PR description, explain briefly what was done.
Then submit the Pull Request.
Once the PR is opened, GitHub automatically runs:
- Lint Check
- Build Check
Your PR must show all checks as passing before maintainers can review and merge.
If checks fail:
- read the error message
- fix the issue locally
- commit again
- push again
The PR updates automatically.
Sometimes maintainers may request:
- UI adjustments
- code cleanup
- bug fixes
- naming changes
Simply make the corrections on the same branch, then run:
git add .
git commit -m "fix: addressed review comments"
git push origin feature/your-task-nameYour PR updates automatically.
Once your PR is merged:
Switch back to develop:
git checkout developPull latest updates:
git pull upstream developThen start a fresh branch for your next assigned contribution.
- Do not work directly on
main - Do not work directly on
develop - Always create a new branch per task
- Always run
npm run lint - Always run
npm run build - Always submit PRs into
develop - Do not submit multiple unrelated tasks in one PR
- Ensure your code is tested before pushing
git clone https://github.com/YOUR-USERNAME/ys-frontend.git
cd ys-frontend
git remote add upstream https://github.com/YieldSafe/ys-frontend.git
npm install
npm run devgit checkout develop
git pull upstream develop
git checkout -b feature/your-task-name
# work on your task
npm run lint
npm run build
git add .
git commit -m "feat: describe your work"
git push origin feature/your-task-nameIf you get stuck at any point:
- ask questions in the contributor group chat
- share screenshots of errors if possible
- do not guess when Git shows errors you do not understand
It is completely normal to ask for clarification during your first few contributions.
Happy Contributing