Original Idea
Fitness Program Builder A web app for coaches to drag-and-drop workouts and publish a client mobile view.
Product Requirements Document (PRD): FitForge Pro
1. Executive Summary
FitForge Pro is a next-generation SaaS platform designed to bridge the gap between fitness coaches and their clients. It replaces fragmented workflows—spreadsheets, PDFs, and messaging apps—with a unified, high-performance web and mobile experience. Coaches can build complex, periodized programs using an intuitive drag-and-drop interface, while clients receive a mobile-optimized logging experience that works even in low-connectivity gym environments.
2. Problem Statement
Fitness coaches currently waste hours every week manually updating spreadsheets and chasing client data across multiple platforms. This fragmentation leads to:
- Administrative Burnout: Coaches spend more time on data entry than actual coaching.
- Client Attrition: Poor user experience and lack of structured tracking lead to decreased motivation and higher churn.
- Data Silos: Client progress is difficult to visualize over long periods, making it hard to prove the value of the coaching service.
3. Goals & Success Metrics
- Efficiency: Reduce the average time to build a 4-week program from 2 hours to under 20 minutes.
- Retention: Increase client retention by 25% through professionalized program delivery and progress visualization.
- Performance: Achieve 60+ FPS during drag-and-drop interactions and <100ms latency for workout logging.
- Adoption: Target 85% of assigned workouts to be logged via the platform.
4. User Personas
4.1. Coach Chris (The Online Trainer)
- Need: Wants to scale his business by managing 50+ clients without losing personal touch.
- Pain Point: Struggles with managing template libraries and individualizing them for clients.
4.2. Gym Owner Sarah (The Studio Owner)
- Need: Needs a centralized hub for her coaching staff to ensure consistent programming quality.
- Pain Point: Client data is "owned" by individual trainers rather than the studio.
4.3. Client Alex (The Dedicated Athlete)
- Need: A seamless, distraction-free way to see today's workout and log PRs.
- Pain Point: "Gym Wi-Fi" causes most apps to fail or lose data during a set.
5. User Stories
- As a Coach, I want to drag exercises from a global library into a timeline so I can build routines quickly.
- As a Coach, I want to save "Supersets" as reusable blocks to reduce repetitive data entry.
- As a Client, I want to log my sets while offline so that my workout isn't interrupted by poor gym connectivity.
- As a Client, I want to see a video demonstration of a movement so I can ensure proper form.
- As a Coach, I want to receive a notification when a client hits a New PR so I can celebrate their progress.
6. Functional Requirements
6.1. Program Builder (Web-Only)
- Drag-and-Drop Interface: Multi-level nesting (Program > Week > Workout > Exercise > Set).
- Library Management: Searchable exercise library with 500+ default movements and custom video upload.
- Relative Scheduling: Ability to build programs using "Day 1, Day 2" logic before assigning to a calendar.
6.2. Client Mobile View (Web App)
- Daily Dashboard: Clear view of the current day's scheduled workout.
- Workout Logger: Input fields for weight, reps, RPE, and rest timers.
- Rest Timer: Automatic countdown between sets with audio cues.
6.3. Communication & Analytics
- Progress Charts: Volume, 1RM, and bodyweight tracking over time.
- Real-time Sync: Coaches can "Watch Live" as clients log their workouts via WebSockets.
7. Technical Requirements
7.1. Tech Stack (2026 Standards)
- Frontend: Next.js v16.1.3 (Using Turbopack,
proxy.ts, and Cache Components for PPR). - Backend: NestJS v11.1.12 (Express 5 integration, Node.js 20+ runtime).
- ORM: Prisma v7.2.0 (Wasm-based query engine, Rust-free runtime).
- Auth: Clerk (Organization-based multi-tenancy for isolation).
- Database: PostgreSQL (AWS RDS) with Table Partitioning for logs.
7.2. Critical Libraries & Integrations
- Drag-and-Drop:
dnd-kitv7+ with "Skinny Wrapper" pattern for high-performance sorting. - Video Delivery: Mux with Signed URLs (JWT-based security) and
MuxPlayerfor ABR streaming. - State/Sync: TanStack Query v5 with Mutation Scopes for serialized offline queuing.
- Wearables: Terra API for bridging Apple HealthKit and Google Health Connect data.
8. Data Model
8.1. Entities
- Organization: Represents a coaching business.
- Program (Template): Relative-dated blueprint (
day_offset). - AssignedProgram: Instance of a program mapped to a user and a
start_date. - WorkoutLog: Records the actual execution, utilizing a JSONB column for prescribed vs. actual attribute overrides.
- Exercise: Global movement metadata including Mux
playback_id.
9. API Specification (Sample Endpoints)
POST /api/v1/programs
- Description: Creates a new program template.
- Payload:
{ title: string, description: string, days: WorkoutTemplate[] } - Response:
201 Createdwith Program object.
GET /api/v1/video/token/:playbackId
- Description: Generates a short-lived Mux Signed URL for secure video playback.
- Response:
{ token: string }
PATCH /api/v1/logs/:logId
- Description: Updates a specific set log. Supports optimistic updates via client-generated UUIDs.
10. UI/UX Requirements
- Coach Desktop: Three-pane layout. Left: Library. Center: Timeline/Builder. Right: Exercise Properties.
- Client Mobile: Bottom-navigation focused. Large touch targets (min 44px) for sweaty fingers.
- Optimistic UI: Sets should turn "Green" immediately upon check-off, even before server confirmation.
- Skeleton Screens: Used during initial load of video content and exercise libraries.
11. Non-Functional Requirements
- Performance: Drag-and-drop must remain at 120fps on modern displays.
- Security: Role-Based Access Control (RBAC). Coaches cannot see data from other Organizations.
- Accessibility: Full keyboard navigation for the builder (Alt + Arrow Keys for nesting).
- Offline Support: Persist mutation queue to IndexedDB using
persistQueryClient.
12. Out of Scope
- Nutritional meal planning (Phase 2).
- Automated AI-generated workouts (Phase 2).
- Native iOS/Android apps (Launch as PWA first).
13. Risks & Mitigations
- Risk: Data loss during gym Wi-Fi "dead zones."
- Mitigation: Implement TanStack Query Mutation Scopes to queue logs and retry indefinitely until a 200 OK is received.
- Risk: High video streaming costs.
- Mitigation: Use Mux's adaptive bitrate streaming and restrict "Signed URL" generation to active paying clients only.
14. Implementation Tasks
Phase 1: Core Architecture & Auth
- [ ] Initialize Next.js v16.1.3 project with Turbopack enabled.
- [ ] Set up NestJS v11.1.12 backend with Express 5.
- [ ] Configure Clerk Organization-based multi-tenancy.
- [ ] Initialize Prisma v7.2.0 with Wasm client and PostgreSQL schema.
Phase 2: Drag-and-Drop Builder
- [ ] Implement
dnd-kitSortable context for Workout Blocks. - [ ] Create "Skinny Wrapper" components to prevent re-render lag during drag.
- [ ] Build the Relative-Date logic for Program Templates.
- [ ] Implement Mux Signed URL generation in Next.js API Routes.
Phase 3: Mobile Logging & Offline Sync
- [ ] Build mobile-optimized Workout Player UI.
- [ ] Configure TanStack Query with
persistQueryClientfor IndexedDB. - [ ] Implement Mutation Scopes for serialized set-logging.
- [ ] Integrate WebSockets for live coach "Observation Mode."
Phase 4: Wearables & Analytics
- [ ] Integrate Terra API for HealthKit/Google Fit syncing.
- [ ] Build Progress Visualization charts using Recharts/Visx.
- [ ] Finalize "New PR" notification trigger logic.