We appreciate your interest in contributing to KaibanJS! Here are a few guidelines to help you get started:
For a video walkthrough of the contribution process, please watch our contribution guide video:
Before you start contributing, you'll need to set up your development environment. Follow these steps:
-
Prerequisites: Ensure you have Node.js (version 14 or later) and npm installed on your system.
-
Clone the Repository: After forking, clone your fork of the KaibanJS repository:
git clone https://github.com/kaiban-ai/KaibanJS.git cd KaibanJS
-
Install Main Dependencies: In the root directory, run:
npm install
-
Install Playground Dependencies: Navigate to the playground/react folder and install its dependencies:
cd playground/react npm install cd ../..
-
Set Up Environment Variables: In the playground/react directory, create a
.env.local
file and add the necessary API keys for the examples you plan to run:cd playground/react touch .env.local
VITE_OPENAI_API_KEY=your_openai_api_key_here VITE_ANTHROPIC_API_KEY=your_anthropic_api_key_here VITE_GOOGLE_API_KEY=your_google_api_key_here VITE_MISTRAL_API_KEY=your_mistral_api_key_here
Going back to the root directory, run:
cd ../..
Note: You only need to add the API keys for the services you'll be using in your examples.
-
Compile the Library: In the root directory, run:
npm run dev
-
Launch Storybook Playground: Open another terminal window To open the Storybook playground, run:
npm run play:sb
This will start a local server and open your browser to the Storybook playground.
Now you're ready to start developing!
-
Explore Issues: Start by looking through the issues on GitHub. Pick an issue that interests you, or submit a new one if you have a new idea or have found a bug.
-
Branch Creation: Create a new branch in your local repository for your work.
-
Development: Make your changes in the newly created branch. You can use the Storybook playground to test your changes:
- Create new stories in the
playground/react/src/stories
directory to test your use cases. - Refer to existing stories for examples of how to structure your new stories.
- Create new stories in the
-
Write Tests: Ensure that all tests pass when you run
npm test
. Add new tests for new functionality if necessary. -
Document Your Changes: Update the documentation to reflect any changes you've made. The documentation repository is located is here
-
Commit Messages: Write clear and concise commit messages, describing what has changed and why.
-
Pull Request: Push your changes to your fork and submit a pull request to the main KaibanJS repository.
-
Code Review: Wait for the code review process and make any requested changes.
-
Stay Updated: Keep your pull request updated with the main branch.
We're committed to providing a welcoming and inspiring community for all. Everyone participating in the KaibanJS project—including the codebase and issue tracker—is expected to follow our community guidelines:
- Be respectful of different viewpoints and experiences.
- Gracefully accept constructive criticism.
- Focus on what is best for the community and the project.
- Show empathy towards other community members.
If you have any questions, please don't hesitate to ask them in our Discord channel. We're more than happy to help guide you through the process.