mega-gym

bymeet hirpara

# Gym Management & Fitness App — Full Specification / Build Prompt Use this document as the prompt when building the app (with Claude Code, Cursor, or any AI coding tool). Copy the whole thing in, or paste sections one at a time. --- ## 1. App Overview Build a full-featured gym management and personal fitness app with two user roles: - **Admin / Gym Owner** — manages members, subscriptions, payments, trainers, equipment. - **Member / User** — tracks own subscription, workouts, weight, meals, and progress. --- ## 2. Core Modules ### A. Member & Subscription Management - Member profile: name, phone, email, photo, join date, gym plan. - Subscription plan types: Monthly / Quarterly / Half-Yearly / Yearly. - **Payment status**: Paid / Pending / Overdue — with amount and date paid. - **Days left counter**: auto-calculates remaining days on membership, shows warning when < 7 days left. - Auto-renewal reminders (push notification / SMS / email 3 days before expiry). - Payment history log (all past transactions, invoices downloadable as PDF). - Admin dashboard: total active members, expiring this week, revenue this month. ### B. Body & Weight Tracking - Log daily/weekly weight entries with date. - Goal setting: target weight (gain or lose), target date. - Auto-calculates: - Weight to gain/lose (current vs goal). - Recommended weekly rate (safe: 0.25–0.5 kg/week). - Progress % toward goal. - Graph/chart of weight trend over time (line chart). - BMI calculator (height + weight). - Body measurements (chest, waist, arms, thighs) — optional tracking. ### C. Workout / Exercise Planner - Weekly workout split (e.g., Push/Pull/Legs, or custom). - Each exercise: name, sets, reps, weight used, rest time. - Daily "workout of the day" screen with checkboxes to mark completed. - Exercise library with instructions/GIFs (chest, back, legs, arms, core, cardio). - Progress tracking: log weight lifted per exercise over time (strength progress chart). - Rest day scheduling. - Option: auto-generate a workout plan based on goal (gain muscle / lose fat / maintain) and days available per week. ### D. Meal & Nutrition Optimization - Daily calorie target calculated from: age, gender, height, weight, activity level, goal (using BMR + TDEE formula, e.g. Mifflin-St Jeor). - Macro breakdown target: Protein / Fat / Carbs (grams + %). - Meal plan suggestions based on goal (bulk / cut / maintain) and diet type (veg / non-veg / vegan). - **Photo-to-meal recognition**: user takes a photo of their food → app identifies the food and estimates: - Calories - Protein (g) - Fat (g) - Carbs (g) - Portion size (approx.) - User can confirm/edit the detected meal before logging it. - Daily meal log with running total vs daily target (progress bar for calories, protein, fat, carbs). - Water intake tracker. ### E. Progress & Analytics Dashboard - Weekly/monthly summary: workouts completed, avg calories, weight change. - Charts: weight over time, calories vs target, protein intake trend. - Streak tracker (consecutive days logged / worked out). - Achievement badges (e.g., "7-day streak", "Lost 2kg", "100 workouts logged"). ### F. Notifications & Reminders - Subscription expiry reminders. - Meal logging reminders. - Workout reminders. - Water intake reminders. ### G. In-App Subscription Payment (Member Side) - Member can pay their subscription bill directly inside the app — no need to pay at the front desk. - "Pay Now" button on the member's subscription page, shown clearly when a bill is due or overdue. - Payment methods: Card / UPI / Net Banking / Wallet (via Razorpay or Stripe checkout). - After successful payment: - Subscription auto-extends (days-left counter updates instantly). - Payment status changes from Pending/Overdue → Paid. - Auto-generated invoice/receipt (PDF) sent to member's email and viewable in-app. - Payment history tab: list of all past payments with date, amount, method, status. - Auto-retry / reminder if a payment fails. - Admin side sees payment come in live on the dashboard (no manual entry needed). ### H. Admin Panel (Gym Owner Side) - Add/edit/remove members and trainers. - Assign trainers to members. - Equipment inventory & maintenance log. - Revenue reports (daily/monthly/yearly). - Attendance tracking (check-in/check-out via QR code or manual). --- ## 3. UI / Design Requirements The app must feel clean, modern, and trustworthy — not cluttered like a spreadsheet. Guidelines to give the builder: - **Layout**: card-based design — each section (subscription status, weight progress, today's workout, today's meals) is its own clean card on the dashboard, not long lists. - **Color scheme**: 1 primary brand color (e.g., a strong blue or green for "active/healthy" feeling) + neutral grays + one accent color for alerts (red/orange for "subscription expiring" or "overdue"). - **Typography**: one clean sans-serif font (e.g., Inter or Poppins), clear size hierarchy (big numbers for stats like "Days Left: 5" or "Calories: 1450/2000"). - **Progress visuals**: circular progress rings for daily calories/macros (like a fitness-ring style), horizontal progress bars for goal weight and workout streaks. - **Navigation**: simple sidebar (desktop) / bottom nav bar (mobile view) with icons — Dashboard, Subscription, Workouts, Meals, Progress, Profile. - **Subscription/payment page**: the "Pay Now" button should be impossible to miss — large, colored, top of the page when a bill is due. - **Empty/loading states**: friendly placeholders (e.g., "No meals logged yet — snap a photo to get started") instead of blank screens. - **Mobile-first responsive**: since gym members will mostly use it on their phone browser, design mobile layout first, then scale up to desktop for the admin dashboard. - **Dark mode**: optional but nice — many fitness apps default to dark theme for the "gym at night" feel. Tell the AI coding tool something like: *"Use Tailwind CSS with a card-based, mobile-first layout, one primary color, circular progress rings for macros, and make the Pay Now button prominent when a payment is due."* --- ## 4. Suggested Data Fields (Database Structure) **Users table**: id, name, email, phone, photo, height, weight, age, gender, goal, activity_level, join_date **Subscriptions table**: id, user_id, plan_type, start_date, end_date, amount, payment_status, days_left (calculated) **WeightLogs table**: id, user_id, date, weight_kg **Workouts table**: id, user_id, date, exercise_name, sets, reps, weight_used **Meals table**: id, user_id, date, photo_url, food_name, calories, protein_g, fat_g, carbs_g, portion **Payments table**: id, user_id, amount, date, method, invoice_id --- ## 5. Photo-to-Meal — How It Works (Technical) 1. User uploads/takes photo. 2. Photo sent to a food-recognition API (options below). 3. API returns food name + estimated nutrition data. 4. App shows result to user for confirmation/edit. 5. Confirmed entry saved to Meals table and added to daily totals. **Recommended APIs for food recognition:** - **LogMeal API** — purpose-built for food image recognition + nutrition estimation. - **Google Cloud Vision API** — general image labeling, then map result to a nutrition database. - **Edamam Food Database API** — nutrition data lookup once food name is known (pair with a vision API). - **CalorieMama API** — food recognition + calorie estimation, gym/fitness app focused. --- ## 6. Recommended Tools & Tech Stack (Website) | Layer | Recommended Tool | |---|---| | Frontend (member + admin, one website) | **Next.js (React)** | | Styling | **Tailwind CSS** (for the clean, card-based UI in section 3) | | Backend + Database + Auth + Storage | **Supabase** (Postgres DB, login/signup, file storage — all in one) | | Food photo recognition | **LogMeal API** or **CalorieMama API** | | Charts/graphs | **Recharts** | | In-app subscription payment | **Razorpay** (India) or **Stripe** (international) — Checkout embedded directly in the site | | Email receipts/reminders | **Resend** or **Supabase + SendGrid** | | Hosting | **Vercel** (connects directly to GitHub, free tier to start) | ### Fastest path for a solo builder **Next.js + Tailwind + Supabase + Razorpay/Stripe + LogMeal API** — everything runs through one website, no separate backend server needed, deploys free on Vercel. ### If you want to build it by chatting with an AI coding tool Use **Claude Code** (desktop app or terminal) — paste this whole spec in as the first prompt, then build module by module (start with member/subscription management, then weight tracking, then in-app payment, then meal photo scanning last since it needs the external API key). --- ## 7. Suggested Build Order 1. Member + subscription management (core, no AI needed). 2. Clean UI shell — dashboard layout, cards, navigation (get the look right early). 3. In-app subscription payment (Razorpay/Stripe checkout + auto-extend days-left). 4. Weight tracking + goal calculator. 5. Workout planner + logging. 6. Meal logging (manual entry first). 7. Photo-to-meal AI recognition (adds LogMeal/CalorieMama API). 8. Notifications, admin panel, revenue reports.

