Case Study
Workout Builder
A seven-day workout planner with a searchable exercise library, custom exercises, editable sets and reps, browser persistence and approximately 90% test coverage.

Overview
Workout Builder is a React 19 application for creating a complete weekly exercise routine in the browser. Users can search the built-in exercise library, create their own exercises, assign them to any day of the week and customise the number of sets and repetitions. Both the exercise library and weekly plan persist between sessions without requiring an account.
Challenge
The main challenge was keeping seven independent daily plans, a customisable exercise library and editable workout values synchronised through one interface. Updates needed to affect only the selected day or exercise while remaining predictable, responsive and persistent after the browser was closed.
Architecture
The application uses React state to manage the exercise library and a weekly object containing an exercise array for each day. Functional state updates create new arrays and objects when exercises are assigned, edited or removed. Lazy state initialisers restore the saved library and weekly plan from localStorage, while separate effects save both collections whenever they change. The interface is divided into focused ExerciseList and Planner components.
Testing
The project has 22 passing Jest and React Testing Library tests across four test suites. They cover the default exercise data, component rendering, empty states, search and category filtering, custom exercise creation and deletion, day assignment, exercise removal, sets and reps updates, weekly exercise counts and localStorage persistence. The current report shows 89.85% statement coverage and 93.65% line coverage, with 100% statement coverage across the Planner and ExerciseList components. GitHub Actions runs the complete Jest coverage suite for pushes and pull requests.
Features
- Seven-day workout planning
- Searchable built-in exercise library
- First-letter exercise filtering
- Custom exercise creation and deletion
- Exercise assignment to individual days
- Editable sets and repetitions
- Automatic weekly exercise count
- Empty-state guidance for every day
- Weekly plan persistence with localStorage
- Custom exercise persistence with localStorage
- Responsive one, three and seven-column planner layouts
- 22 Jest and React Testing Library tests
- Approximately 90% statement coverage
- Automated test coverage checks with GitHub Actions
Tech Stack
React 19JavaScriptViteTailwind CSS 4localStorageJestReact Testing LibraryTesting Library User EventGitHub ActionsNetlify