Skip to content

Latest commit

 

History

History
85 lines (49 loc) · 3.75 KB

CONTRIBUTING.md

File metadata and controls

85 lines (49 loc) · 3.75 KB

Contributing

We appreciate any and all contributions. Before contributing, please read our code of conduct.

Chat

If you are here, you are likely part of the Kernel and you should join the #kernel-building-kernel Slack channel.

Submitting an issue

Feel free to submit an issue through the issue tracker.

Developing

Node: Check that Node is installed with version >= 16.8.0. You can check this with node -v.

Yarn: Make sure that Yarn 1 is installed with version >= 1.22.0.

Setup

Go to our staging site and create a new wallet. Use this staging wallet for local development, as your local environment will default to using the staging auth and storage services. It may feel weird at first, but it means you have less to set up and worry about.

Fork the repo to your GitHub account, check it out locally and run:

yarn install

Running an app

This repo uses workspaces to manage local dependencies. From the root of the repo, this is how you start the applications app:

yarn workspace @kernel/applications start

If you want to start the Kernel Explorer, run:

yarn workspace @kernel/explorer start

If you want to work on the Kernel Adventures application, run:

yarn workspace @kernel/projects start

(The name differs because "Adventures" is Kernel-specific nomenclature, and we'd like any community to be able to fork and use this software without having to figure out our terms. We chose agnostic names for each workspace, and then apply our own community-specific names within them).

Code organization

This is a monorepo, where each yarn workspace is kept in the customary packages folder.

Creating a new app

Look at packages/admin and copy the necessary config files. Consider contributing by adding a custom template to make this process easier.

Submitting a pull request

For non-trivial changes, please first seek a conversation to avoid any unnecessary work.

You'll want to fork this repo and submit a PR from your fork to this repo's main branch.

When you're ready to submit a PR:

  1. Run yarn lint from the root directory to see the linter errors (it can also be run per package from inside the package's directory). Run yarn format to auto-fix the errors where possible.
  2. Ensure your branch includes the latest commits from main.
  3. Write a PR title and description summarizing your changes.
  4. In your PR description, mention any Issues that your PR addresses.
  5. For changes visible in the frontend, include screenshots in your PR description.
  6. CI will run on your branch. It will need to be green before your PR can be merged.
  7. Get at least 1 PR review from another contributor. If changes are requested, make the requested changes in new commits and request a new review from the PR reviewer.
  8. When CI and PR reviews are green, your PR will be merged via "Squash and merge" which will trigger a deploy to staging.

Branch organization

All changes should be submitted against the main branch. The goal is to maintain a healthy tip of the branch with all tests passing and no breaking changes. Potentially breaking changes or experimental features should be behind a feature flag.

Running the server locally

The storage service currently needs to connect to a Google Cloud Storage bucket. Consider contributing by adding a version with a storage service backed by a local file system instead.

Running tests

TBD