LandingAdmin DashboardAuthenticationSubscription & PaymentProgress & Analytics
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 5

Mega-Gym System Requirements Document

1. Introduction

The Mega-Gym project aims to develop a comprehensive gym management and personal fitness application. This application will cater to both gym owners and members, providing tools for managing gym operations and tracking personal fitness goals.

2. System Overview

Page 2 of 5

2a. Product Interpretation and Delivery Boundary

  • Domain Descriptors:

    • Gym Management: The app provides tools for managing gym operations, including member and subscription management.
    • Personal Fitness Tracking: The app allows users to track workouts, body metrics, and nutrition.
  • What is being built:

    • A standalone gym management and personal fitness tracking application with custom UI.
    • The application will include features such as member management, subscription handling, workout planning, nutrition tracking, and analytics.
  • Excluded Assumptions:

    • Generic enterprise features not specified in the source.
    • Unspecified third-party integrations.
  • Access:

    • Application-owned identity with persistent identity continuity.
  • Behavior Contracts:

    • Manage Member Profiles: Admin manages member details through an internal dashboard.
    • Track Workouts: Members log workout sessions and track progress.
    • In-App Subscription Payment: Members pay for subscriptions directly in the app.
    • Track Body Metrics and Weight Goals: Members log body metrics and set weight goals.
    • Optimize Meal Plans and Track Nutrition: Members log meals and track nutrition intake.
    • Summarize Progress and Analytics: Members view progress summaries and analytics.
    • Send Reminders and Notifications: System sends reminders for various events.
