← Back to Portfolio Music Events Calendar →

๐Ÿ’ช Muscle Mania

ASP.NET Core (.NET 10) • Expo / React Native • Workout & Body Recomposition Tracker

Live on the web, with iOS and Android builds from the same codebase

Open Muscle Mania →

Quick Navigation

โœจ Feature Demonstrations

12-Week Program Engine

Muscle Mania runs a training program week by week instead of just recording workouts. Each person is enrolled on a Monday, and the program week (1 to 12) decides the phase rules. Every day's workout opens with sets, effort targets, last time's numbers, a progression target and warm-ups already worked out.
ASP.NET Core C# Rules Engine EF Core Expo Router

Phase Rules

  1. Weeks 1โ€“2: 2 sets at 3โ€“4 reps in reserve (RIR)
  2. Weeks 3โ€“4: the listed sets at 2โ€“3 RIR
  3. Weeks 5โ€“12: 1โ€“2 RIR, with a final isolation set near failure allowed in weeks 9โ€“12
  4. Double progression suggests the next weight or rep target from what was logged last time
  5. Warm-up ramps go to the day's first compound lift, unless the plan sets them per exercise
People can choose between built-in workout styles, build their own plans (a copy of a style, a blank week, or a copy of a friend's plan) and even switch mid-block. A block plan keeps the template each date was planned with, so earlier weeks' check-ins and completed weeks stay exactly as they were after a switch.

Weekly Mix & Exercise Randomizer

To keep training fresh without breaking the plan, each week adds a twist to the lift days (a superset or two, a drop set, and on one day most weeks a one-rep-max attempt), and any exercise can be swapped for a sensible alternative at random.
Seeded Randomness Weighted Selection Exercise Taxonomy

How the Randomizer Chooses

  1. The replacement trains the same main muscle and is the same kind of exercise: compound for compound, isolation for isolation, hold for hold
  2. It must move in much the same way, and never brings in a supporting muscle from the other half of the body
  3. Candidates matching the original's one-sidedness, or its bodyweight vs. loaded style, are twice as likely
  4. Each extra supporting muscle a candidate adds halves its chance
The weekly mix is random but stable: it is seeded by the block, week and weekday, so the same day always opens the same way, and each decision draws from its own stream, so adding a new exercise doesn't reshuffle the rest. A lift that had a max attempt recently isn't maxed again the next week.

Offline-First Workout Logging

Gyms often have bad signal, so workouts are logged on the device first. The active session lives on the phone and syncs when it can, and a persisted outbox makes sure no set is ever lost.
AsyncStorage TanStack Query NetInfo Idempotent REST

Outbox Flow

  1. Every queued write is idempotent: a PUT by an ID made on the device, or a DELETE, so retrying is always safe
  2. A newer write with the same key replaces or merges into the queued one, so only the latest state is sent
  3. Writes are sent in order, stopping at the first one that can't reach the server yet
  4. Flushing runs on reconnect, on returning to the foreground, and every 30 seconds
  5. Screens show which entries are "saved on this phone" until they reach the server
The server accepts a finished workout through an idempotent PUT /api/sessions/{id}. Even a caption with blocked language is dropped rather than rejected, so a workout saved offline can never fail to sync because of its caption.

Nutrition, Body & Health Tracking

Beyond lifting, the app tracks food, weight, waist and other measurements, progress photos, steps, sleep, cardio and creatine. Starting nutrition targets are calculated for a recomposition, and Apple Health or Health Connect data is imported automatically.
Apple HealthKit Health Connect Cloudflare R2 Image Manipulation

Targets & Imports

  1. Maintenance calories from Mifflin-St Jeor × activity, minus a small deficit
  2. Protein about 1 g per lb, fat about 0.36 g per lb, carbs fill the rest
  3. When the app opens, the last 14 days of steps, sleep and weigh-ins are imported from the phone's health app
  4. Values typed in by hand always win over imported ones, and weigh-ins are de-duplicated by sample ID
  5. Progress photos are stored in Cloudflare R2 and can be compared side by side
For a 26-year-old, 180 lb, 5'10" moderately active person, the calculator lands exactly on the program's 2,300 kcal and 180 g protein, which is the check that keeps the formula honest.

Scored Weekly Check-Ins

Each week ends with a check-in scored from what was actually logged: one item per training day plus four habits. From week 3, it also gives advice on adjusting calories.
Rules Engine Weekly Aggregates Push Notifications

Habit Items

  1. Hit the protein target on at least 6 days
  2. Stayed near the calorie target: the average of logged days within tolerance, with most days logged
  3. Met the step and cardio goal: average steps at or above the goal, plus two cardio sessions of 20+ minutes
  4. Averaged at least 7 hours of sleep over the logged nights
  5. "Following the plan" means about three-quarters of the checklist (6 of 8 for the upper/lower plan)
Calorie advice uses weekly averages only, never a single weigh-in, so a salty dinner or a water-weight swing doesn't trigger a change.

Friends-Only Social, Leaderboards & Moderation

Friends can follow each other's training through a feed, copy each other's plans and compete on leaderboards. Body data (weight, measurements, photos and food) is never shared.
Social Graph Epley 1RM Content Moderation Resend Email

Fair Rankings

  1. Leaderboards rank only things that are fair across body sizes: checklist adherence, workouts, PRs, and strength gained relative to your own start
  2. Adherence is ranked by the share completed, since checklists differ in length by workout style
  3. Strength gain is the average percent change in each exercise's best estimated one-rep max (Epley) between a baseline window and a recent one
  4. Absolute volume is deliberately not ranked
  5. Members can report and block; the owner is alerted right away so reports are handled within a day, as App Store guideline 1.2 requires
Feed summaries are stored in kilograms and each viewer's app formats them in their own unit. Posts use the service clock, so seeded or backdated activity appears at the right time.

๐Ÿ“‹ Professional Summary

Full-Stack Fitness Platform โ€” .NET 10 / PostgreSQL / Expo Muscle Mania is a workout tracker built around running a 12-week body recomposition program, not just logging sets. It runs the program week by week, logs lifts offline, tracks food, weight, measurements, photos, steps, sleep and cardio, scores a weekly check-in, and lets friends follow each other's training. One Expo codebase serves iOS, Android and the web.

The backend is an ASP.NET Core API on .NET 10 with EF Core and PostgreSQL. It holds the domain logic: phase rules, double-progression prescriptions, a seeded weekly mix, a constraint-based exercise randomizer, check-in scoring, nutrition target calculation and fair leaderboards. Integrations include Cloudflare R2 for photos, Resend for email and Expo push notifications, and the API is deployed with Docker on Railway.

The mobile app uses Expo SDK 57, React Native 0.86 and React 19 with Expo Router and TanStack Query, with a persisted outbox for offline-first logging and Apple Health / Health Connect imports. More than 120 xUnit tests cover rules, auth, training, tracking, social features and a security audit, run against a real PostgreSQL database.

๐ŸŽฏ Most Marketable Skills

Backend & Domain Logic

  • ASP.NET Core on .NET 10
  • EF Core 10 with PostgreSQL
  • Rules engines for programs and check-ins
  • Seeded, stable randomization
  • JWT auth with BCrypt hashing

Mobile & Offline

  • Expo SDK 57 / React Native 0.86
  • Offline-first outbox with idempotent sync
  • TanStack Query with a persisted cache
  • HealthKit and Health Connect imports
  • iOS, Android and web from one codebase

Product & Social

  • Friends-only feed and plan sharing
  • Leaderboards fair across body sizes
  • Reporting, blocking and owner tools
  • Push reminders and email
  • Privacy by design (body data never shared)

Quality & Operations

  • 120+ xUnit tests on real PostgreSQL
  • Security audit test suite
  • Docker deployment on Railway
  • Cloudflare R2 object storage
  • EAS builds for the app stores

๐Ÿ—๏ธ Architecture

Mobile & Web App

  • Expo Router (file-based)
  • Today, Train, Food, Progress, Friends tabs
  • Onboarding and plan builder
  • Photo compare and charts
  • Owner admin screens

Data & Sync

  • TanStack Query (persisted)
  • Offline outbox
  • NetInfo reconnect flushing
  • Health app import
  • Secure token storage

API

  • Account and auth
  • Training (sessions, plans)
  • Tracking (food, body, activity)
  • Social (feed, friends, boards)
  • Admin and moderation

Domain Rules

  • ProgramRules and BlockPlan
  • PrescriptionService
  • WeeklyMix and ExerciseRandomizer
  • CheckInRules and TargetCalculator
  • PrRules (Epley 1RM)

Infrastructure

  • PostgreSQL via EF Core
  • Cloudflare R2 (photos)
  • Resend (email)
  • Expo Push
  • Docker on Railway

๐Ÿ† Key Achievements

๐Ÿ“ถ

Never Loses a Set

An idempotent, ordered outbox keeps workouts safe through dead gym connections and syncs them automatically when the phone is back online.

๐Ÿ—“๏ธ

Program, Not Just a Log

Phase rules, double progression, warm-ups and a seeded weekly mix turn a 12-week plan into a ready-to-go workout every day.

๐ŸŽฒ

Smart Exercise Swaps

A constraint-based randomizer swaps in exercises that train the same muscle the same way, weighted toward the closest matches.

โš–๏ธ

Fair Leaderboards

Friends compete on adherence, PRs and strength gained relative to their own start, so bigger lifters don't win by default.

โค๏ธ

Health Integrations

Steps, sleep and weigh-ins import from Apple Health and Health Connect, without ever overwriting values entered by hand.

๐Ÿงช

Tested on Real PostgreSQL

More than 120 integration tests, including a security audit, run against a real PostgreSQL database that is recreated on each run.

โš™๏ธ Full Tech Stack

C# / .NET 10 ASP.NET Core EF Core 10 PostgreSQL JWT Authentication BCrypt Swagger xUnit Expo SDK 57 React Native 0.86 React 19 TypeScript Expo Router TanStack Query Reanimated 4 Apple HealthKit Health Connect Expo Push Cloudflare R2 Resend Docker Railway EAS Build
← Back to Portfolio