Back to projects
2026Full Stack, Frontend Engineer & Product Designer

Zona Fit — Gym Operations Platform & React 19 UI/UX Refactoring

Full-stack gym operations platform in Django REST, MySQL 8.4, and React 19: WCAG AA redesign (5.14:1), 888-line payment monolith split, focus-preserving ID kiosk, and 0 React Compiler / oxlint warnings.

  • React 19
  • Vite 8
  • Tailwind CSS 4
  • React Router 7
  • Axios
  • Django REST Framework
  • MySQL 8.4
  • Docker
  • Nginx
Architecture diagram of Zona Fit combining React 19 Compiler (0 warnings), WCAG AA 5.14:1 UI primitives, focus-safe ID kiosk, Django REST Framework, and MySQL 8.4

Problem

Zona Fit runs daily gym operations across four role-based profiles (Admin, Reception, Trainers, and Members), spanning two contrasting environments inside a single frontend: high-pressure front-desk cash register workflows and an entrance Kiosk for rapid ID check-ins alongside the mobile member portal.

While the Django REST Framework and MySQL 8.4 backend already enforced strict transactional guarantees (SELECT ... FOR UPDATE locks, idempotent payments, refund audit logs, and soft deletes), an initial frontend audit surfaced four major bottlenecks:

  • Visual inconsistency & WCAG AA failures: five conflicting primary button styles across views, failing primary-button contrast (#10b981 on white = 2.54:1 vs. the 4.5:1 AA floor), a noisy 6-color dashboard where real expiration alerts blended into static metrics, `<html lang="en">` on a Spanish app, disabled mobile pinch-zoom (user-scalable=no), and 5 modals missing role="dialog", Escape handling, and htmlFor bindings.
  • Front-desk & Kiosk friction: expired staff sessions on the kiosk went unnoticed until a member check-in failed with 401; disabling the input during API lookups dropped browser focus after every check-in; creating a new member closed the modal without offering immediate first-membership payment.
  • Underused REST API endpoints: the UI ignored three ready backend resources (/api/attendance/today/, /api/accounts/users/options/, and /api/payments/transactions/).
  • React technical debt: PagosPage.jsx held 888 lines in a single monolith; ClientesPage.jsx and EmpleadosPage.jsx duplicated ~85% of their logic (720 lines); paginated search lacked AbortController, and 9 warnings remained active under oxlint / React 19 Compiler.

Architecture and decisions

Guided by a strict “Operational Clarity” design principle—color communicates actionable state, never decoration—the entire frontend was redesigned and refactored without touching backend contracts and with zero new external dependencies (package.json unchanged).

Unified accessible Design System & zero-dependency primitives

  • WCAG AA restrained palette: neutral canvas (#F8FAFC), crisp 1px borders (#E2E8F0), dark navigation shell (#0F172A), and a single accessible institutional accent in deep emerald (#047857, 5.14:1 contrast ratio with white).
  • Tabular precision & custom UI primitives: properly loaded Plus Jakarta Sans and JetBrains Mono with tabular-nums across clocks, cash totals, and receipt codes. Built custom Button, accessible Modal (role="dialog", aria-modal, Escape, scroll lock), async ConfirmModal, Badge, PageHeader, TableSkeleton, and a lightweight aria-live="polite" ToastProvider.

High-velocity front-desk flows powered by 100% of the REST API

  • Actionable KPI Dashboard: replaced 6 multicolored cards with 4 quiet dark-ink KPIs; only Expiring in 7 days shifts to amber when action is required, deep-linking straight to pre-filtered subscriptions. Added a zero-dependency 7-day attendance bar chart backed by GET /api/attendance/today/.
  • Modular Cash Register & printable receipts: broke the 888-line monolith into 5 focused modules (PaymentModal, ReceiptModal, RefundModal, TransactionsTab, and page container), adding live member autocomplete (/api/accounts/users/options/), auditable transaction/refund history (/api/payments/transactions/), and a dedicated @media print receipt layout for printing or PDF export.
  • Continuous Sign-Up → Payment & hands-free Kiosk: merged Members and Staff into a shared UserDirectory featuring a direct Create & collect payment action. Upgraded the Kiosk with a proactive reception-session status bar, numeric keypad (inputMode="numeric"), and permanent focus retention via readOnly (instead of disabled) plus requestAnimationFrame.
// React 19 Compiler-compliant derived loading state paired with AbortController
const requestKey = `${page}:${debouncedQuery}:${statusFilter}`;
const loading = loadedKey !== requestKey;

Challenges

  • React 19 Compiler compliance & async race conditions: replacing synchronous setLoading(true) calls inside useEffect with derived request-key loading (loading = loadedKey !== requestKey) and AbortController eliminated race conditions, prevented jarring table layout shifts while filtering, and split context modules (auth-context.js, toast-context.js) for clean Fast Refresh.
  • Real-world front-desk ergonomics: keeping continuous barcode/keyboard input focus intact across rapid consecutive ID check-ins and shaving 4 repetitive clicks from member onboarding-to-payment without changing the Docker + Nginx + MySQL 8.4 backend.

Outcomes

  • Verified WCAG AA accessibility: raised primary-button contrast from 2.54:1 to 5.14:1, fixed document language/mobile zoom, and upgraded all 5 modals with full keyboard and ARIA semantics.
  • Zero-warning production build: dropped oxlint / React 19 Compiler diagnostics from 9 warnings to 0 warnings / 0 errors across 39 files; production vite build completes in 403 ms (8.63 kB CSS gzip, 130.02 kB JS gzip) with 0 added dependencies.
  • Modular codebase & 100% API utilization: split the 888-line payments monolith into 5 specialized modules, eliminated ~85% duplication (720 lines) via a unified directory, and surfaced weekly attendance trends, auditable cash history, live autocomplete, and printable PDF receipts.

A full walkthrough covering the Dashboard, Cash Register/Receipts, Onboarding-to-Payment, and ID Kiosk is available via the Video demo link in the header and sidebar. Proprietary codebase reserved for commercial SaaS/licensing.