Contributing to Voiden SDK
February 22, 2026 ยท View on GitHub
Thank you for your interest in contributing to the Voiden SDK! This document provides guidelines and instructions for contributing.
Table of Contents
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Guidelines
- Reporting Bugs
- Suggesting Enhancements
Code of Conduct
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/sdk.git - Add upstream remote:
git remote add upstream https://github.com/VoidenHQ/sdk.git - Create a new branch:
git checkout -b feature/your-feature-name
Development Setup
Prerequisites
- Node.js 20.x or higher
- npm or yarn
- TypeScript knowledge
Installation
# Install dependencies
npm install
# Build the project
npm run build
# Watch mode for development
npm run dev
# Run type checking
npm run typecheck
Note: This project commits package-lock.json for reproducible builds. Always use npm install (not npm update) unless you're intentionally updating dependencies.
How to Contribute
Types of Contributions
We welcome various types of contributions:
- Bug fixes - Fix issues in existing code
- New features - Add new extension APIs or capabilities
- Documentation - Improve README, add examples, write guides
- Examples - Create example extensions demonstrating SDK features
- Tests - Add or improve test coverage
Before You Start
- Check if an issue already exists for what you want to work on
- For major changes, open an issue first to discuss your proposal
- For bug fixes, search existing issues or create a new one
- Comment on the issue to let others know you're working on it
Pull Request Process
-
Update your fork with the latest changes from upstream:
git fetch upstream git rebase upstream/main -
Make your changes following the coding guidelines below
-
Test your changes:
npm run build npm run typecheck -
Commit your changes with clear, descriptive commit messages:
git commit -m "feat: add new API for custom panels"Follow Conventional Commits format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changeschore:- Maintenance tasksrefactor:- Code refactoringtest:- Adding or updating tests
-
Push to your fork:
git push origin feature/your-feature-name -
Create a Pull Request from your fork to the main repository
-
Address review feedback - Be responsive to comments and requested changes
Pull Request Guidelines
- Keep PRs focused on a single feature or bug fix
- Include a clear description of what the PR does
- Reference any related issues (e.g., "Fixes #123")
- Update documentation if you're changing APIs
- Add examples if introducing new features
- Ensure all checks pass before requesting review
Coding Guidelines
TypeScript Style
- Use TypeScript strict mode
- Provide explicit type annotations for public APIs
- Use interfaces for public types
- Document all public APIs with JSDoc comments
- Prefer
constoverlet, avoidvar - Use meaningful variable and function names
Code Organization
- Keep files focused on a single responsibility
- Export only what's necessary for the public API
- Group related functionality together
- Maintain consistent file structure
Documentation
- Add JSDoc comments to all public classes, methods, and types
- Include
@exampletags showing usage - Document parameters with
@paramand return values with@returns - Keep comments up-to-date when changing code
Example
/**
* Registers a custom block in the editor
*
* @param block - The block definition
* @example
* ```ts
* this.registerBlock({
* name: 'my-block',
* label: 'My Block',
* node: MyBlockNode,
* });
* ```
*/
registerBlock(block: BlockDefinition): void {
// Implementation
}
Reporting Bugs
When reporting bugs, include:
- Description - Clear description of the bug
- Steps to reproduce - Minimal steps to reproduce the issue
- Expected behavior - What you expected to happen
- Actual behavior - What actually happened
- Environment - OS, Node.js version, SDK version
- Code sample - Minimal reproducible example
- Screenshots - If applicable
Use the bug report template when creating issues.
Suggesting Enhancements
For feature requests:
- Use case - Describe the problem you're trying to solve
- Proposed solution - Your suggested approach
- Alternatives - Other solutions you've considered
- Examples - Code examples showing how it would work
Continuous Integration
This project uses GitHub Actions for continuous integration and deployment:
CI Workflow
Every push to main and all pull requests trigger the CI workflow that:
- Runs on Node.js 20.x and 22.x
- Installs dependencies
- Runs type checking (
npm run typecheck) - Runs tests (
npm test) - Builds the project (
npm run build)
All checks must pass before a PR can be merged.
Publishing Workflow
When a new release is published on GitHub:
- The publish workflow automatically triggers
- Runs all CI checks (tests, type check, build)
- Publishes the package to npm with provenance
Creating a Release
To publish a new version:
- Update the version in
package.jsonfollowing Semantic Versioning - Update
CHANGELOG.mdwith the new version and changes - Commit the changes:
git commit -m "chore: release v1.x.x" - Create a git tag:
git tag v1.x.x - Push with tags:
git push && git push --tags - Create a GitHub release from the tag
- The GitHub Action will automatically publish to npm
Note: Publishing uses npm Trusted Publishing (OIDC) โ no NPM_TOKEN secret is required. The publish job runs in the release GitHub Actions environment, which must be configured in the repository settings to match the npm Trusted Publisher configuration.
Questions?
If you have questions:
- Check existing GitHub Issues
- Read the documentation
- Open a new issue with the "question" label
License
By contributing, you agree that your contributions will be licensed under the MIT License.