diff --git a/REFDB_FORMAT.txt b/REFDB_FORMAT.txt index eddebda..2a876ab 100644 --- a/REFDB_FORMAT.txt +++ b/REFDB_FORMAT.txt @@ -3590,3 +3590,65 @@ WORKFLOW: 5. Push 6. Brief update (1-2 sentences) + +[MENU_STANDARDS] +updated: 2025-12-16 + +MENU STRUCTURE CONSISTENCY: + All menus follow this standard format: + + 1. show_banner (clears screen + shows toolkit banner) + 2. Menu title with icon: echo -e "${COLOR}${BOLD}🔧 Menu Name${NC}" + 3. Empty line + 4. Section headers: echo -e "${BOLD}Section Name:${NC}" + 5. Empty line before options + 6. Options: echo -e " ${COLOR}##)${NC} 🔧 Option Name - Description" + 7. Empty line after section + 8. Back button: echo -e " ${RED}0)${NC} Back to Main Menu" + 9. Empty line + 10. Separator: echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}" + 11. Prompt: echo -n "Select option: " + +MENU SEPARATORS: + Main menu: ${CYAN}═══════════════════════════════════════════════════════════════${NC} + Submenus: ${CYAN}──────────────────────────────────────────────────────────────${NC} + +BACK BUTTON STANDARD: + Always option 0 + Always red color: ${RED}0)${NC} + Main menu: "Exit" + Submenus: "Back to Main Menu" + +COLOR CODING: + Main categories: Different colors per category + Security: ${GREEN} + Website: ${BLUE} + Performance: ${MAGENTA} + Backup: ${YELLOW} + Actions within menus: Consistent per type + Analysis tools: ${CYAN} + Live monitors: ${MAGENTA} + Actions: ${YELLOW} + Dangerous: ${RED} + +COMMON ISSUES TO STANDARDIZE: + + ❌ INCONSISTENT: Different domain/user lookup in each module + ✅ TODO: Create lib/domain-selector.sh with: + - select_domain_interactive() + - select_user_interactive() + - validate_domain() + - get_domain_owner() + + ❌ INCONSISTENT: Some modules have custom menus, others don't + ✅ STANDARD: Modules should be single-purpose or have internal menus + + ❌ INCONSISTENT: Press Enter messages vary + ✅ STANDARD: Use press_enter function from common-functions.sh + +FUTURE IMPROVEMENTS: + 1. Create lib/domain-selector.sh for unified domain/user selection + 2. Create lib/menu-helpers.sh for consistent menu rendering + 3. Audit all modules for menu consistency + 4. Document module menu patterns in this section +