{"id":8066,"date":"2026-08-03T22:27:35","date_gmt":"2026-08-03T22:27:35","guid":{"rendered":"https:\/\/robertjwallace.com\/?p=8066"},"modified":"2026-08-03T22:27:36","modified_gmt":"2026-08-03T22:27:36","slug":"creating-my-personal-fitness-weight-training-app","status":"publish","type":"post","link":"https:\/\/robertjwallace.com\/es\/creating-my-personal-fitness-weight-training-app\/","title":{"rendered":"Creating my personal fitness\/weight training app"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Introducci\u00f3n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ok, I hate Google Play store.  I hate apps that don&#8217;t do quite what I want, and then are filled with ads.  So my solution has been to create my own phone apps, and create them in a manner that avoids the Google play store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My basic strategy to accomplish this is the following.  First I decide if the app needs to keep track of information in a way that is best suited by using a database.  This includes if the app needs to keep track of users.  If it does then I build the app as a WordPress plugin.  If it doesn&#8217;t need that, then I simply build the app as a web page.  In both cases the web page is created as a Progressive Web App (PWA), which is simply a fancy way to say it can be installed on your phone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now before you panic, let me explain a couple of things.  I say I &#8220;build&#8221; the app, but that isn&#8217;t actually true.  I let Claude.ai build it for me.  As an explanation, here is a personal fitness tracking app that Claude coded for me.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">The Fitness App<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I started by using Google Gemini to write the AI prompt for the app.  I knew I wanted to keep track of my past workouts, and to be able to add exercises so I needed a database.  Since I have a WordPress site already, I could use that site as the database engine.  Anyone can go to WordPress.com and create a site very easily, with the cost only $48 per year for a site that lets you install plugins.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The prompt<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Build a custom, lightweight WordPress plugin that provides a mobile-first, touch-only workout tracking application.\n---\n### 1. WORDPRESS ARCHITECTURE &amp; DATABASE SPECIFICATIONS\n- Delivery Method: A self-contained WordPress plugin.\n- Shortcode Integration: Registers a shortcode `&#91;workout_tracker]` to render the app on any front-end page or post.\n- User Context: Restrict tracking to logged-in WordPress users. Use `get_current_user_id()` to tie all stored workouts to the logged-in account.\n- Database Schema: On plugin activation (`register_activation_hook`), create two custom database tables via `dbDelta`:\n  1. `wp_workout_sessions`: Logs overall sessions (`id`, `user_id`, `routine_type`, `date_completed`).\n  2. `wp_workout_set_logs`: Logs set details (`id`, `session_id`, `user_id`, `exercise_name`, `set_number`, `reps`, `weight`, `created_at`).\n---\n### 2. CORE INTERFACE &amp; TOUCH CONSTRAINTS\n- Strict Input Rule: Zero native text\/number inputs that trigger the mobile soft keyboard. All adjustments for weight, reps, sets, and navigation must use touch-friendly UI components (steppers, quick-select pills, and custom touch keypads).\n- Front-End Rendering: Deliver clean HTML\/CSS\/JS via REST API or `wp_ajax` calls to maintain a fast, single-page application (SPA) feel inside the WordPress theme frame.\n---\n### 3. ROUTINES &amp; HISTORICAL PRE-FILL LOGIC\nPre-populate the plugin with 3 core routines (Push, Pull, Legs):\n- Push Day: Barbell Bench Press, Overhead Shoulder Press, Incline Dumbbell Press, Tricep Rope Pushdowns, Lateral Raises\n- Pull Day: Conventional Deadlift, Lat Pulldowns, Bent-Over Barbell Rows, Dumbbell Bicep Curls, Face Pulls\n- Leg Day: Barbell Back Squats, Romanian Deadlifts, Leg Press, Hamstring Curls, Standing Calf Raises\n#### Auto-Populate Historical Performance (Key Feature):\nWhen a user selects a routine (e.g., \"Push Day\"):\n1. The app queries the database for the *most recent completed session* of that exact routine for the current user.\n2. For each exercise, the weight and reps default to what was successfully logged during that last session.\n3. If no historical data exists for an exercise, default to sensible baseline numbers (e.g., Weight: 45 lbs \/ Reps: 10).\n---\n### 4. USER INTERFACE &amp; SCREEN FLOW\n#### Screen 1: Routine Selection (Home)\n- Shows 3 large, touch-friendly cards: **&#91; PUSH DAY ]**, **&#91; PULL DAY ]**, **&#91; LEG DAY ]**.\n- Displays a brief subtitle on each card showing the last completed date (e.g., \"Last completed: Oct 14\").\n#### Screen 2: Routine Overview List\n- Header displaying routine name and date indicator (\"Today's Workout\").\n- List of target exercises with visual status indicators (e.g., \"3 of 3 sets completed\").\n- Main action button at bottom: **&#91; FINISH &amp; SAVE WORKOUT ]**.\n#### Screen 3: Touch Logger Screen (Per Exercise)\n- Header: Exercise Name.\n- Historical Reference Note: A small subtle badge showing previous performance (e.g., \"Last session: 185 lbs x 8 reps\").\n- Set Management: `&#91; + Add Set ]` and `&#91; - Remove Set ]` touch buttons.\n- Set-by-Set Logging Cards:\n  * **Weight Stepper Controls:** `&#91;-10]` `&#91;-2.5]` **&#91; 185 lbs ]** `&#91;+2.5]` `&#91;+10]`\n  * **Reps Stepper &amp; Quick Pills:** `&#91;-1]` **&#91; 8 reps ]** `&#91;+1]` alongside quick-select pills (`&#91; 5 ]`, `&#91; 8 ]`, `&#91; 10 ]`, `&#91; 12 ]`).\n  * **Touch Keypad Modal Option:** Tapping the weight display opens a custom 3x4 touch-number overlay for fast manual adjustments.\n  * **Set Complete Toggle:** A prominent `&#91; LOG SET ]` button that toggles to green when checked.\n---\n### 5. DATA SAVING &amp; HISTORY REVIEW\n- Saving: Tapping \"Finish &amp; Save Workout\" packages all completed sets and sends them to the WordPress REST API endpoint (`\/wp-json\/workout-tracker\/v1\/save-session`), inserting records into the custom DB tables.\n- Workout History Tab: Provide a secondary tab or modal where users can view a chronological list of past workouts grouped by date, showing total volume and individual set breakdowns.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This was only the starting point.  I copy and pasted this into Claude (which I think is better at codeing).  Claude took this and created a WordPress plugin file for me.  A WordPress plugin file is simply a zip file that you upload to your wordpress site to install.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I installed it and noticed some things that I missed.  The app showed up as a wordpress page, not as a stand-alone mobile progressive web app.  I also was missing a settings page for setting up my workouts and exercises.  I asked Claude to resolve these issues and it did, providing me with a new zip file to install.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lastly I asked it to modify the plugin so it could use my phones biometics to log in, and also made some minor formatting tweaks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All of this took about an hour and a half.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Progressive web apps are a great way to make your own mobile apps.  Once the plug in was installed I simply had to open Chrome on my phone and go to the WordPress page that had the app.  Chrome asked me if I wanted to install it on my phone and I said yes.  I now have the app icon on my phone.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"452\" height=\"990\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-3.png\" alt=\"\" class=\"wp-image-8079 lazyload\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/990;width:339px;height:auto\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-3-452x600.png 452w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-3-137x300.png 137w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-3-5x12.png 5w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"452\" height=\"990\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-4.png\" alt=\"\" class=\"wp-image-8080 lazyload\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/990;width:331px;height:auto\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-4-452x600.png 452w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-4-137x300.png 137w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-4-5x12.png 5w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Clicking on the app launches it. <br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"333\" height=\"261\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-5.png\" alt=\"\" class=\"wp-image-8081 lazyload\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-5.png 333w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-5-300x235.png 300w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-5-15x12.png 15w\" data-sizes=\"(max-width: 333px) 100vw, 333px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 333px; --smush-placeholder-aspect-ratio: 333\/261;\"><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"452\" height=\"990\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-6.png\" alt=\"\" class=\"wp-image-8082 lazyload\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/990;width:349px;height:auto\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-6-452x600.png 452w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-6-137x300.png 137w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-6-5x12.png 5w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To add\/modify the workouts I login to my WordPress site as an Admin, and go to the plugin&#8217;s setting page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"600\" height=\"828\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-7.png\" alt=\"\" class=\"wp-image-8083 lazyload\" style=\"--smush-placeholder-width: 600px; --smush-placeholder-aspect-ratio: 600\/828;width:482px;height:auto\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-7-600x600.png 600w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-7-217x300.png 217w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-7-9x12.png 9w\" data-sizes=\"(max-width: 600px) 100vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then whenever I start I workout I select the type of workout in the app and see the exercises I have set.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"452\" height=\"990\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-8.png\" alt=\"\" class=\"wp-image-8085 lazyload\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/990;width:327px;height:auto\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-8-452x600.png 452w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-8-137x300.png 137w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-8-5x12.png 5w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One of the features I like is that it doesn&#8217;t use the phone keyboard at all.  All data entry is done with touch.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"452\" height=\"990\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-9.png\" alt=\"\" class=\"wp-image-8086 lazyload\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/990;aspect-ratio:0.45657301754722407;width:319px;height:auto\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-9-452x600.png 452w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-9-137x300.png 137w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2026\/08\/image-9-5x12.png 5w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To create something like this you don&#8217;t need to be a software engineer, although it helps to think like one. In this case it also helps to have the most basic understanding of how to use WordPress, at least how to set up a blank site and install plugins.  You also need to know how to write good AI prompts. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also had Google Gemini check Claude&#8217;s code and it found a couple of minor issues. I copied these issues and pasted them into Claude so Claude could check and fix them.  None of the issues prevented the app from working, but did have some potential security issues.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction Ok, I hate Google Play store. I hate apps that don&#8217;t do quite what I want, and then are filled with ads. So my solution has been to create my own phone apps, and create them in a manner that avoids the Google play store. My basic strategy to accomplish this is the following. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/robertjwallace.com\/es\/creating-my-personal-fitness-weight-training-app\/\" class=\"more-link\">Continuar leyendo<span class=\"screen-reader-text\"> &#8220;Creating my personal fitness\/weight training app&#8221;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_eb_attr":"","footnotes":""},"categories":[171,192,143,1],"tags":[],"class_list":["post-8066","post","type-post","status-publish","format-standard","hentry","category-ai","category-android-app","category-computer-stuff","category-miscellaneous"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Bob","author_link":"https:\/\/robertjwallace.com\/es\/author\/admin\/"},"_links":{"self":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/8066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/comments?post=8066"}],"version-history":[{"count":2,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/8066\/revisions"}],"predecessor-version":[{"id":8088,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/8066\/revisions\/8088"}],"wp:attachment":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/media?parent=8066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/categories?post=8066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/tags?post=8066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}