1.1.0 (2025-10-09) - **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination - **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP) - **Remote Session Control** - Terminate any device instantly with immediate logout validation - **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions) - **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views - **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons - **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet) - **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops) - **Welcome Notifications** - Sent to new users on registration or fresh install - **Upgrade Notifications** - Admins notified on system updates with version & migration count - **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display - **Web-Based Updater** - `/install/update` for running new migrations with smart detection - **User Registration** - Full signup flow with email verification, password reset, resend verification - **User Management** - CRUD for users with filtering, sorting, pagination (admin-only) - **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout - **Session Validator** - Middleware validates sessions on every request for instant remote logout - **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry - **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades - **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
7.8 KiB
Contributing to Domain Monitor
Thank you for your interest in contributing to Domain Monitor! This document provides guidelines and instructions for contributing.
🌟 Ways to Contribute
- 🐛 Report bugs - Help us identify and fix issues
- 💡 Suggest features - Share ideas for improvements
- 📝 Improve documentation - Help others understand the project
- 🔧 Submit code - Fix bugs or implement features
- 🎨 Enhance UI/UX - Improve the user experience
- 🌍 Add translations - Make the project accessible to more users
🐛 Reporting Bugs
Before submitting a bug report:
- Check existing issues to avoid duplicates
- Update to the latest version to see if the issue persists
- Gather information about your environment
When reporting a bug, include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, PHP version, etc.)
- Error messages and logs
- Screenshots if applicable
Use our Bug Report Template.
💡 Suggesting Features
We welcome feature suggestions! Before submitting:
- Check the roadmap to see if it's already planned
- Search existing issues to avoid duplicates
- Consider the project scope - does it fit?
When suggesting a feature, include:
- Clear description of the feature
- Problem it solves
- Use cases and benefits
- Implementation ideas (if any)
Use our Feature Request Template.
🔧 Code Contributions
Getting Started
-
Fork the repository
git clone https://github.com/Hosteroid/domain-monitor.git cd domain-monitor -
Install dependencies
composer install -
Set up your development environment
- Copy
env.example.txtto.env - Configure database settings
- Run web installer: Visit
http://localhost:8000(or your local domain)
- Copy
-
Create a feature branch
git checkout -b feature/your-feature-name
Coding Standards
We follow PSR-12 coding standards. Key points:
PHP Code Style
- Use 4 spaces for indentation (no tabs)
- Follow PSR-12 naming conventions
- Add type hints for parameters and return types
- Use strict typing:
declare(strict_types=1);
File Organization
- Controllers in
app/Controllers/ - Models in
app/Models/ - Services in
app/Services/ - Views in
app/Views/
Naming Conventions
// Classes: PascalCase
class DomainController {}
// Methods: camelCase
public function getDomainInfo() {}
// Variables: camelCase
$domainName = 'example.com';
// Constants: UPPER_SNAKE_CASE
const MAX_DOMAINS = 1000;
// Database tables: snake_case
domains, notification_groups, notification_logs
Documentation
/**
* Get domain information via WHOIS lookup
*
* @param string $domain The domain name to lookup
* @return array|null Domain info or null if lookup fails
*/
public function getDomainInfo(string $domain): ?array
{
// Implementation
}
Security
- Always use prepared statements for SQL queries
- Sanitize user input with
htmlspecialchars() - Validate and type-check all inputs
- Never expose sensitive data in error messages
Database Changes
If your contribution includes database changes:
-
Create a new migration file in
database/migrations/- Name it:
XXX_descriptive_name.sql(e.g.,014_add_new_feature.sql) - Use sequential numbering (next available number)
- Include
IF NOT EXISTSchecks where appropriate
- Name it:
-
Update
app/Controllers/InstallerController.php- Add your migration to the
$incrementalMigrationsarray - Add it to the appropriate version upgrade path
- Add your migration to the
-
Test the migration using the web updater at
/install/update
Frontend Changes
If modifying views:
- Follow the established design patterns
- Use consistent spacing and styling
- Ensure responsive design (mobile-friendly)
- Test in multiple browsers
- Use semantic HTML
- Keep JavaScript minimal and vanilla (no frameworks)
Testing
Before submitting:
-
Test your changes thoroughly
- Test in different environments
- Test edge cases
- Test with different PHP versions (8.1+)
-
Check for errors
- No PHP warnings or notices
- No console errors (for UI changes)
- No SQL errors
-
Verify functionality
- Feature works as expected
- Doesn't break existing functionality
- Handles errors gracefully
Commit Messages
Write clear, descriptive commit messages:
# Good commit messages
git commit -m "Add RDAP support for .uk domains"
git commit -m "Fix notification duplicate issue on cron"
git commit -m "Update UI design for consistency"
# Bad commit messages
git commit -m "fix bug"
git commit -m "changes"
git commit -m "update"
Format:
- Use present tense ("Add feature" not "Added feature")
- Be specific and descriptive
- Reference issues when applicable: "Fix #123: Domain refresh error"
Pull Request Process
-
Update documentation if needed
- README.md for new features
- CHANGELOG.md for all changes
- Inline code comments
-
Create Pull Request
- Use a clear title
- Describe what changed and why
- Link related issues
- Add screenshots for UI changes
-
PR Template
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Testing How has this been tested? ## Checklist - [ ] Code follows project style - [ ] Self-review completed - [ ] Comments added for complex code - [ ] Documentation updated - [ ] No new warnings - [ ] Tests pass -
Respond to feedback
- Address review comments
- Make requested changes
- Keep the conversation productive
📝 Documentation
Help improve our documentation:
- Fix typos and unclear explanations
- Add examples and use cases
- Improve installation instructions
- Create tutorials or guides
- Translate documentation
🎨 Design Guidelines
When contributing UI/UX changes:
- Consistency - Follow existing design patterns
- Accessibility - Ensure usability for all users
- Responsiveness - Works on all screen sizes
- Performance - Optimize images and assets
- Simplicity - Keep it clean and intuitive
🌍 Translations
We welcome translations! To add a new language:
- Create language files in appropriate directories
- Follow existing translation structure
- Test thoroughly with the interface
- Ensure all strings are translated
📜 Code of Conduct
Our Standards
- Be respectful and inclusive
- Welcome newcomers
- Accept constructive criticism
- Focus on what's best for the community
- Show empathy towards others
Unacceptable Behavior
- Harassment or discrimination
- Trolling or insulting comments
- Public or private harassment
- Publishing others' private information
- Other unprofessional conduct
🏆 Recognition
Contributors are recognized in:
- CHANGELOG.md for significant contributions
- README.md contributors section
- GitHub contributors page
📞 Getting Help
- 💬 GitHub Discussions - Ask questions
- 🐛 Issues - Report bugs
- 📖 Wiki - Documentation
📋 Project Priorities
Current focus areas:
- Bug fixes and stability
- Performance improvements
- Documentation
- New notification channels
- API development
- Multi-user support
See CHANGELOG.md for the full roadmap.
Thank you for contributing to Domain Monitor! 🚀
A project by Hosteroid - Premium Hosting Solutions