Page 3 of 5

2c. Page Content and Component Coverage

  • Admin Dashboard:

    • Manage members, subscriptions, payments, trainers, and equipment.
    • View revenue reports and attendance tracking.
  • Subscription & Payment Page:

    • View subscription status, payment history, and pay bills.
    • Prominent "Pay Now" button for due payments.
  • Workout Planner:

    • Plan, log, and track workouts and exercises.
    • Access exercise library and progress tracking.
  • Body & Weight Tracker:

    • Log weight, set goals, and track body measurements.
    • View progress charts and BMI calculations.
  • Meal & Nutrition Tracker:

    • Log meals, use photo-to-meal recognition, and track nutrition.
    • View daily meal logs and nutrition summaries.
  • Progress & Analytics:

    • View progress summaries, analytics, streaks, and achievements.
  • Landing Page:

    • Public entry for new members and gym owners.
  • Authentication Page:

    • Shared application access surface for identity management.
Page 4 of 5

Accepted Structured Planning Boundary

This block is generated from the validated planning contract and is authoritative for downstream flow, design, architecture, and task coverage.

  • Product intent: A comprehensive gym management and personal fitness app.

  • Domain descriptor domain-82c160ec4ce0b8a3: Gym Management; confidence 0.90; rationale: The app provides tools for managing gym operations, including member and subscription management.; sources: req-2a06a7116ea770b7; req-7a6f8f14bbaf600a.

  • Domain descriptor domain-f1b6af5099f2c47c: Personal Fitness Tracking; confidence 0.90; rationale: The app allows users to track workouts, body metrics, and nutrition.; sources: req-fdd33eee16b6baf3; req-847234adefb46750; req-3160102b7547bac4.

  • Excluded assumptions: Generic enterprise features not specified in the source.; Unspecified third-party integrations..

  • Delivery shape: first-party custom UI; background automation; generated documents; application-owned identity.

  • Delivery rationale: The app is a standalone product with custom UI for gym management and fitness tracking.

  • Delivery sources: req-b78123ad1493a6dc; req-2992fb6daa35fc72.

Accepted Page Manifest (ordered)

  1. Admin Dashboard — provenance required_inference; semantic role unspecified; horizon current; actors: Admin / Gym Owner; behavior IDs: behavior-fc241c0106192529.
  2. Subscription & Payment — provenance required_inference; semantic role unspecified; horizon current; actors: Member / User; behavior IDs: behavior-ebf7e38450fee7aa.
  3. Workout Planner — provenance required_inference; semantic role unspecified; horizon current; actors: Member / User; behavior IDs: behavior-b55ed0733472c5f6.
  4. Body & Weight Tracker — provenance required_inference; semantic role unspecified; horizon current; actors: Member / User; behavior IDs: behavior-7682590e0c96f4e2.
  5. Meal & Nutrition Tracker — provenance required_inference; semantic role unspecified; horizon current; actors: Member / User; behavior IDs: behavior-70e8259e623fc8de.
  6. Progress & Analytics — provenance required_inference; semantic role unspecified; horizon current; actors: Member / User; behavior IDs: behavior-8b9aec0bf114d622.
  7. Landing — provenance required_inference; semantic role public_entry_surface; horizon current; actors: None stated; behavior IDs: None stated.
  8. Authentication — provenance required_inference; semantic role identity_access_surface; horizon current; actors: None stated; behavior IDs: None stated.

