Thank you for your interest in contributing! All contributions — bug reports, feature requests, and pull requests — are welcome.
Prerequisites
- Node.js v18 or later (v24 LTS recommended)
- npm (bundled with Node.js)
- Git
Setting Up
- Fork the repository and clone your fork
- Run
npm installto install dependencies - Run
npm run devand openhttp://localhost:3000
pdf-kit/
├── public/ # Static assets (favicon, og-image, screenshots)
├── src/
│ ├── styles/
│ │ ├── base.css # CSS reset, variables, typography
│ │ ├── layout.css # Header, footer, hero, tool grid
│ │ ├── components.css # Cards, buttons, dropzones, progress bars
│ │ └── tools.css # Canvas editor, page previews, toolbars
│ ├── core/
│ │ ├── App.js # App shell HTML, routing, navigation
│ │ ├── DropZone.js # Drag-and-drop file handling
│ │ └── Utils.js # Shared utility functions
│ ├── tools/ # One file per tool, each exports init()
│ └── main.js # Entry point — imports and initializes all tools
├── tests/
│ ├── unit/ # Vitest unit tests (Utils.js)
│ └── e2e/ # Puppeteer E2E tests
├── index.html
├── vite.config.js
├── vitest.config.js
└── vitest.e2e.config.js
Branch Naming
| Prefix | Use for |
|---|---|
feature/ |
New features or enhancements |
fix/ |
Bug fixes |
docs/ |
Documentation only |
refactor/ |
Code cleanup with no behaviour change |
Making Changes
- Create a branch:
git checkout -b feature/your-feature-name - Make your changes, following existing patterns in
src/tools/andsrc/core/ - Run
npm run build(must pass with no errors) before committing - Run the tests — see Testing below
- Commit using Conventional Commits — common prefixes:
feat,fix,docs,refactor,chore - Push and open a Pull Request
- Create
src/tools/YourTool.jsand export aninit()function that binds event listeners - Add the tool view HTML inside
toolViewsHTML()insrc/core/App.js - Add a tool card to the appropriate section grid in the home view (also in
App.js) - Import and call
init()insrc/main.js
# Unit tests (Utils.js)
npm test
# Unit tests in watch mode
npm run test:watch
# E2E tests (requires no other process on port 5173)
npm run test:e2eUnit tests use Vitest with happy-dom. E2E tests use Vitest + Puppeteer and spin up a Vite dev server automatically.
Bug Reports — Please include steps to reproduce, expected vs actual behaviour, browser + OS, and a screenshot/recording if visual.
Feature Requests — Please describe the problem, your proposed solution, and alternatives considered.
Pull Requests — Before submitting, ensure:
npm run buildpasses with no errors- Tests pass (
npm test) - New tool logic lives in its own file under
src/tools/ - No new runtime dependencies are added without prior discussion
- Vanilla JS only — no frontend framework; plain HTML, CSS, and ES modules
- One tool per file — each file under
src/tools/exports a singleinit()function - Shared logic belongs in
Utils.js— keep tool files focused on their own behaviour - No new dependencies for things the browser already provides (Canvas API, FileReader, URL.createObjectURL, etc.)
- All processing must remain client-side — files must never leave the user's device
Open a GitHub Issue for bugs or questions.
By contributing, you agree that your contributions will be licensed under the MIT License.