Version: V30.0 (Mobile UI Redesign) Status: Production Ready Last Updated: January 10, 2026
A clinical-grade Progressive Web App for evidence-based strength training management. Built with vanilla JavaScript, designed for both personal training and professional analytics.
- π¨ Modern Dark Theme - OLED-friendly pure black background with teal accents
- π± Mobile-First Design - Optimized for 375px-428px viewports
- π― Bottom Navigation - Thumb-zone optimized navigation bar
- π Enhanced Analytics - Dark-themed Chart.js visualizations
- π Teal Accent System - Medical/tech aesthetic with consistent color palette
- β‘ Unified Navigation - Smooth view transitions (no modal overlays)
- π Interactive Charts - Clinical-grade data visualization
- π¨ Status-Coded Cards - Green/yellow/red ratio indicators
- π©Ί Clinical Insights - Severity-based styling for recommendations
- πͺ Stats Cards - Interactive weight and TDEE display
- π Smart Session Rotation - Auto-suggests next workout based on recovery time
- π― Exercise Variants - Multiple equipment options per movement pattern
- πͺ Progressive Overload Tracking - Volume, intensity, RPE/RIR metrics
- β‘ Plate Calculator - Auto-calculates barbell loading for target weights
- π Spontaneous Mode - Log off-program workouts without disrupting rotation
- π Volume Progression Charts - Track hypertrophy stimulus over time
- π¨ Muscle Distribution Analysis - Identify training imbalances
- π RPE/RIR Tracking - Monitor fatigue accumulation
- π¬ Half-Set Rule - PRIMARY (1.0x) vs SECONDARY (0.5x) muscle contribution
- 𦡠Quad/Hamstring Balance - ACL injury prevention (optimal ratio: 0.6-0.8)
- Visual progress bar with danger/warning/optimal zones
- Volume breakdown display
- Automatic imbalance detection
- βοΈ Push/Pull Balance - Shoulder health monitoring (optimal ratio: 1.0-1.2)
- Total, upper, and lower body ratios
- Collapsible breakdown view
- Prevents shoulder impingement
- πͺ Core Training Analysis - Spine stability assessment (target: 15-25 sets/week)
- Weekly volume tracking
- Frequency and variety metrics
- Dr. Stuart McGill's evidence-based thresholds
- π€Έ Bodyweight Exercise Integration - Load estimation using biomechanics research
- 30+ exercises with research-based multipliers (Pull Up: 100% BW, Push Up: 64% BW)
- User weight detection with smart fallback
- Training style identification
- π‘ Clinical Insights Engine - 3-7 prioritized evidence-based recommendations
- π¨ Danger alerts (immediate injury risk)
β οΈ Warning notifications (imbalances detected)- βΉοΈ Optimization tips
- β Success confirmations
- π¬ Scientific Citation System - Research sources for all recommendations
- Interactive tooltips with full citations
- Croisier et al. (2008), NSCA Guidelines, Dr. Stuart McGill
- Complete methodology in SCIENTIFIC_BASIS.md
- π€ AI Command Center - Integrated AI consultation with prompt library
- 12 built-in prompt templates (coaching, development, schema)
- Custom prompt creation with CRUD operations
- Smart placeholder replacement {% raw %}({{VERSION}}, {{CONTEXT}}, etc.){% endraw %}
- Export/Import prompt collections
- Dynamic context generation for AI conversations
- π€ Smart Merge Engine - AI (Gemini/GPT) can update programs via JSON
- π Fuzzy Exercise Matching - Auto-maps exercise name variations
- π Conflict Detection - User control over AI-suggested changes
- π‘οΈ Auto-Backup - Safety layer before AI merges
- πΎ Offline-First - Works completely offline (PWA)
- βοΈ Google Drive Sync - Optional cloud backup/restore
- π LocalStorage Safety - LS_SAFE wrapper with error handling
- π¦ Backup System - Timestamped backups before destructive operations
- β Canonical Exercise Names - Prevents fragmented analytics (V26.6+)
- π 100+ Exercises - Comprehensive database with biomechanics notes
- ποΈ Equipment Tags - [Barbell], [Machine], [DB], [Cable], [Bodyweight]
- π¬ Clinical Notes - Safety warnings, contraindications, form cues
- π₯ Video Links - YouTube demonstrations
- π― Target Rep Ranges - Evidence-based recommendations
Modular Structure (13 files, ~13,600 lines total):
project-root/
βββ index.html (2,594 lines) - HTML skeleton + V29 analytics UI
βββ exercises-library.js (1,817 lines) - Exercise database
βββ js/
β βββ constants.js (455 lines) - PRESETS, STARTER_PACK, version metadata
β βββ core.js (344 lines) - LS_SAFE, APP.state, APP.core
β βββ validation.js (491 lines) - APP.validation
β βββ data.js (1,218 lines) - APP.data, CRUD operations
β βββ safety.js (325 lines) - APP.safety, backup/restore
β βββ stats.js (2,715 lines) - APP.stats, analytics, V29 ratios
β βββ session.js (750 lines) - APP.session management
β βββ cardio.js (111 lines) - APP.cardio, APP.timer
β βββ ui.js (2,101 lines) - APP.ui, rendering, V29 tooltips
β βββ ai-bridge.js (1,060 lines) - APP.aiBridge, prompt library
β βββ debug.js (46 lines) - APP.debug, error handling
β βββ nav.js (829 lines) - APP.nav, APP.init
β βββ cloud.js (195 lines) - Google Drive integration
βββ SCIENTIFIC_BASIS.md (800 lines) - V29 methodology & citations
βββ ANALYTICS_GUIDE.md (400 lines) - V29 user guide
βββ sw.js, manifest.json - PWA configuration
Key Improvements:
- β V27: 58% reduction in index.html size (9,000 β 2,203 lines)
- β V28: AI Command Center with 12 built-in prompts + custom prompt management
- β V29: Advanced Analytics - Injury risk detection, bodyweight integration, scientific citations
- β Clear separation of concerns (module per namespace)
- β Easier maintenance and AI context efficiency
- β Git-friendly (cleaner diffs, parallel development)
1. Open https://your-app-url.com in Chrome/Edge
2. Click "Install" button (or browser menu β Install)
3. App appears on home screen/desktop
4. Works offline after first load
1. Open app β Click profile icon
2. Enter name, height, age, gender
3. Set activity factor (sedentary to very active)
4. Save β TDEE auto-calculated
1. Dashboard β Click suggested "Next Workout"
2. Fill in weight, reps, RPE for each set
3. Use plate calculator (barbell exercises)
4. Click "Complete Workout"
5. View analytics in Stats tab
1. Library β Copy workout JSON
2. Send to Gemini/GPT: "Analyze and update my program"
3. AI returns optimized JSON
4. Paste into "Apply AI Program"
5. Smart Merge auto-updates targets
Comprehensive documentation suite for developers and contributors:
| Document | Purpose | Audience |
|---|---|---|
| SCIENTIFIC_BASIS.md π | V29 clinical thresholds, calculations, research citations | Medical Professionals, Researchers |
| ANALYTICS_GUIDE.md π | V29 user guide for Advanced Analytics dashboard | Users, Athletes, Coaches |
| ARCHITECTURE.md | System design, data flows, V27-V29 architecture | Developers, Contributors |
| CODING_GUIDELINES.md | Code standards, V27 module development rules | Developers, AI Assistants |
| KNOWN_ISSUES.md | Active bugs, V27 gotchas, workarounds | Users, Developers |
| CHANGELOG_DETAILED.md | Version history with technical context | All |
| DEBUGGING_PLAYBOOK.md | Step-by-step troubleshooting guide | Users, Support |
| EXERCISE_LIBRARY_GUIDE.md | How to add/modify exercises | Contributors |
| HANDOVER_V27.md | V27 complete story (phases, bugs, solutions) | Developers, AI Assistants |
- Track progressive overload scientifically
- Monitor fatigue to prevent overtraining
- Optimize volume distribution across muscle groups
- Log spontaneous workouts without disrupting program
- AI-assisted program updates via JSON
- Client progress tracking with clinical metrics
- Export data for analysis in external tools
- Template programs for multiple clients
- Export workout data to CSV/JSON
- Analyze volume-fatigue relationships
- Study RPE-RIR correlations
- Long-term strength progression analysis
- Primary: Browser LocalStorage (5-10MB limit)
- Location: Your device only (no server transmission)
- Backup: Optional Google Drive sync (requires manual auth)
- β No analytics tracking
- β No user accounts required
- β No data sent to servers
- β No cookies (except localStorage)
- β Works completely offline
- Export full backup to JSON file
- Import from JSON (migration support)
- Google Drive backup/restore
- No vendor lock-in
| Version | Date | Major Changes |
|---|---|---|
| V29.0 | Jan 2026 | Advanced Analytics - Injury risk detection, bodyweight integration, scientific citations (5 checkpoints, 1,638 lines) |
| V28.0 | Jan 2026 | AI Command Center - 12 built-in prompts, custom prompt CRUD, smart placeholders |
| V27.0 | Jan 2026 | Modular architecture - 12 modules, 8-phase refactoring, 11 bugs fixed |
| V26.6 | Dec 2025 | Data integrity hotfix - canonical exercise naming enforcement |
| V26.5 | Dec 2025 | Library expansion - 40+ machine variations with clinical notes |
| V25.0 | Oct 2025 | Smart Merge Engine - AI program integration |
| V24.0 | Sep 2025 | PWA optimization - installable, offline-capable |
| V23.0 | Aug 2025 | Clinical analytics - RPE/RIR tracking, fatigue monitoring |
| V22.0 | Jul 2025 | Google Drive backup/restore |
| V21.0 | Jun 2025 | Exercise library foundation (100+ exercises) |
| V20.0 | May 2025 | Spontaneous mode |
Full changelog: See CHANGELOG_DETAILED.md
Active Issues:
- Console validation warning flood (cosmetic) - See KNOWN_ISSUES.md
- Fuzzy match ambiguity with short queries - See KNOWN_ISSUES.md
- LocalStorage quota limit on 3+ years of data - See KNOWN_ISSUES.md
V27 Architectural Gotchas:
- Arrow functions capture closure scope - See KNOWN_ISSUES.md
- Module load order is non-negotiable - See KNOWN_ISSUES.md
- Object.assign vs direct assignment - See KNOWN_ISSUES.md
For troubleshooting: See DEBUGGING_PLAYBOOK.md
See EXERCISE_LIBRARY_GUIDE.md for detailed instructions.
Quick guide:
// 1. Add to EXERCISE_TARGETS (exercises-library.js)
"[Machine] New Exercise": [{ muscle: "chest", role: "PRIMARY" }]
// 2. Add to EXERCISES_LIBRARY.chest
{
n: "[Machine] New Exercise",
t_r: "8-12",
bio: "Biomechanics explanation...",
note: "Execution tips<br><br>β οΈ CLINICAL: Safety notes",
vid: ""
}- Read CODING_GUIDELINES.md first
- Follow V27 module development rules
- Test edge cases (empty data, invalid input, offline mode)
- Create backup before data mutations:
APP.safety.createBackup("operation") - Submit pull request with clear description
V27 Module Requirements:
- β
Use IIFE pattern:
(function() { ... })() - β
Add namespace guard:
if (!window.APP) window.APP = {}; - β
Use
window.APP.*for cross-module calls - β
Add load confirmation:
console.log("[MODULE] β Loaded") - β Update ARCHITECTURE.md with dependencies
Include:
- Browser version (Chrome, Safari, Firefox, etc.)
- Steps to reproduce
- Console errors (screenshot or copy/paste)
- LocalStorage export (if relevant)
- Check KNOWN_ISSUES.md first
NEVER:
- β Use
localStoragedirectly β Always useLS_SAFEwrapper - β Use
\nfor line breaks β Always use<br>(HTML-safe) - β Delete data without backup β Always
APP.safety.createBackup() - β Skip input validation β Always use
APP.validationmethods - β Use
window.APP = APPβ Always useObject.assign(window.APP, APP)(V27+) - β Use local APP in closures β Always use
window.APP.*for cross-module (V27+)
ALWAYS:
- β Validate user inputs before processing
- β Use canonical exercise names (fuzzy matching)
- β Preserve backward compatibility
- β Test localStorage edge cases
- β Follow module load order (V27+)
- β Add defensive error handling (V27+)
See CODING_GUIDELINES.md for complete rules.
For New Developers:
- Read HANDOVER_V28.md - V28 complete story
- Read ARCHITECTURE.md - System design
- Read CODING_GUIDELINES.md - Code patterns
- Study modules in order (core β validation β data β ui β nav)
Critical Concepts:
- IIFE module pattern (V27+)
- Closure scoping (window.APP vs local APP)
- Object.assign merge pattern
- Module load order dependencies
- LS_SAFE wrapper pattern
[Not yet]
Lead Project Manager: sand01chi
- Vision & direction
- Requirements definition
- Product roadmap
Design Architect: Claude.ai
- Technical specifications
- Architecture design
- Feature planning
Design Auditor: Gemini
- Architecture validation
- Risk assessment
- Design review
Lead Coder: Claude Code
- Implementation in VS Code
- Code quality
- Production deployment
V28.0 (AI Command Center):
- 12 built-in AI prompts
- Custom prompt CRUD operations
- Smart placeholder system
- Duration: ~8.5 hours
V27.0 (Modular Architecture):
- 8-phase refactoring
- 12 modules created
- 11 critical bugs solved
- Duration: 3 days
Built with β€οΈ for evidence-based strength training
END OF README.md