Created comprehensive architecture and quick reference documentation.
NEW DOCUMENTS:
1. MULTI_CONTROL_PANEL_ARCHITECTURE.md (6500+ words)
Defines MANDATORY patterns for all future development:
- Core principles (never hardcode, use abstractions, conditionals)
- Standard library usage (system-detect.sh, user-manager.sh)
- Path mapping reference (all panels)
- Standard code patterns (log discovery, docroot, domain→user)
- Module classification (A/B/C/D)
- Testing requirements
- Code review checklist
- Migration guide
- Common mistakes to avoid
Every developer must follow these patterns!
2. CONTROL_PANEL_QUICK_REFERENCE.md (8000+ words)
Fast lookup while coding:
- Panel detection methods
- Complete file system path mappings
- Configuration file locations
- CLI tools & API commands
- Database prefix patterns (CRITICAL for InterWorx!)
- PHP configuration per panel
- Email, FTP, security features
- WordPress detection patterns
- Process ownership
- Code snippets for common tasks
- Panel-specific quirks/gotchas
- Migration implications
Covers: cPanel, Plesk, InterWorx, Standalone
PURPOSE:
These documents establish a STANDARD ARCHITECTURE before completing
InterWorx support. All modules will be refactored to follow these
patterns, making it trivial to add DirectAdmin, CyberPanel, etc.
KEY PATTERNS ESTABLISHED:
- Never hardcode paths → use SYS_LOG_DIR, get_user_info()
- Wrap API calls → check SYS_CONTROL_PANEL first
- Design for extension → case statements for panels
- Test on all platforms → cPanel regression required
MODULE CLASSIFICATION:
- Class A: Panel agnostic (no special handling)
- Class B: Needs system detection (SYS_LOG_DIR)
- Class C: Needs user/domain management (get_user_info)
- Class D: Panel-specific (document limitations)
CRITICAL GOTCHAS DOCUMENTED:
- InterWorx database prefix uses DOMAIN not USERNAME!
- Plesk has no shared hosting (domain-centric)
- cPanel addon domains share public_html
- InterWorx logs are per-domain in user home
NEXT STEPS:
1. Update existing modules to follow patterns
2. Complete InterWorx support systematically
3. Expand Plesk support
4. Add DirectAdmin/CyberPanel
This is the foundation for true multi-panel architecture!
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>