Skip to content

Latest commit

 

History

History
157 lines (107 loc) · 4.37 KB

CONTRIBUTING.md

File metadata and controls

157 lines (107 loc) · 4.37 KB

Contributing to FutúSho Web

Lint Tests Spell Docker Build

Getting Started

  • Before starting your work, ensure an issue exist for it. If not feel free to create one.

  • You can also take a look into the issues tagged Good First Issue and Help Wanted.

  • Add a comment on the issue and wait for the issue to be assigned before you start working on it. This helps to avoid multiple people working on similar issues.

  • If the solution is complex, propose the solution on the issue and wait for one of the core contributors to approve before going into the implementation. This helps in shorter turn around times in merging PRs.

  • For new feature requests, provide a convincing reason to add this feature. Real-life business use-cases will be super helpful.

  • Feel free to join our Discord Community, if you need further discussions with the core team.

Workflow for Pull Requests

  • In order to contribute, please fork off of the master branch and make your changes there. Your commit messages should detail why you made your change in addition to what you did (unless it is a tiny change).

  • If you need to pull in any changes from master after making your fork (for example, to resolve potential merge conflicts), please avoid using git merge and instead, git rebase your branch. This will help us review your change more easily.

  • Please make sure you respect the coding style for this project. Also, even though we do CI testing, please test your code and ensure that it builds locally before submitting a pull request.

  • Thank you for your help!

Requirements

  • Node.js v18 or higher
  • One of the supported browsers (Chrome, Opera, Firefox, Brave)
  • Installed and configured MetaMask Extension in your browser
  • Some amount of test tokens in your wallet to execute transactions on blockchain
  • Text editor or IDE with installed EditorConfig extension

For Windows users

We highly recommend to install EditorConfig extension to your editor to have consistent settings with our codebase.

Please make sure that you've valid settings for Git:

git config --global core.autocrlf

If the result is true, you need to change it to false:

git config --global core.autocrlf false

Developing locally with a remote blockchain network

Please follow instructions below to install frontend locally.

  1. Fork this repository to your own GitHub account

  2. Clone it to your local device

  3. Create a new branch:

    git checkout -b YOUR_BRANCH_NAME
  4. Install the dependencies and pre-commit hook with:

    make setup
  5. Copy the environment variables:

    cp .env.example .env
  6. Run the development database:

    make db-start
  7. Apply the database migrations:

    make db-migrate
  8. Seed your development database (./prisma/seed.ts):

    make db-seed
  9. Run the web server:

    make run

The last command will start the web server on http://localhost:3000/.

Linting

To check the formatting of your code:

make lint

If you get errors, you can fix them with:

npm run lint-fix

Running a test suite

  1. Run the test database:

    make test-db-start
  2. Run the test suite:

    make test