Thank you for your interest in contributing to Draftly! We welcome contributions from the community and are excited to have you on board.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Making Changes
- Submitting a Pull Request
- Coding Guidelines
- Reporting Issues
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone. Please be kind and constructive in all interactions.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/draftly.git cd draftly - Add the upstream remote:
git remote add upstream https://github.com/NeuroNexul/draftly.git
- Node.js >= 20
- Bun >= 1.3.5 (package manager)
bun installbun devThis starts the development server with hot reloading for both the web app and the draftly package.
bun run build# Lint all packages
bun run lint
# Format code with Prettier
bun run formatThis is a monorepo managed with Turborepo.
draftly/
├── apps/
│ └── web/ # Next.js web application (playground)
├── packages/
│ └── draftly/ # Core library (published to npm)
│ ├── src/
│ │ ├── editor/ # CodeMirror editor integration
│ │ ├── plugins/ # Built-in plugins
│ │ └── preview/ # Static HTML renderer
│ └── package.json
├── package.json # Root workspace config
├── turbo.json # Turborepo config
└── README.md
Use descriptive branch names:
feature/add-table-plugin– New featuresfix/image-rendering-bug– Bug fixesdocs/update-readme– Documentationrefactor/plugin-architecture– Code refactoring
Follow Conventional Commits:
feat: add table plugin support
fix: resolve image widget rendering issue
docs: update installation instructions
refactor: simplify plugin registration
chore: update dependencies
We use Changesets for versioning. If your change affects the public API or fixes a bug, add a changeset:
bun run changesetFollow the prompts to describe your changes. This creates a file in .changeset/ that will be used to generate the changelog.
-
Sync with upstream:
git fetch upstream git rebase upstream/main
-
Push your branch:
git push origin your-branch-name
-
Open a Pull Request on GitHub against the
mainbranch. -
Fill out the PR template with:
- A clear description of the changes
- Related issue numbers (if any)
- Screenshots for UI changes
-
Wait for review – maintainers will review your PR and may request changes.
- Use strict TypeScript – avoid
anywhere possible. - Export types from
index.tsfiles. - Use descriptive variable and function names.
- We use Prettier for formatting – run
bun run formatbefore committing. - We use ESLint for linting – run
bun run lintto check for issues.
When creating a new plugin:
- Create a new file in
packages/draftly/src/plugins/. - Extend the
DraftlyPluginbase class. - Export the plugin from
packages/draftly/src/plugins/index.ts. - Add the plugin to
allPluginsarray if it should be included by default. - Update documentation if needed.
- Test your changes in the playground app (
apps/web). - Ensure the build passes:
bun run build. - Ensure linting passes:
bun run lint.
Found a bug or have a feature request? Open an issue with:
- Bug reports: Steps to reproduce, expected behavior, actual behavior, screenshots if applicable.
- Feature requests: Clear description of the feature and its use case.
Feel free to open a Discussion or reach out to the maintainers.
Thank you for contributing! 🎉