Thank you for your interest in contributing to the dApp SDK! We appreciate the efforts of our community members and welcome contributions to improve and enhance the SDK. This document outlines the contribution process and provides guidelines for making your contributions as smooth as possible.
If you're contributing to this repo, you are a Development Partner. i.e. You are from a projects that want to build open-source features and implementation for kits provided by dApp-sdk.
By participating in this project, you agree to abide by our Code of Conduct. Please ensure that your contributions and interactions with the community follow the guidelines outlined in the Code of Conduct.
-
Fork the repository: To start contributing, fork the dApp SDK repository to your org's GitHub account.
-
Clone your fork: Clone your fork to your local machine:
git clone https://github.com/<your-org>/dapp-sdk.git
- Create a new branch: Create a new branch for your feature or bugfix:
git checkout -b my-feature-branch
Implement your feature or bugfix, ensuring that you follow the following coding standards and best practices.
-
Create a new directory under
packages
with the name of implementation package. This will be a concatenation of "kit name" and the "provider". Ex: If you are a provider for "Messaging" kit, and your org name is "CoolOrg", then the implementation package name ismessaging-coolorg
. If you're building for a ui kit, then package name will bemessaging-ui-coolorg
. -
Inside this directory, create the directories
src
to contain all source code andtest
to contain all test cases. -
Your
package.json
should have following properties in the defined fashionname
:@dapp-sdk/IMPLEMENTATION_PACKAGE
, whereIMPLEMENTATION_PACKAGE
is the package name as defined above.author
: Name of your Team or Organizationlicense
:MIT
main
:dist/messaging-coolorg/src/index.js
. Update this as per your code.types
:dist/messaging-coolorg/src/index.d.ts
. Update this as per your code.keywords
: A set of keywords describing. We will add keywordsmeroku
,dApp-sdk
to any keywords you already have."publishConfig": {"access": "public"}
To enable publishing of this package. You should do this only after the feature is ready.- You need to specify the
"repository"
property with the specification described below. - At a minimum following scripts are needed
build
- To build the project.test
- To test the project
-
A
README
file that explains a high level usage and details of the package.
An example config is below
"keywords": [
"meroku",
"dapp-sdk"
],
"scripts": {
"build": "tsc",
"test": "mocha"
},
"publishConfig": {"access": "public"},
"repository": {
"type": "git",
"url": "git+https://github.com/merokudao/dApp-sdk.git"
},
"homepage": "https://github.com/merokudao/dApp-sdk.git#readme",
"bugs": {
"url": "https://github.com/merokudao/dApp-sdk.git/issues"
},
"files": [
"dist/**/*"
]
-
Your
tsconfig.json
should be able properly build the package. Take a look at the existing tsconfig.json for ui package and tsconfig.json for package for examples. -
Commit your changes: Commit your changes to the new branch:
git add .
git commit -m "Add my feature"
- Keep your fork up-to-date: Sync your fork with the upstream repository to ensure your changes can be easily merged:
git remote add upstream https://github.com/merokudao/dapp-sdk.git
git fetch upstream
git merge upstream/main
- Push your changes: Push your changes to your fork:
git push origin my-feature-branch
- Ensure that your pull request includes a clear and detailed description of the changes you have made.
- If your pull request addresses an existing issue, please reference the issue number in your description.
- Add relevant labels to your pull request, such as feature, bugfix, documentation, etc.
- Make sure your code follows the project's coding standards and best practices.
- Include tests for your changes, if applicable.
- Update the documentation as necessary.
- Github Actions will run and ensure that builds are happening & tests are running
- If they fail, it's your responsibility to fix them. Let us know if anything is required to be done from our side.
- A member of the
merokudao
org will review the code, and provide feedback. - If everything is okay, this will be merged with the main branch
- When your changes land in
main
, a github action workflow will publish them on npmjs. There are no manual steps required for this.