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!

Project Tasks

No tasks generated yet.

Tasks will appear here as requirements are defined.

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