TrainUP Featured
In production · paying customerJun 2026 – present · co-founder · private repo0.2 shipped Oct 28, 2026 · 0 rollbacks
A multi-tenant gym management SaaS: memberships, bookings, payments, athlete progress metrics, and admin and platform consoles. One installation serves many independent gyms.
| Measure | Value | Context |
|---|---|---|
| Member accounts | 100 | with the member role |
| Bookings | 2,600+ | since Aug 18, 2026 |
| Bookings in October | 1,100+ | dated October 2026, including those already scheduled for Oct 29–31 |
| Members who booked in October | 96/100 | at least one booking each |
| Approved payments | 233 | since launch |
| Tests in CI | 628 | full 0.2.2 suite, required on every PR with gitleaks |
| Rollbacks in the 0.2 release | 0 | three releases on Oct 28, 2026 |
| Measured in September 2026 | ||
| Active members | 101 | of 117 registered |
| Revenue submitted in-app | 97% | of September revenue (Pago Móvil) rather than cash |
| Peak-hour capacity | 15 → 20 | per slot (+33%), raised by the gym using the live occupancy view |
| Deploy scenarios | 26 | automated; pass on macOS and an Ubuntu replica of the server |
From founding to the 0.2 release
- Jun 2026Co-founded; the platform is built by a two-person team.
- Aug 16, 2026In production with its first customer, a gym, on a 30-day free trial.
- Sep 17, 2026The gym becomes a paying customer.
- Oct 28, 2026Version 0.2 ships in three releases, with 0 rollbacks.
Demo gym · synthetic data
Before

After

What I built
- Public landing page
- Member (client) module
- Progress-metrics module
- Payments module (member + admin flows)
- Super-admin console
- Booking engine
- Security remediation
- Release/deploy system
- All of 0.2: redesign, member feed, check-in, goals, waitlist
My co-founder built the remaining modules and helped polish mine.
Live demo on request
TrainUP runs in production with a real customer, so I don't publish shared logins. If you'd like to explore it, I'll send you temporary demo access with sample data, usually within 24 hours.
Mobile-first. It looks best on a phone.
- commit on main
- DB backup
- new release dir
- migrate (expand)
- switch symlink
- health probe: exact version
- live, zero downtimeauto-rollback
Read the 0.2 release case study (Oct 2026)
The problem
On a phone the member app was dense. Across 176 screenshots of the demo app (44 screens at 360, 390, 768 and 1280 px) there were 2,706 text elements under 12 px and 96 inputs under 16 px, which iOS zooms into. Some states contradicted each other, such as a Pending badge over an Inactive membership.
My hypothesis was that outside booking or paying, a member had no reason to open the app. That is a hypothesis, not a measurement; how I would test it is under “What I would measure next”.
What shipped in 0.2
Redesign
- The member app, the gym admin panel and the super-admin console, rebuilt on a design system documented in
DESIGN.md. - Color tokens per gym, generated on the server from each gym’s theme; derived secondary text stays at 4.5:1 contrast or more.
- One accessible component kit on Reka UI: dialogs trap focus, close on Escape and carry dialog semantics everywhere they are used.
Member feed
- Built on the server in one service (
MemberFeedService); the page only renders it. - One prioritized alert: membership expiring or expired, a waitlist spot obtained, or a holiday within 7 days.
- The next class with its real occupancy and a calendar file (
.ics, RFC 5545). - Weekly streak and month calendar, checked against independent SQL on real data.
- “Repeat your week” re-books last week’s slots through the real booking path, one by one.
- A monthly summary page, and renewal with the current plan preselected.
Per-gym features
- Each gym turns features on in
gyms.features. Off means the routes return 404 and the interface is hidden; the data is kept. - QR check-in: the code rotates every 15 s, is HMAC-signed and works once.
- Goals: the coach sets them, the member only reads them, and progress is never green or red, because “down” is progress for some goals and not others.
- Waitlist with automatic assignment: when someone cancels, the first member who can still book gets the spot, a bell notification and an email.
- All three are on at the paying gym.
| Measure | Before → after | Scope |
|---|---|---|
| Text under 12 px | 2,706, After: 0 | 176 screenshots, 44 screens × 4 widths |
| Inputs under 16 px | 96, After: 0 | same screenshots |
| Touch targets under 44 px, member app | 140, After: 8 | member and sign-in screens; the 8 left are inline legal links |
| Touch targets under 44 px, admin panel | 670, After: 94 | left: inline links, color swatches, the occupancy day strip |
| Horizontal scroll | 0, After: 0 | none before either; still none at 360 px |
Demo gym · synthetic data
Before

