The visible feature was only the surface
Local gyms often track members, payments, attendance, and outstanding balances through paper records or staff memory. That makes daily work slow and allows financial history, access boundaries, and membership state to become ambiguous.
The system also had to respect concrete constraints. Membership accounting must distinguish expired coverage from actual debt instead of inventing fees when a member stops attending. Platform operators, gym administrators, staff, and members require different permissions with strict organization isolation. The product must support English and Bangla, Bangladeshi taka, Asia/Dhaka dates, phone-first workflows, and future Android delivery. Payment and attendance retries must remain idempotent so unreliable connections cannot create duplicate financial or operational records.
My role covered client product architecture and full-stack engineering, with responsibility for multi-tenant operations, billing rules, authentication, localization, and cross-platform delivery.
I turned the constraints into boundaries
Expo Router and React Native provide a shared responsive interface, Convex owns realtime gym-scoped data and transactional commands, Better Auth manages sessions, and explicit domain services preserve billing and membership invariants.
Coverage expires without creating a new charge; a recorded return creates the next payable period, preserving the difference between inactivity and money owed.
Protected reads and commands resolve access grants inside Convex rather than trusting role or organization choices made by the interface.
Payment and attendance commands use stable command identities and uniqueness rules so retrying a request cannot duplicate a transaction or daily check-in.
The web-first release and planned Android client reuse product behavior while platform-specific capabilities remain explicit and independently verifiable.
The key decision: Model prepaid coverage instead of automatic monthly debt.
The implementation had to prove the model
I delivered the work across the full path: Designed the gym, member, access, invitation, attendance, offer, payment, and audit domain boundaries. Implemented bilingual, role-aware operational flows for dashboards, member records, attendance, billing, receipts, settings, and administration. Built the Better Auth and Convex authorization path, invitation lifecycle, account-attempt budget, and gym-scoped backend commands. Established domain, authentication, and backend integration tests around the highest-risk financial and access rules.
The result is concrete: Gym staff can replace fragmented paper tracking with one member, payment, and attendance ledger. Prepaid coverage, outstanding balances, partial payments, offers, and reversals retain explicit financial meaning. Organization and role boundaries are enforced by the backend rather than inferred from navigation state. The same product foundation supports responsive web use now and Android validation as a separate release step.
The senior engineering lesson was that solving the visible workflow is only half the job. The architecture must also make constraints, failure modes, evidence, and ownership explicit enough for the next change to remain safe.
