Building Iron Volume: A Modern Fitness App with Next.js 15
How we built an intelligent workout generator using Next.js 15, genetic algorithms, and modern web technologies to help athletes train smarter.
We’re excited to announce the launch of Iron Volume, a modern fitness web application that generates intelligent, randomized workouts tailored to your equipment, time constraints, and training goals.
The Problem
Athletes and fitness enthusiasts face a common challenge: creating varied, effective workouts that match their available equipment and time while avoiding repetitive routines. Traditional workout apps either provide static programs or require manual planning. We wanted to build something smarter.
What is Iron Volume?
Iron Volume is a Next.js 15 application that generates three distinct types of workouts:
1. Standard Workout Generator
The core feature allows users to configure workouts based on:
- Focus areas: Cardio, strength, or mixed training
- Workout types: HIIT, AMRAP, EMOM, or custom durations
- Available equipment: Kettlebells, dumbbells, bodyweight, rowing machines, and more
- Time constraints: Generate workouts that fit your schedule
The workout generator uses a sophisticated algorithm to create balanced, effective routines from a curated exercise database with metadata about equipment requirements, modality, and timing.
2. HYROX Training System
For HYROX athletes (a fitness racing format combining running with functional exercises), we built specialized training modes:
Transition Training: Simulates race-specific transitions between running and exercise stations, helping athletes optimize their performance where races are won and lost.
Generic HYROX Workouts: Creates balanced HYROX-style workouts using genetic algorithm optimization to match target times and intensity levels. The algorithm uses population-based generation with fitness scoring to create optimal workout combinations.
3. Deck of Cards Workouts
An alternative workout style using playing card mechanics for exercise selection, adding an element of randomness and fun to training sessions.
Technical Architecture
We built Iron Volume with modern web technologies and best practices:
Frontend Stack
- Next.js 15 with App Router for optimal performance and SEO
- React 19 for the latest framework features
- TypeScript for type safety across the entire codebase
- Tailwind CSS with shadcn/ui for consistent, accessible components
- next-themes for comprehensive dark/light mode support
Advanced Features
- Genetic Algorithm Optimization: Population-based workout generation that evolves solutions to match specific time and intensity targets
- Interactive Tutorial System: Multi-step guided tours with progress tracking
- Comprehensive Testing: Vitest with React Testing Library for all components and API routes
- SEO Infrastructure: Structured data, page-specific configurations, and comprehensive meta tags
API Architecture
The application uses a clean API layer pattern:
- RESTful endpoints for each workout type (
/api/workouts,/api/hyroxworkouts,/api/hyroxgeneric) - Feedback collection with Notion integration
- Comprehensive test coverage for all endpoints
Key Implementation Decisions
Why Genetic Algorithms?
For HYROX workouts, simple random generation wasn’t sufficient. We needed to create workouts that:
- Match specific target times (e.g., 60 minutes for a standard race simulation)
- Balance exercise intensity and recovery
- Respect equipment constraints and exercise variety
Genetic algorithms allowed us to evolve workout configurations over multiple generations, selecting for fitness scores that balance time accuracy, exercise distribution, and training effectiveness.
Progressive Enhancement
The app works without JavaScript (for basic functionality) but enhances the experience with client-side interactivity. Forms use React Hook Form with Zod validation for robust error handling.
User Onboarding
We implemented multiple layers of user education:
- Quick Start Guides: Collapsible educational content for new users
- Interactive Tutorials: Step-by-step tours of each feature
- Help Tooltips: Context-sensitive help with click-to-pin functionality
This layered approach helps users of all experience levels get value from the app quickly.
Performance & SEO
Using Next.js 15’s App Router, we achieved:
- Fast initial page loads with React Server Components
- Optimal SEO with server-side rendering and structured data
- Progressive enhancement for JavaScript-disabled users
- Type-safe development with TypeScript across the stack
The comprehensive SEO infrastructure includes page-specific configurations, structured data markup, and automatic sitemap generation.
What We Learned
1. Optimization is Complex
Implementing genetic algorithms taught us that workout generation is a multi-objective optimization problem. Balancing time constraints, exercise variety, and training effectiveness required careful fitness function design and parameter tuning.
2. User Education Matters
Early beta testers struggled with some advanced features. Investing in comprehensive tutorials and help systems significantly improved user engagement and feature adoption.
3. TypeScript Everywhere
Strict TypeScript across components, API routes, and utilities caught numerous bugs during development and made refactoring safer. The investment in proper type definitions paid dividends.
4. Testing API Routes is Critical
Next.js API routes are easy to write but require discipline to test properly. Using node-mocks-http and Vitest, we achieved comprehensive coverage that caught integration issues early.
Try It Out
Iron Volume is live and free to use. Whether you’re training for HYROX, looking for varied HIIT workouts, or just want to mix up your fitness routine, give it a try at ironvolume.com.
The project is open source, and we welcome contributions and feedback. We’re continuously adding new features, exercises, and workout types based on user input.
Future Plans
We’re exploring several enhancements:
- Progressive overload tracking and workout history
- Additional workout formats (Tabata, ladder workouts, partner WODs)
- Exercise video demonstrations
- Mobile app versions
- Integration with fitness tracking platforms
Building Iron Volume has been a fantastic learning experience in modern web development, algorithm optimization, and user experience design. We hope it helps athletes train smarter and more effectively.
Ready to generate your next workout? Get started or reach out if you have questions or feedback!