This guide covers development workflows, automation, and contribution guidelines for ShelfBridge.
ShelfBridge uses fully automated releases with changelog generation.
- Push to main: Any functional commit to
maintriggers the release workflow - Version detection: Uses conventional commit patterns:
feat:→ minor version bump (1.16.0 → 1.17.0)fix:→ patch version bump (1.16.0 → 1.16.1)BREAKING CHANGE→ major version bump (1.16.0 → 2.0.0)
- Automatic changelog: Generates structured changelog entry
- Version bump: Updates
package.jsonandCHANGELOG.md - GitHub release: Creates release with generated notes
Use conventional commit format for better automation:
# Features (minor version bump)
feat: add title/author matching
feat(sync): implement parallel processing
# Bug fixes (patch version bump)
fix: resolve authentication timeout
fix(docker): correct permission issues
# Performance improvements
perf: optimize database queries
perf(cache): reduce memory usage
# Breaking changes (major version bump)
feat!: redesign configuration format
feat: remove deprecated API endpoints
BREAKING CHANGE: Configuration format has changedThese commit types are excluded from releases:
docs:- Documentation changeschore:- Maintenance taskstest:- Test-only changesci:- CI/CD changesstyle:- Code style changes
If needed, you can manually update the changelog:
# Preview what would be generated
npm run changelog:preview
# Update changelog for current version
npm run changelog
# Update changelog for specific version
./scripts/update-changelog.sh -v 1.16.1
# Generate from specific tag range
./scripts/update-changelog.sh -v 1.16.1 -t v1.16.0# Create feature branch
git checkout -b feat/new-feature
# Make changes with conventional commits
git commit -m "feat: add new awesome feature"
# Push and create PR
git push origin feat/new-feature# Run tests
npm test
# Test configuration
npm run config
# Test with dry run
node src/main.js sync --dry-runAutomatic (Recommended):
- Merge PR to
main - Automation handles version bump and changelog
- GitHub release created automatically
Manual (If needed):
- Update version:
npm version patch|minor|major - Update changelog:
npm run changelog - Commit and push
- Create GitHub release
# Application
npm start # Start scheduled sync
npm run sync # Run sync once
npm run interactive # Interactive CLI mode
npm test # Run unit/integration tests
# Development
npm run dev # Development mode with auto-restart
npm run changelog # Update changelog
npm run changelog:preview # Preview changelog changes
# Cache management
npm run cache # Cache utilitiesscripts/update-changelog.sh: Automated changelog generationscripts/README.md: Script documentation
# Build image
docker build -t shelfbridge .
# Run with docker-compose
docker-compose up -d
# View logs
docker-compose logs -f- CI: Tests across Node.js versions
- Code Quality: ESLint and security checks
- Version & Release: Automated releases
- Docker Build: Multi-platform container builds
# Comprehensive debug info
node src/main.js debug
# Test API connections
node src/main.js test
# Validate configuration
node src/main.js validate
# Cache inspection
node src/main.js cache --show- Location:
logs/directory - Rotation: Daily rotation with 14-day retention
- Levels: Error, Warn, Info, Debug
ShelfBridge/
├── src/ # Source code
│ ├── main.js # CLI entry point
│ ├── sync-manager.js # Core sync logic
│ ├── config.js # Configuration management
│ └── ...
├── scripts/ # Utility scripts
│ ├── update-changelog.sh
│ └── README.md
├── .github/workflows/ # GitHub Actions
├── config/ # Configuration templates
├── docs/ # Documentation
├── logs/ # Application logs
└── CHANGELOG.md # Generated changelog
- Read the Contributing Guide
- Check existing Issues
- Review the Feature Overview
- Use ESLint configuration
- Follow conventional commit format
- Write clear, descriptive commit messages
- Update documentation for new features
- Test manually with
--dry-runflag - Verify configuration validation works
- Test with real API calls if possible
- Update tests for new features
For major releases, verify:
- All tests pass
- Documentation updated
- CHANGELOG.md reflects changes
- Docker image builds successfully
- Configuration examples updated
- Breaking changes documented
- Migration guide provided (if needed)
- User Guides:
wiki/user-guides/ - Technical Docs:
wiki/technical/ - API Reference:
wiki/technical/CLI-Reference.md - Troubleshooting:
wiki/troubleshooting/
Keep documentation updated with code changes!