Contributing
Thank you for your interest in contributing to DeepScanBot! We welcome contributions from the community and value every contributor, whether you are fixing a bug, adding a feature, improving documentation, or reporting an issue.
Code of Conduct
We are committed to providing a welcoming and inclusive experience for everyone, and we expect all contributors to be respectful and constructive in all interactions.
Expected Behavior
- Be respectful and considerate toward other people
- Welcome newcomers and help them get started
- Focus on what is best not just for us as individuals, but for the overall community
- Show empathy and kindness toward other community members
Unacceptable Behavior
- Harassment, discrimination, or offensive comments
- Personal attacks or trolling
- Public or private harassment
- Publishing others' private information without their explicit permission
Reporting Issues
If you experience or witness unacceptable behavior, please report it by opening an issue in the DeepScanBot repository. All reports will be reviewed and investigated promptly and fairly.
Getting Started
1. Fork the Repository
Fork the DeepScanBot repository on GitHub.
2. Clone Your Fork
git clone https://github.com/YOUR_USERNAME/DeepScanBot.git
cd DeepScanBot
3. Set Up Development Tools
# Code formatting
go install mvdan.cc/gofumpt@latest
# Import management
go install github.com/daixiang0/gci@latest
# Linting
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Git hooks
go install github.com/evilmartians/lefthook@latest && lefthook install
4. Sync and Create a Branch
Keep your fork up to date with the base repository:
# Add the upstream remote (one-time setup)
git remote add upstream https://github.com/mindfiredigital/DeepScanBot.git
# Sync with the latest development branch
git checkout development
git pull upstream development
git push origin development
# Create your feature branch
git checkout -b feat/your-feature-name
Development Workflow
Code Formatting
All Go code must be formatted with gofumpt:
gofumpt -l -w .
Import Management
Imports must be organized with gci:
gci write --skip-vendor -s standard -s default -s "prefix(github.com/mindfiredigital/DeepScanBot)" .
Linting
Run the linter before committing:
golangci-lint run ./...
Testing
Ensure all tests pass:
go test ./...
Local npm Package Testing
Test the npm package locally before committing:
# Build binaries for all platforms
goreleaser build --snapshot --clean
# Verify binaries
node scripts/verify-binary.js
# Create npm package
npm pack
# Install locally for testing
npm install -g ./deep-scan-bot-*.tgz
# Test the installed binary
deepscanbot --version
deepscanbot -h
# Uninstall after testing
npm uninstall -g @mindfiredigital/deepscanbot
Pre-publish Checks
Before publishing, run the prepublish check:
node scripts/prepublish-check.js
Commit Messages
This project uses Conventional Commits:
feat: add new feature
fix: resolve issue with X
docs: update documentation
refactor: improve code structure
test: add tests for X
chore: update dependencies
Pull Request Process
- Ensure your code passes all linting and tests
- Update documentation if needed
- Submit a pull request with a clear description of changes
- Your PR will be reviewed by maintainers
Project Structure
apps/
cli/ # CLI entry point and tests
docs/ # Docusaurus documentation site
packages/
crawler/ # Core crawling logic
fetcher/ # HTTP fetch layer
logger/ # Logging utilities
parser/ # HTML parsing
storage/ # Result storage and reports
types/ # Shared type definitions
Attribution
This Code of Conduct is adapted from the Contributor Covenant.