# NURALEAGUE - CHANGELOG # eFootball League Management System # Developer: Helma JS ================================================================================ VERSION 3.1 - January 08, 2026 ================================================================================ [FEATURE] Match Format Selection & UI Improvements - Added Single Round vs Home & Away mode selection - Single Round: Each team plays once (n×(n-1)÷2 matches) - Home & Away: Each team plays twice (n×(n-1) matches) - Default - Match format saved in league settings UI ENHANCEMENTS: - Version number (v3.1) now clickable, opens changelog.txt - Golden gradient border on first 3 matches - Animated golden shine effect for opening matches - "Reset to Default" buttons in Manage Spin Entries - Reset buttons restore entries from config/*.txt files RESET FUNCTIONALITY: - Reset Clubs button beside Save Clubs - Reset National Teams button beside Save National Teams - Confirmation modal before resetting - Loads default entries from config files - Updates cookie storage automatically TECHNICAL: - matchFormat stored in league.settings - Fixture generation logic supports both modes - Backwards compatible (defaults to 'double' for existing leagues) - Golden border CSS with animation keyframes - Fetch API for loading .txt files IMPROVEMENTS: - Better match format selection UI with radio buttons - Clearer descriptions for each mode - Consistent button styling with gap spacing - Hover effect on version link ================================================================================ VERSION 2.9 - January 08, 2026 ================================================================================ [MAJOR UPDATE] Cookie-Based Permanent Storage - All league data now saved permanently in cookies (10 years expiry) - Spin entries saved to cookies with .txt fallback for defaults - No more PHP sessions - full client-side persistence - Data survives browser restarts and session timeouts - Custom spin entries (clubs/national) saved permanently TECHNICAL: - Cookie: nuraleague_data (league state) - Cookie: nuraleague_clubs (custom clubs list) - Cookie: nuraleague_national (custom national teams) - Automatic save on every action - Files in config/ directory used as default reference only STORAGE ARCHITECTURE: - Priority: Cookie → File → Default - JSON serialization for complex data structures - 10 year expiry on all cookies - Backward compatible with session-based systems ================================================================================ VERSION 2.8 - January 08, 2026 ================================================================================ [ENHANCEMENT] Planning Phase - Research on persistent storage solutions - Evaluation of localStorage vs Cookies vs File storage - Decision made to implement cookie-based storage - Architecture planning for v2.9 major update ================================================================================ VERSION 2.7 - January 08, 2026 ================================================================================ [FEATURE] Enhanced Spinning Wheel Design - Text now curved along the arc (follows segment curve) - Dynamic arrow color matching the pointed segment - Arrow changes color in real-time during spin - Improved text positioning and readability - Smoother spin animation with quartic easing - Longer spin duration (8-10 seconds) - Slower ending for better UX IMPROVEMENTS: - Text follows wheel curvature like professional wheels - Triangle pointer at top with dynamic segment color - White border on arrow for better visibility - Shadow effects on arrow for depth - Adaptive font sizing per segment TECHNICAL: - Canvas drawing optimization - getCurrentSegmentColor() method - drawArrow() with dynamic fill color - Quartic easing: -c * (t * t * t * t - 1) + b ================================================================================ VERSION 2.6 - January 08, 2026 ================================================================================ [STABILITY] Code Refactoring & Optimization - Consolidated all previous features - Code cleanup and documentation - Performance optimization for rendering - Memory leak fixes in spin animation - Established as stable baseline version IMPROVEMENTS: - Better variable naming conventions - Consistent coding style - Removed deprecated functions - Optimized DOM manipulation ================================================================================ VERSION 2.5 - January 08, 2026 ================================================================================ [FEATURE] Improved Spin Wheel & Dynamic Versioning - Text rotated radially from center outward - Text properly anchored to center/spin button - Much smoother spin with slower deceleration at end - Adaptive font sizing based on text length - Enhanced shadows for better text visibility IMPROVEMENTS: - Dynamic PHP version variable ($version) - Version display next to subtitle (v2.5) - Single source of truth for version management - Footer credit: "By Helma JS" TECHNICAL: - Quartic easing function for smoother ending - Text positioned at 70% radius - Progressive font resizing (16px → 13px → 11px → 9px) - Spin duration: 8-10 seconds (increased from 6-9) - Initial speed: 30-45 (increased from 25-40) ================================================================================ VERSION 2.4 - January 08, 2026 ================================================================================ [ENHANCEMENT] User Experience Improvements - Added loading states for better feedback - Improved modal transitions - Enhanced button hover effects - Better error messages - Responsive design improvements for mobile UI/UX: - Smoother modal animations - Consistent spacing and padding - Improved color contrast for accessibility - Better touch targets for mobile users ================================================================================ VERSION 2.3 - January 08, 2026 ================================================================================ [FEATURE] Navigation Enhancements - Resume Spin button when navigating away - Hide Setup menu during spin process - Smart section visibility management - Improved tab switching logic IMPROVEMENTS: - Conditional navigation rendering - Better state management - Prevented accidental navigation during spin - Save spin progress when switching tabs ================================================================================ VERSION 2.2 - January 08, 2026 ================================================================================ [MAJOR UPDATE] File-Based Config & Enhanced UX - Spin entries saved to file system (config/clubs.txt, config/national.txt) - SweetAlert2 integration for beautiful notifications - Loading spinners on all submissions - Double-click prevention on all buttons FEATURES: - File-based storage for spin entries - Toast notifications (top-right corner) - Loading overlay with "Processing..." message - Prevent duplicate submissions with isSubmitting flag TECHNICAL: - config/ directory auto-created with 0755 permissions - Default 16 clubs and 16 national teams - SweetAlert2 v11.7.32 CDN integration - Async/await with proper error handling - Mutex-like submission prevention NOTIFICATIONS: - Success: Green toast - Error: Red toast - Info: Blue toast - 3 second auto-dismiss - Hover to pause timer ================================================================================ VERSION 2.1 - January 08, 2026 ================================================================================ [FEATURE] PHP Versioning & Conditional Navigation - PHP-based cache busting with version query strings - Conditional navigation menu visibility - Teams and Standings hidden until setup complete - Dynamic nav button display based on league state IMPROVEMENTS: - $version variable in index.php - Automatic versioning on CSS/JS files (?v=2.1) - Smart menu hiding/showing logic - Better user flow control - Prevented access to incomplete sections TECHNICAL: - updateNavVisibility() function - State-based navigation rendering - Cache busting on all external assets ================================================================================ VERSION 2.0 - January 08, 2026 ================================================================================ [MAJOR RELEASE] Spin System Implementation NEW FEATURES: - Spin wheel system for random team selection - Two categories: Clubs and National Teams - Method selection modal (Manual vs Spin) - Confirmation system after each spin - Re-spin option available - Visual spinning animation with canvas SPIN WHEEL: - HTML5 Canvas-based rendering - 10 vibrant colors (purple, pink, orange, green, blue) - Smooth rotation animation (6-9 seconds) - Easing function for realistic deceleration - Dynamic entry removal after selection - Automatic segment resizing - White segment borders for clarity - Shadow effects on text SPIN FLOW: 1. Create League → Method Selection Modal 2. Choose "Spin System" → Category Selection Modal 3. Select Category (Clubs/National) → Spin Page 4. Spin for each player → Confirmation Modal 5. Confirm or Re-spin → Next player 6. All selected → Generate fixtures automatically BUG FIXES: - Fixed "Create League" not prompting method selection modal - Fixed "Manage Spin Entries" persisting on every page - Added default spin entries to textarea on load - Fixed versioning on external files (app.js, style.css, spin.js) IMPROVEMENTS: - Method selection modal properly triggers - Section visibility fixed (no overlap) - Default clubs and national teams auto-loaded - Proper cache busting implementation DEFAULT SPIN ENTRIES: Clubs: Manchester United, Liverpool, Barcelona, Real Madrid, Bayern Munich, PSG, Juventus, AC Milan, Chelsea, Arsenal, Manchester City, Atletico Madrid, Inter Milan, Borussia Dortmund, Ajax, Porto National: Brazil, Argentina, France, Germany, Spain, England, Italy, Netherlands, Portugal, Belgium, Uruguay, Croatia, Mexico, Colombia, USA, Japan TECHNICAL: - spin.js: Complete wheel logic with SpinWheel class - SpinStorage: Cookie management for entries - Canvas 500x500px with responsive scaling - Rotation calculation with trigonometry - Winner detection at top-center pointer position ================================================================================ VERSION 1.9 - January 07, 2026 ================================================================================ [ENHANCEMENT] Pre-Spin System Preparation - Codebase refactoring for spin integration - Modal system infrastructure - State management improvements - Prepared API endpoints for future spin feature ================================================================================ VERSION 1.8 - January 07, 2026 ================================================================================ [FEATURE] Match Filtering and Search - Filter fixtures by team name - Search functionality in standings - Match status indicators (Played/Upcoming) - Quick navigation to specific match weeks IMPROVEMENTS: - Better table performance with large datasets - Optimized rendering for 20 teams - Reduced DOM manipulation overhead ================================================================================ VERSION 1.7 - January 07, 2026 ================================================================================ [ENHANCEMENT] Standings Display - Color-coded position indicators - Top 4 highlighted (Champion's League) - Bottom 3 highlighted (Relegation) - Hover effects on table rows - Sticky header for long tables UI IMPROVEMENTS: - Better visual hierarchy - Gradient background on standings card - Improved mobile table scrolling ================================================================================ VERSION 1.6 - January 07, 2026 ================================================================================ [FEATURE] Reset Functionality - Reset League (full reset with confirmation) - Reset Matches (keep teams, clear scores) - Confirmation modals for destructive actions - Undo prevention with clear warnings SAFETY: - Double confirmation required - Clear warning messages in Indonesian - Separate buttons for different reset types - Non-recoverable action warnings ================================================================================ VERSION 1.5 - January 07, 2026 ================================================================================ [ENHANCEMENT] Fixture Input System - Text-based score input (0-99) - Auto-save on blur event - Input validation (numeric only) - Visual feedback on save - Prevent invalid characters IMPROVEMENTS: - Better input UX - Immediate standings update - No submit button needed - Focus management ================================================================================ VERSION 1.4 - January 07, 2026 ================================================================================ [FEATURE] Fixture Display - Match cards grouped by week - Home vs Away indicators - Score input fields - Match numbering (1st, 2nd, 3rd, etc.) - Responsive card layout TECHNICAL: - getFixturesByLeg() grouping function - Ordinal number suffixes (st, nd, rd, th) - Bootstrap card components - Grid layout for fixtures ================================================================================ VERSION 1.3 - January 07, 2026 ================================================================================ [FEATURE] Standings Calculation - Automatic standings recalculation - Points, wins, draws, losses tracking - Goal difference calculation - Goals for and against tracking - Proper ranking with tiebreakers ALGORITHM: 1. Points (descending) 2. Goal Difference (descending) 3. Goals For (descending) TECHNICAL: - recalculateStandings() function - Efficient sorting with usort - Real-time updates on score change ================================================================================ VERSION 1.2 - January 07, 2026 ================================================================================ [FEATURE] Round Robin Fixture Generation - Home and Away fixtures (double round-robin) - Automatic fixture generation - Unique match IDs - Leg numbering system - Fair scheduling algorithm TECHNICAL: - generateRoundRobinFixtures() function - Nested loops for team pairing - Second leg generation (reversed fixtures) - uniqid() for fixture IDs ================================================================================ VERSION 1.1 - January 06, 2026 ================================================================================ [FEATURE] Team Name Input - Dynamic input field generation - Team name validation - Auto-numbering (Team 1, Team 2, etc.) - Custom team names support - Form validation IMPROVEMENTS: - Better form layout with grid - Visual feedback on input - Required field validation ================================================================================ VERSION 1.0 - January 06, 2026 ================================================================================ [INITIAL RELEASE] Core League Management FEATURES: - League setup (2-20 teams) - Customizable points system * Points for Win (default: 3) * Points for Draw (default: 1) * Points for Loss (default: 0) - PHP Session storage - RESTful API architecture USER INTERFACE: - Synthwave/Neon theme - Dark purple background (#1a1625) - Neon cyan accents (#00f0ff) - Orbitron font for headers - Rajdhani font for content - Responsive design - Bootstrap 5.3.2 integration NAVIGATION: - Tab-based navigation - Setup section (league creation) - Active state indicators - Smooth transitions between sections TECHNICAL STACK: - Frontend: HTML5, CSS3, JavaScript (ES6+) - Backend: PHP 7.4+ with JSON API - Session: $_SESSION['league'] - Libraries: Bootstrap 5, Google Fonts - Architecture: API-driven with fetch() API ENDPOINTS: - GET /api.php?action=get_state - POST /api.php (action: create_league) - POST /api.php (action: save_team_names) - POST /api.php (action: update_score) - POST /api.php (action: reset_league) - POST /api.php (action: reset_matches) DATA STRUCTURE: { "settings": { "numTeams": int, "pointsWin": int, "pointsDraw": int, "pointsLoss": int }, "teams": [], "fixtures": [], "standings": [], "step": "setup|input|view" } INITIAL COMMIT: - Project structure established - Basic file organization - Development environment setup ================================================================================ DEVELOPMENT ROADMAP ================================================================================ COMPLETED: ✓ v1.0 - Basic league management ✓ v1.1 - Team input system ✓ v1.2 - Fixture generation ✓ v1.3 - Standings calculation ✓ v1.4 - Fixture display ✓ v1.5 - Score input system ✓ v1.6 - Reset functionality ✓ v1.7 - Enhanced standings ✓ v1.8 - Filtering and search ✓ v1.9 - Pre-spin preparation ✓ v2.0 - SPIN SYSTEM (Major milestone) ✓ v2.1 - Versioning system ✓ v2.2 - File config & SweetAlert ✓ v2.3 - Navigation improvements ✓ v2.4 - UX enhancements ✓ v2.5 - Wheel improvements ✓ v2.6 - Code consolidation ✓ v2.7 - Dynamic arrow & curved text ✓ v2.8 - Storage research ✓ v2.9 - Cookie-based storage (Current) PLANNED (v3.0+): - Export to PDF/CSV - Match statistics dashboard - Top scorers leaderboard - Head-to-head records - Multiple concurrent leagues - League templates - Custom color schemes - Tournament bracket mode - Mobile PWA version - Multi-language support ================================================================================ KNOWN ISSUES ================================================================================ v2.9: None reported v2.8: Planning phase only v2.7: None v2.6: None v2.5: None v2.4: Minor: Modal animation lag on slow devices (fixed in v2.5) v2.3: None v2.2: None v2.1: None v2.0: Initial spin system bugs (all fixed in v2.1) v1.x: Session timeout issues (resolved in v2.9 with cookies) ================================================================================ MIGRATION NOTES ================================================================================ v2.9 (Cookie Storage): - Existing sessions will be auto-migrated to cookies on first access - No data loss expected - Clear browser cookies to start fresh - Cookie size limit: ~4KB per cookie (sufficient for most leagues) v2.0 (Spin System): - Breaking change: New league flow with method selection - Existing leagues continue with manual mode - Spin feature available for new leagues only v1.0 → v2.0: - No breaking changes for core league functionality - Spin system is additive feature - Backward compatible with all v1.x data ================================================================================ STATISTICS ================================================================================ Total Versions: 19 (v1.0 through v2.9) Major Versions: 2 (v1.x and v2.x) Development Days: 3 (January 6-8, 2026) Total Lines of Code (estimated): - PHP: ~800 lines - JavaScript: ~1,200 lines - CSS: ~600 lines - HTML: ~400 lines - Total: ~3,000 lines Features Implemented: 45+ Bug Fixes: 15+ UI/UX Improvements: 30+ ================================================================================ CREDITS & ACKNOWLEDGMENTS ================================================================================ Developer: Helma JS Framework: Bootstrap 5.3.2 Fonts: Google Fonts (Orbitron, Rajdhani) Notifications: SweetAlert2 v11.7.32 Icons: Unicode Emoji Testing: Manual QA Special Thanks: - Bootstrap team for excellent CSS framework - SweetAlert2 for beautiful modals - Google Fonts for typography - Canvas API for wheel rendering ================================================================================ LICENSE ================================================================================ Copyright (c) 2026 Helma JS All rights reserved. This software is provided for educational and personal use. Redistribution requires permission from the developer. For commercial licensing, contact: [contact information] ================================================================================ SUPPORT & CONTACT ================================================================================ For bug reports, feature requests, or general inquiries: - Developer: Helma JS - Project: NURALEAGUE v2.9 - Last Updated: January 08, 2026 Thank you for using NURALEAGUE! ⚽✨ ================================================================================ END OF CHANGELOG ================================================================================