01
Dual-role authentication and session lifecycle
Manager dashboards and member portals maintain independent authentication lifecycles with distinct token sets and cookie scopes. Refresh tokens are stored in HttpOnly cookies, while Edge middleware verifies access without incurring database roundtrips.
02
Edge-level token renewal and route protection
Authentication verification and background token refreshes are handled in Edge middleware using lightweight Web Crypto standards (jose). This avoids database overhead on protected page requests while preventing session interruptions.
03
Decoupled biometric device integration
Biometric hardware interactions are isolated behind dedicated RESTful ingestion endpoints supporting both single check-ins and offline batch synchronizations, decoupling physical hardware constraints from internal business rules.
04
Server-enforced subscription state machine
Membership renewal and validation logic are strictly enforced on the server. Active subscriptions block premature renewal, preventing duplicate subscriptions and race conditions during concurrent access.
05
Multi-model workout builder architecture
Workout planning supports both structured relational data (days, exercises, progressive overload targets) and direct file attachments (PDF/images), providing flexibility for coaches while preserving clean database normalization.