Contributing
Contributions to CrashSense are welcome — bug reports, feature requests, documentation improvements, and pull requests.
Development Setup
bash
git clone https://github.com/crashsense/crashsense.git
cd crashsense
npm install
npm run build
npm testProject Structure
CrashSense is a monorepo using npm workspaces:
crashsense/
packages/
types/ # Shared TypeScript types
utils/ # Ring buffer, event bus, fingerprint, PII scrubber
core/ # Crash detection engine, classifiers, monitors
react/ # ErrorBoundary, hooks, hydration detector
vue/ # Plugin, composables, reactivity tracker
ai/ # LLM client, payload builder, response parser
examples/
react-ecommerce/
docs/ # This documentation site (VitePress)Each package builds with tsup producing ESM, CJS, and TypeScript declaration files.
Code Style
- TypeScript-first — all source code is TypeScript
- Zero dependencies — browser packages must have zero runtime dependencies
- Defensive coding — SDK errors must never crash the host application
- Tree-shakeable — exports should be individually importable
Pull Request Guidelines
- Fork the repository
- Create a branch from
main:git checkout -b feat/your-feature - Make your changes — one feature or fix per PR
- Run tests:
npm test - Build:
npm run build - Commit with a descriptive message:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feat/your-feature - Open a Pull Request against
main
Bug Reports
Use GitHub Issues with the following information:
- CrashSense version
- Browser and version
- Framework (React/Vue/vanilla) and version
- Steps to reproduce
- Expected vs actual behavior
- Error messages or crash reports (if applicable)
Feature Requests
Open a GitHub Issue with the feature label. Describe:
- The problem you're trying to solve
- Your proposed solution
- Alternatives you've considered
License
By contributing, you agree that your contributions will be licensed under the MIT License.