A comprehensive Nextcloud app to manage driver information and track license expiry dates with automatic email notifications.
- Driver Management: Complete driver information management (Name, Surname, License Number, Expiry Date)
- Automatic Notifications: Email notifications for licenses expiring in 30, 7, and 1 day intervals
- Group-based Notifications: Send notifications to users in the "driver notifications" group
- Search & Pagination: Advanced search functionality with pagination support
- Custom Date Picker: User-friendly date selection interface
- Responsive Design: Works on desktop and mobile devices
- Background Jobs: Automated daily checks for expiring licenses
- Nextcloud: Version 25.0 or higher (supports up to Nextcloud 30)
- PHP: Version 8.0 or higher
- Database: MySQL 8.0+, PostgreSQL 9.6+, or SQLite 3.0+
- Email Configuration: Configured SMTP server for notifications
- Open your Nextcloud instance
- Go to Apps β Browse and search for "Driver Manager"
- Click "Download and enable"
- Download the latest release from GitHub
- Extract the archive to your Nextcloud apps directory:
cd /path/to/nextcloud/apps/ unzip drivermanager-v2.0.0.zip - Set proper permissions:
chown -R www-data:www-data /path/to/nextcloud/apps/drivermanager
- Enable the app:
sudo -u www-data php /path/to/nextcloud/occ app:enable drivermanager
Go to Settings β Administration β Basic settings and configure your email server:
- SMTP host and port
- Authentication credentials
- Encryption method (TLS/SSL)
- Go to Settings β Users β Groups
- Create a new group called "driver notifications"
- Add users who should receive expiry notifications to this group
Ensure background jobs are properly configured:
# Set up cron job for Nextcloud (recommended)
sudo crontab -u www-data -e
# Add this line:
*/5 * * * * php /path/to/nextcloud/cron.phpOr use Settings β Administration β Basic settings to configure background jobs via the web interface.
The app works out of the box after installation. Additional customization options:
- Notification Recipients: Users in the "driver notifications" group
- Check Frequency: Daily automatic checks (runs once per day regardless of cron frequency)
- Notification Intervals: 30, 7, and 1 day before expiry
- Navigate to Driver Manager from the main navigation
- Click "Add New Driver"
- Fill in the driver information:
- Name (auto-capitalized)
- Surname (auto-capitalized)
- License Number (auto-uppercase, alphanumeric only)
- Expiry Date (use the calendar picker)
- Click "Save"
- Search: Use the search bar to find drivers by name, surname, or license number
- Edit: Click the "Edit" button next to any driver
- Delete: Click the "Delete" button (requires confirmation)
- Pagination: Navigate through large lists using the pagination controls
- π’ Valid: License expires in more than 30 days
- π‘ Expiring Soon: License expires within 30 days
- π΄ Expired: License has already expired
The app automatically sends one daily email notification for licenses expiring within 30 days. The notification system includes built-in duplicate prevention to ensure emails are sent only once per day, even if your cron job runs more frequently.
- Once Daily: Notifications are sent once per day when the cron job runs
- Duplicate Prevention: The system tracks the last notification date to prevent multiple emails
- Licenses expiring within 24 hours
- Highest priority notifications
- Licenses expiring within 2-7 days
- Requires immediate attention
- Licenses expiring within 8-30 days
- Plan renewal appointments
Each notification includes:
- Summary of expiring licenses by urgency
- Complete driver details table
- Action items and recommendations
- Color-coded urgency indicators
To reset the notification system for testing purposes (allows the email to be sent again):
# Reset the last notification date
sudo -u www-data php /path/to/nextcloud/occ config:app:delete drivermanager drivermanager_last_notification_runAfter running this command, the notification will be sent on the next cron execution.
# Check if the job is registered
sudo -u www-data php /path/to/nextcloud/occ background:job:list | grep DriverManager
# Run background jobs manually
sudo -u www-data php /path/to/nextcloud/cron.php- Verify SMTP configuration in Nextcloud settings
- Check that the "driver notifications" group exists and has members
- Ensure group members have valid email addresses
- Check Nextcloud logs: Settings β Administration β Logging
- Verify the notification hasn't already been sent today (check logs for "already ran today" message)
If you're receiving multiple emails per day:
- Ensure you're using the updated version with duplicate prevention
- Check logs for the message: "Driver expiry notification already ran today"
- The app stores the last run date to prevent duplicates
To force the notification to run again for testing:
sudo -u www-data php /path/to/nextcloud/occ config:app:delete drivermanager drivermanager_last_notification_run# Check app status
sudo -u www-data php /path/to/nextcloud/occ app:list | grep drivermanager
# Check logs for errors
sudo -u www-data php /path/to/nextcloud/occ log:watchCheck these locations for troubleshooting:
- Nextcloud logs: Settings β Administration β Logging
- System logs:
/var/log/apache2/error.logor/var/log/nginx/error.log - PHP logs: Check your PHP configuration for log file location
- Search for "drivermanager" in logs to find app-specific messages
git clone https://github.com/yourusername/nextcloud-drivermanager.git
cd nextcloud-drivermanager
npm install
npm run build# PHP tests
composer install
./vendor/bin/phpunit
# JavaScript tests
npm testThe app provides REST API endpoints:
GET /apps/drivermanager/api/drivers- List all driversPOST /apps/drivermanager/api/drivers- Create new driverPUT /apps/drivermanager/api/drivers/{id}- Update driverDELETE /apps/drivermanager/api/drivers/{id}- Delete driver
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Wiki
- Community: Nextcloud Community
- π§ Fixed duplicate email notifications issue
- β¨ Added notification reset command for testing
- β¨ Improved date comparison logic
- π Enhanced documentation for troubleshooting
- β¨ Nextcloud compatibility (25-30)
- β¨ PHP 8.0+ support with type declarations
- β¨ Modern dependency injection
- β¨ Improved email notifications
- β¨ Enhanced search and pagination
- π§ Database optimizations
- π§ Code modernization
- Initial ownCloud release
- Basic driver management
- Email notifications
- Background job support