After

Demo gym · synthetic data
Streak and calendar

Coach-set goals

Monthly summary

Decisions and trade-offs
The waitlist rehearses the real booking
Joining runs the real book() inside a transaction that always rolls back, and accepts only a “slot full” failure.
- Why
- Membership, one booking per day, holidays, profile restrictions and the 2-hour rule live in one place. A second copy of those rules would drift.
- Cost
- Each join takes the same row locks as a booking, for the length of that rolled-back transaction.
Feature flags per tenant
Check-in, goals and the waitlist ship off for every gym and are turned on gym by gym.
- Why
- One installation serves many gyms; a new feature reaches the paying gym only when that gym is ready.
- Cost
- Check-in also needs a global flag, and its routes are cached at deploy time, so changing that flag takes a deploy.
Migrations only add
The five schema changes of 0.2 add three tables and two nullable columns; none renames or drops anything.
- Why
- The previous release keeps working on the new schema, so a code rollback never needs a database rollback.
- Cost
- Removing anything old waits for a later release.
Goals are read-only and neutral
Coaches set goals; members read them. Progress has no green or red.
- Why
- It is the rule TrainUP already applies to body metrics: losing centimeters is progress for one member and a setback for another.
- Cost
- Members can’t set or edit their own goals.
The feed is computed on the server
One PHP service decides what the home screen shows, and its rules are covered by PHPUnit tests.
- Why
- One place for the rules, next to the data and the booking code it reuses.
- Cost
- It runs on every request and has no cache. I haven’t measured its cost at more than one gym.
Bugs and root causes
| Symptom | Root cause | Fix |
|---|---|---|
| Two members could take the last spot. | lockForUpdate() ran without DB::transaction, so the lock was released at once. | Booking runs in one transaction that locks the member, then the slot, before counting. |
| The 2-hour cancellation rule didn’t hold for early classes, and a same-day special class couldn’t be cancelled. | startOfDay() on a mutable Carbon moved “now” to midnight before the comparison. | The rule is measured from the class start, and no shared date is mutated. |
| Check-in rejected members created by the admin. | It required a role those accounts don’t have, and the tests created that role, which hid the bug. | A member is anyone who isn’t an admin or super-admin, as in the rest of the app; tested with a role-less member. |
| A past date could be booked with a hand-made request. | The booking service didn’t reject dates in the past. | It rejects them now. |
The cache table grew without limit. | With the database cache store, every check-in code left a row forever. | An hourly job prunes expired rows. |
| Renew in one tap didn’t preselect the plan (0.2.1). | The feed read the plan from a relation eager-loaded with only some columns, without is_active, so the plan always looked inactive. | The service now loads the full plan; tested through the real HTTP request. |
| “No camera found” on phones with a camera (0.2.2). | See the postmortem. | See the postmortem. |
Before the release, an independent code review found 10 more issues; all 10 were fixed with a test.
Shipping to a live customer
- Verified backups in three places: on the server, in private object storage and as an offline copy.
- Rehearsal: a production dump restored into a throwaway MySQL 8 database, with a database user that had no access to the real one. Migrate, roll back, migrate;
CHECKSUM TABLEidentical. - A CRC fingerprint of every row of the paying gym, before and after: identical.
- Atomic switch to the new release; the health check proves PHP serves the new release, not a cached old one.
- Automatic rollback if that check fails. Needed 0 times across 0.2.0, 0.2.1 and 0.2.2.
Within minutes, members were booking on the new version, and a new member signed up and paid.
Postmortem: “No camera found”
- Symptom
- After check-in was turned on, the scanner said “No camera found” on phones that have a camera.
- Cause
- The browser fixes the
Permissions-Policywhen a page loads. The page had loaded while the camera was still blocked, and Inertia only reloads when the asset version changes, not when configuration does. The QR library reports any failure as “no camera found”, which hid the real reason. - Fix
- 0.2.2 puts the check-in flag into the Inertia version, so the next navigation after a change reloads the page, and the scanner now names the real reason: reload needed, permission denied or camera busy.
- Verification
- Reproduced before and after the fix in Chromium.
What I would measure next
- Whether the feed moves renewals: the renewal rate at the same gym before and after 0.2. With one gym and seasonality, that can show a change, not prove a cause.
- Real use of the waitlist: how many entries are promoted and how many skipped, and why.
- Check-in: how many scans fail on an expired code, to tune the grace window.
Open question: many gyms
The feed is computed on every request. Before adding gyms I would measure its cost per request, then choose between caching each member’s feed in the database and invalidating it on booking or check-in, or building it in queued jobs. I haven’t needed either yet, and I don’t know which wins.
Known gaps
- Backfill of 99 legacy memberships with no gym id: pending.
- The admin can’t see each slot’s waitlist yet, and the list doesn’t advance when an account is deleted or a slot’s capacity is raised.
- 0.3.0 (open-access gyms) is in review, not deployed.
How I built it
All of 0.2 is mine, built with Claude Code from my specs: I wrote the requirements, business rules and done criteria, reviewed every plan and PR, and every change to the production server needed my explicit OK.
Read the platform case study (Jun–Sep 2026)
Multi-tenant architecture
- One installation serves many independent gyms.
- The tenant is resolved from the URL slug (
/{gym}), with subdomain fallback. - A shared
BelongsToGymmodel trait applies a global scope and auto-fills the tenant id. - Three privilege layers: platform super-admin, gym admin/coach, member.
- Business logic lives in service classes and authorization in policies.
Booking engine
- Per-slot capacity set by each gym.
- Each booking runs in one database transaction that locks the member and then the slot (
lockForUpdate), so two members can’t take the last spot. Until 0.2.0 the lock ran outside a transaction and did nothing; that bug is in the 0.2 case study. - Cancellation with at least 2 hours’ notice (measured from the class start since 0.2.0), gym holidays, and profile-based slot restrictions configured per gym.
- Color-coded live occupancy. The gym used that view to spot its peak hours and raise capacity from 15 to 20 in those slots.
Payments
- Four methods: Pago Móvil, Zelle, Binance and cash.
- Online payments stay pending until an admin approves them; receipt uploads with file validation.
- Real-time USD/VES conversion using the official BCV exchange rate, and configurable late fees.
- 97% of September revenue was submitted in-app (Pago Móvil) rather than in cash.
Progress metrics and super-admin console
- Coaches and admins record body metrics; members get read-only history with month-over-month comparison.
- The super-admin console handles the gym (tenant) lifecycle, subscription tiers and trials, audited impersonation of a gym's real admin, and a platform activity log.
Operations
- DigitalOcean VPS with Nginx behind Cloudflare, plus Cloudflare Turnstile bot protection.
- Payment receipts stored in S3-compatible object storage (DigitalOcean Spaces).
- Daily database backups with rotation and an off-site copy. The restore path was verified end-to-end by restoring a real backup into a scratch database and matching table checksums.
- Error tracking with Sentry plus deduplicated alerts.
- A
/healthendpoint that returns 503 when the database is down, so uptime monitors can detect degradation.
Security remediation
- I ran a 9-report security/architecture audit of the codebase with Claude Code (subagents and skills), then fixed every critical finding myself.
- The 4 critical classes: a cross-tenant authorization flaw (admins of one gym could reach another gym's admin panel); a globally shared login/registration rate limit that allowed a trivial denial of service (now per email+IP and per IP, verified behind Cloudflare, including IPv6); exposure of members' body metrics to other members; and a database credential committed to git history (rotated, history cleaned).
- Also added gitleaks secret scanning on every PR plus a weekly full-history scan, and removed default admin passwords.
- The suite reached 451 PHPUnit tests running in GitHub Actions (Sep 2026); 628 by 0.2.2.
Deploy system (trainup-deploy)
- Replaced a manual script with release directories and an atomic symlink switch.
- A database backup before every deploy.
- A health check that confirms PHP is serving the exact new version.
- Automatic rollback on failure; only commits already on
maincan be deployed. - Backward-compatible migrations (expand, then contract).
- 26 automated scenarios pass on macOS and on an Ubuntu replica of the server.
- Rehearsed against a copy of production before the first real run.
- The first production release under it (the security release) shipped with zero downtime.
StackLaravel 13 · PHP 8.4 · Vue 3 (Composition API) + Inertia.js · Tailwind CSS · Reka UI · MySQL · SQLite (tests) · Vite · database-backed queues with Supervisor workers · transactional email · Chart.js









