Minor improvement release with database auto-initialization.
✨ Improved
- Database auto-initialization - Application now checks for database tables on startup and automatically creates them from schema.sql if missing
- Enhanced logging - Comprehensive logging for database initialization process
- Simplified installation - No manual database schema setup required
- Graceful error handling - Application logs errors but continues to start even if database init fails
📝 Technical Details
- Added _init_database() method to DvddbApi.pm startup()
- Checks for 'content' table existence on every startup
- Searches multiple locations for schema.sql (app root, /opt/dvddb-api/, ../db/)
- Executes complete schema if tables missing
- Package size: 24KB (up from 23KB)
Initial alpha release of the DVD Database Server. This is the server-side component;
a separate client application package will be released later.
✨ Added
- SHA1-based content lookup - Fast O(1) lookups using SHA1 hashes
- Three response types - exists (1pt), skel (10pts), full (50pts)
- Token authentication - Bearer token auth with SHA256 hashing
- Point-based throttling - Token bucket algorithm with configurable limits
- PostgreSQL backend - Optimized schema with JSONB, ENUMs, and indexes
- Mojolicious framework - Modern Perl web framework with non-blocking I/O
- Hypnotoad server - Production-ready prefork server
- Zero-downtime reloads - Hot reload capability for configuration changes
- Nginx reverse proxy support - SSL termination and rate limiting
- Systemd service integration - Native systemd unit with auto-restart
- Token generation script - Command-line tool for API token creation
- Database migration from SQLite - Successfully migrated 217 records
- Comprehensive test suite - Unit and integration tests
- Debian packaging - Installable via apt repository
- One-line installer - Interactive configuration script
- Project website - Documentation and API reference
⚠️ Known Issues (Major Bugs Present)
- Limited content library - Only 21 content items, 171 titles currently in database
- No bulk lookup endpoint - Can only query one SHA1 at a time
- Redis backend not implemented - Points manager uses PostgreSQL only (may impact high throughput)
- No admin dashboard - Token management requires SSH access and command line
- No token revocation API - Tokens can only be disabled via database
- No rate limiting per SHA1 - Could enable cache hammering of specific content
- Known edge case bugs - Alpha quality software with incomplete error handling
- No monitoring/metrics - No built-in Prometheus or Grafana integration
- Limited documentation - Some internal APIs undocumented
🔒 Security Notes
- Tokens stored as SHA256 hashes only (never plaintext)
- PostgreSQL access restricted to 10.10.0.* network
- SSL/TLS enforced for all external API communication
- Configuration files with secrets excluded from git
- File permissions: 600 on production config files
- Systemd service runs as gardner user (privilege separation)
🚀 Coming Soon (Future Releases)
- Bulk lookup endpoint - Query multiple SHA1s in single request
- Redis backend - High-performance points manager for scaling
- Admin dashboard - Web UI for token management and statistics
- Expanded content library - Add more DVD/Blu-ray titles
- WebSocket support - Real-time updates and notifications
- GraphQL API - Alternative query interface
- Content submission API - Allow authenticated users to submit new entries
- Bug fixes - Address known issues and edge cases
- Performance optimization - Query optimization and caching improvements
- Client application - End-user app for DVD collection management
📊 Statistics
- Content items: 21 (movies, TV shows)
- Discs: 7 physical media entries
- Titles: 171 (including translations and alternate titles)
- Title-content mappings: 18
- Database size: ~2 MB (with indexes)
- Package size: ~150 KB (.deb)
- Lines of code: ~3,500 (Perl)
- Test coverage: 100+ assertions
📦 Deployment Details
- Package name: dvddb-server
- Install location: /opt/dvddb-api/
- Service name: dvddb-server.service
- Config file: /opt/dvddb-api/config/dvddb_api.production.conf
- Log file: /opt/dvddb-api/log/dvddb_api.log
- Database: PostgreSQL 16+
- Perl version: 5.32+
- Repository: https://projects.thedude.vip/apt/
Version Naming Convention
This project follows semantic versioning with release stage suffixes:
- X.Y.Z-alpha - Early testing, known major bugs, breaking changes expected
- X.Y.Z-beta - Feature complete, testing phase, minor bugs may exist
- X.Y.Z - Stable release, production ready
Compatibility Promise
- Alpha: No compatibility guarantees, database schema may change
- Beta: API endpoints stable, may add new features
- Stable: Full backward compatibility within major version