Accepted Persona Manifest

  • Admin / Gym Owner — provenance explicit; horizon unspecified; rationale: Manages members, subscriptions, payments, trainers, and equipment.
  • Member / User — provenance explicit; horizon unspecified; rationale: Tracks own subscription, workouts, weight, meals, and progress.
Page 5 of 5

Accepted Behavior Contracts

behavior-fc241c0106192529 — Manage Member Profiles
  • Actor: Admin / Gym Owner
  • Trigger: Admin accesses member management section.
  • Inputs: Member details
  • Observable outcomes: Member profiles updated
  • Persisted state changes: Member profile data.
  • State lifetime: durable
  • Identity continuity: persistent
  • Audience entry: internal
  • Owning surfaces/processes: Admin Dashboard (custom_page, application access).
  • Access owner/state: application
  • Human touchpoints: Admin dashboard.
  • External recipients: None stated.
  • Material failure/manual-review outcome: Profile update fails.
  • Provenance: explicit
  • Source references: req-2a06a7116ea770b7; req-7a6f8f14bbaf600a; req-b78123ad1493a6dc; req-2992fb6daa35fc72.
behavior-b55ed0733472c5f6 — Track Workouts
  • Actor: Member / User
  • Trigger: User logs a workout session.
  • Inputs: Workout details
  • Observable outcomes: Workout logged
  • Persisted state changes: Workout log data.
  • State lifetime: durable
  • Identity continuity: persistent
  • Audience entry: public
  • Owning surfaces/processes: Workout Planner (custom_page, application access).
  • Access owner/state: application
  • Human touchpoints: User dashboard.
  • External recipients: None stated.
  • Material failure/manual-review outcome: Workout log fails.
  • Provenance: explicit
  • Source references: req-847234adefb46750; req-b78123ad1493a6dc; req-2992fb6daa35fc72; req-d25cdb6ed0f758c4.
behavior-ebf7e38450fee7aa — In-App Subscription Payment
  • Actor: Member / User
  • Trigger: User initiates payment for subscription.
  • Inputs: Payment details
  • Observable outcomes: Subscription payment processed
  • Persisted state changes: Subscription status.
  • State lifetime: durable
  • Identity continuity: persistent
  • Audience entry: public
  • Owning surfaces/processes: Subscription & Payment (custom_page, application access).
  • Access owner/state: application
  • Human touchpoints: Payment page.
  • External recipients: None stated.
  • Material failure/manual-review outcome: Payment fails.
  • Provenance: explicit
  • Source references: req-3d10de4478e6d1e3; req-ab7582da848f7d79; req-b78123ad1493a6dc; req-2992fb6daa35fc72.
behavior-7682590e0c96f4e2 — Track Body Metrics and Weight Goals
  • Actor: Member / User
  • Trigger: User logs or updates body metrics or weight goal.
  • Inputs: Weight entry; Body measurements; Target weight; Target date; Height
  • Observable outcomes: Body metrics and weight goal recorded; Progress toward goal calculated; BMI calculated; Progress chart updated
  • Persisted state changes: Body metrics log; Weight goal data; Progress statistics.
  • State lifetime: durable
  • Identity continuity: persistent
  • **
Landing design preview
Landing: view public entry
Authentication: admin logs in
Admin Dashboard: admin accesses member management section and submits member details
Admin Dashboard: Process: member profile update processed
Admin Dashboard: Process: member profiles updated
Admin Dashboard: Failure: profile update fails
Landing design preview
Landing: view public entry
Authentication: admin logs in
Admin Dashboard: admin accesses member management section and submits member details
Admin Dashboard: Process: member profile update processed
Admin Dashboard: Process: member profiles updated
Admin Dashboard: Failure: profile update fails