Thank you for your interest in contributing to SuperDoc! We're excited to have you join our community. This document provides guidelines and information about contributing to the project.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Release Process
- Style Guidelines
- Community
This project and everyone participating in it are governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to support@harbourshare.com.
Before creating bug reports, please check existing issues as you might find that the issue has already been reported. When creating a bug report, include as many details as possible:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Screenshots if applicable
- Your environment (browser, OS, SuperDoc version)
- Code samples demonstrating the issue
- Any relevant error messages
Feature suggestions are tracked as GitHub issues. When creating a feature suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the proposed feature
- Explain why this feature would be useful
- Include mockups or examples if applicable
Documentation is crucial for our project. You can help by:
- Fixing typos and grammar
- Adding code examples
- Improving explanations
- Adding new sections
- Translating documentation
- Bug fixes: Resolve existing issues
- Features: Implement new functionality
- Performance improvements: Optimize existing code
- Tests: Add or improve test coverage
- Framework integrations: Create examples for different frameworks
- Documentation: Improve SuperDoc documentation
-
Fork and Clone:
git clone https://github.com/Harbour-Enterprises/SuperDoc.git cd SuperDoc -
Install Dependencies:
npm install
-
Set Up Development Environment:
npm run dev
-
Run Tests:
npm test
-
Branch Naming:
feature/descriptionfor new featuresfix/descriptionfor bug fixesdocs/descriptionfor documentation changesperf/descriptionfor performance improvements
-
Commit Messages:
Follow Conventional Commits:
feat: add real-time cursor sharing - Implement cursor position tracking - Add websocket connection for updates - Include user identification Closes #123 -
Automated Checks:
When you open a PR, the following checks run automatically:
- Commit message validation
- Code formatting (Prettier)
- Linting (ESLint)
- Unit tests
- Visual regression tests (if UI changes)
- E2E tests (for PRs to main)
-
Before Submitting:
- Update documentation if needed
- Add or update tests
- Run the test suite locally
- Ensure all CI checks pass
-
Pull Request Description:
- Describe the changes
- Link to related issues
- Include screenshots for UI changes
- List any breaking changes
- Mention dependencies added/removed
SuperDoc uses a fully automated CI/CD pipeline with semantic-release. No manual version bumps are needed.
mainbranch → Pre-release versions (@nexttag on npm)stablebranch → Stable versions (@latesttag on npm)X.xbranches → Maintenance versions (@X.xtags on npm)
Your commit messages automatically determine version changes:
| Commit Type | Version Bump | Example | Result |
|---|---|---|---|
fix: |
Patch (0.0.X) | fix: resolve cursor positioning bug |
1.2.3 → 1.2.4 |
feat: |
Minor (0.X.0) | feat: add PDF export functionality |
1.2.3 → 1.3.0 |
feat!: or BREAKING CHANGE: |
Major (X.0.0) | feat!: redesign document API |
1.2.3 → 2.0.0 |
chore:, docs:, style:, refactor:, test: |
No version change | docs: update README |
1.2.3 → 1.2.3 |
# Feature with scope
feat(editor): add table support
# Bug fix with detailed description
fix: resolve memory leak in collaboration module
- Clear event listeners on disconnect
- Add cleanup in useEffect
- Fix WebSocket connection disposal
Fixes #456
# Breaking change (two ways)
feat!: change document format to support annotations
# Or with footer
feat: redesign plugin API
BREAKING CHANGE: Plugins must now export a default function-
Pre-release from main:
- Every merge to
maintriggers tests - If tests pass, publishes
X.Y.Z-next.Nto npm - Example:
1.0.0-next.1,1.0.0-next.2
- Every merge to
-
Stable release (promoting from main):
- Use GitHub Actions "Promote to Stable" workflow
- Merges main to stable branch
- Publishes stable version (e.g.,
1.0.0) - Automatically syncs back to main
-
Hotfix to current stable:
- Create fix branch from
stable - Push fix commits
- Merge PR → publishes patch version
- Auto-syncs to main
- Create fix branch from
-
Patch old versions:
- Use "Create Patch Branch" workflow
- Input version (e.g.,
1.0) - Creates
1.0.xbranch - Apply fixes → publishes
1.0.1,1.0.2, etc.
Preview what will be released:
npx semantic-release --dry-run --no-ciFor comprehensive information about our CI/CD workflows, automated testing, and release pipelines, see cicd.md.
- Use JavaScript for all new code
- Follow the existing code style (enforced by ESLint)
- Use ES6+ features when appropriate
- Document public APIs using JSDoc
- Maximum line length of 100 characters
- Use meaningful variable names
# Check formatting
npm run format:check
# Auto-fix formatting
npm run format
# Run linting
npm run lint
# Fix linting issues
npm run lint:fix- Use JSDoc for all public APIs
- Include code examples when relevant
- Keep explanations clear and concise
- Use proper Markdown formatting
- Write tests for new features
- Update tests for bug fixes
- Aim for high coverage of critical paths
- Include both unit and integration tests
- Test edge cases and error conditions
- Join our Discord server for discussions
- Participate in GitHub Discussions
- Follow development updates on our roadmap
We recognize contributions in several ways:
- Featured in our contributors page
- Mentioned in release notes
- Community contributor badge in Discord
- Opportunities to join the core team
If you have questions, feel free to:
- Start a GitHub Discussion
- Join our Discord server
- Email us at support@harbourshare.com
Thank you for contributing to SuperDoc! Your efforts help make document editing on the web better for everyone.