Changes
🎯 Core Database Refactor
- Monolith Breakdown: Refactored massive 6,670-line
database.service.ts
into 12 modular method files by domain - Modular Architecture: Split into analytics, config, junction, notification, instances (Radarr/Sonarr), router, schedule, session, users, watchlist, and webhook methods
- Type Safety: Added comprehensive TypeScript method signatures across 11 type definition files
- Performance: Enhanced database methods with transaction handling and optimized queries
🚀 New Features
- Notification Tracking: Added
triggered_by_user_ids
column for user-specific notification attribution - Race Condition Prevention: Implemented
setPrimaryRadarrInstance
andsetPrimarySonarrInstance
methods - Cron Validation: Added cron-validate dependency with metadata enrichment schedule validation
- Webhook Management: Enhanced webhook processing with pending webhook management methods
🐛 Bug Fixes & Improvements
- Webhook Deduplication: Increased cache TTL from 2 seconds to 10 seconds for better deduplication
- Configuration: Enhanced
publicContentNotifications
with optional chaining for improved reliability - Analytics Optimization: Improved genre processing with batch handling and better error logging
- Logging: Simplified and improved webhook processing log messages
📚 Documentation Additions
- Installation Guides: New comprehensive Radarr and Sonarr configuration documentation
- Content Routing: Updated content routing feature documentation
- Visual Assets: Added instance configuration screenshot guides
- Apprise Integration: Fixed documentation link in apprise form
🔧 Technical Details
- Code Organization: 8,721 lines added across modular files, 6,401 lines removed from monolith
- Database Migrations: Added notification constraint and user tracking migrations
- Schema Updates: Enhanced configuration schemas with optional field support
- Dependency Updates: Added cron-validate package for robust schedule validation
⚠️ Important Notice
This refactor transforms the database service from a monolithic architecture into a maintainable, modular system while adding key features for notification tracking and instance management.
This is a major architectural change. While extensively tested, users are encouraged to report any unforeseen bugs that may arise from this refactor. Please submit issues through the appropriate channels if you encounter any unexpected behavior.
- Database Architecture Refactor & Feature Enhancements (#296) @jamcalli
- 📝 Add docstrings to
develop
(#298) @coderabbitai - Fix/webhook deduplication (#295) @jamcalli
- Feature/database monolith refactor (#294) @jamcalli
- Fix apprise docs link (#289) @JackBailey
- Update Docs and Deps (#288) @jamcalli
- Chore/dependencies docs (#287) @jamcalli
Docker
docker pull lakker/pulsarr:0.3.17
Contributors
@JackBailey, @coderabbitai, @coderabbitai[bot] and @jamcalli