How to Contribute
First off — thank you for considering it. Docucraft is a small open-source project, and contributions from people outside the core team are what make it grow in directions that actually matter.
This guide covers everything you need to know, from filing your first issue to submitting a pull request with a brand new component.
Ways to contribute
You don't have to write code to make a meaningful contribution. Here are some ways to help:
- Report a bug — open an issue on GitHub with a clear description of the problem and steps to reproduce it.
- Suggest a feature — describe the use case, not just the solution. The more context you give, the easier it is to evaluate.
- Improve documentation — spotted a typo, a confusing explanation, or a missing example? A small PR is very welcome.
- Fix a bug — look through open issues for bugs that are tagged
good first issue. - Build a new component — if you've built something useful for Docusaurus documentation, it might belong in Docucraft. Read the component conventions below before starting.
Development setup
# 1. Fork the repository on GitHub, then clone your fork
git clone https://github.com/<your-username>/docucraft.git
cd docucraft
# 2. Install dependencies
npm install
# 3. Make your changes in src/
# 4. Verify everything compiles
npm run typecheck
# 5. Build the library
npm run build
# 6. Confirm the published files look right
npm run pack:check
Component conventions
Docucraft accepts components that are:
- Reusable — not tied to a specific project, domain, or business logic.
- Documentation-focused — they make technical content clearer, more interactive, or easier to navigate.
- Accessible — interactive controls should have accessible labels and keyboard navigation where reasonable.
Folder structure
Each component lives in its own directory:
src/
components/
YourComponent/
index.tsx ← component implementation and all exported types
styles.module.css ← scoped styles (keep styles local where possible)
README.md ← usage docs and props reference
Exports
Every public component and type must be exported from src/index.ts. Do not ask consumers to import from internal paths like dist/components/....
TypeScript
The project uses TypeScript in strict mode. All public props must be typed and documented in the component README.
Pull request checklist
Before opening a PR, make sure:
- The new component follows the folder convention above.
- All public components and types are exported from
src/index.ts. - The component README includes a quick-start example and a props table.
- You have carefully tested your changes.
-
npm run typecheckpasses with no errors. -
npm run buildproduces output indist/. -
npm run pack:checkshows the expected files.
Commit style
No strict format is enforced, but please keep commits focused. One logical change per commit is easier to review and revert if needed.
Code of conduct
Docucraft follows the Contributor Covenant. In short: be kind, be constructive, and assume good intent.
Questions?
If you're not sure whether your idea fits the project, open a discussion or an issue before writing code. It's much easier to align early than to rework a complete implementation. For specific questions feel free to contact the maintainer directly via email: mrsasekjiri@gmail.com.
We look forward to seeing what you build.