Skip to main content

Platform Overview

JCV Fitness combines intelligent personalization, comprehensive exercise and nutrition databases, and modern subscription management into a seamless fitness platform. Here’s everything you need to know about what makes JCV Fitness powerful.
All features are built with Next.js 16, React 19, and TypeScript, ensuring a fast, type-safe, and modern user experience.

Core Features

Interactive Workout Wizard

9-step personalization engine for creating custom fitness plans

Meal Planning System

Personalized nutrition plans with food exchange tables

Subscription Management

Multi-tier pricing with MercadoPago payment integration

Exercise Library

100+ exercises with form videos and alternatives

Secure Authentication

Supabase-powered auth with magic links and row-level security

PDF Generation

Downloadable plans with personalized watermarks

Interactive Workout Wizard

Our signature 9-step wizard collects comprehensive information to generate truly personalized fitness programs.

How It Works

The wizard is built with Zustand for state management, ensuring smooth transitions and data persistence:
// Wizard state is managed with Zustand
import { useWizardStore } from '@/features/wizard/store/wizard-store';

const { 
  currentStep,
  level,
  goal, 
  timeAvailable,
  equipment,
  setLevel,
  nextStep,
  prevStep 
} = useWizardStore();

Step Breakdown

1

Step 1: Training Level

Purpose: Determines exercise complexity and progression speedOptions:
  • Principiante (Beginner) - < 3 months experience
  • Básico (Basic) - 3-6 months experience
  • Intermedio (Intermediate) - 6-18 months experience
  • Avanzado (Advanced) - 2+ years experience
  • Elite - 4+ years competitive experience
Impact on Plan:
  • Beginners get simpler exercises with detailed form cues
  • Advanced users get complex compound movements and periodization
  • Elite athletes receive sport-specific programming
2

Step 2: Training Goal

Purpose: Defines program structure and exercise selectionEight specialized goals:
  • 🔥 Quemar Grasa - Fat loss with metabolic conditioning
  • 💪 Ganar Musculo - Hypertrophy focus with progressive overload
  • Tonificar - Body recomposition and definition
  • 🏃 Resistencia - Cardiovascular endurance and stamina
  • 🧘 Flexibilidad - Mobility and injury prevention
  • 🏋️ Fuerza Pura - Powerlifting-style strength training
  • Más Energía - General fitness and vitality
  • ❤️ Salud General - Holistic health and wellness
Impact on Plan:
  • Fat loss gets HIIT and circuit training
  • Muscle gain gets 8-12 rep ranges with higher volume
  • Strength gets 1-5 rep ranges with longer rest periods
3

Step 3: Time Availability

Purpose: Creates realistic training schedulesOptions:
  • 2-3 days/week - Full body splits
  • 4-5 days/week - Upper/lower or push/pull/legs
  • 6-7 days/week - Body part splits or specialized programs
Impact on Plan:
  • Lower frequency gets more exercises per session
  • Higher frequency allows targeted muscle group focus
  • Rest days are strategically placed for recovery
4

Step 4: Equipment Access

Purpose: Ensures all exercises are performableOptions:
  • Casa (Home) - Bodyweight, bands, dumbbells
  • Gimnasio (Gym) - Full equipment access
  • Ambos (Both) - Hybrid programming
Impact on Plan:
  • Home plans use progressive calisthenics
  • Gym plans leverage barbells and machines
  • Hybrid plans offer location flexibility
5

Step 5: Workout Duration

Purpose: Fits training into your scheduleOptions:
  • 20-30 minutes - Condensed, efficient workouts
  • 45-60 minutes - Standard training sessions
  • 60-90 minutes - Extended, high-volume training
Impact on Plan:
  • Shorter sessions use supersets and circuits
  • Longer sessions allow traditional straight sets
  • Warm-up and cool-down scale with duration
6

Step 6: Body Measurements

Purpose: Calculates nutritional needs and tracks progressCollected data:
  • Age (affects metabolism calculations)
  • Current weight (in kg)
  • Height (in cm)
  • Target weight (optional)
  • Body fat percentage (optional)
Impact on Plan:
  • Determines caloric needs using Harris-Benedict equation
  • Influences macronutrient ratios
  • Establishes baseline for progress tracking
7

Step 7: Exercise Preferences

Purpose: Personalizes exercise selectionFeatures:
  • Browse 100+ exercise library
  • Mark exercises to avoid (injuries/limitations)
  • Star favorite exercises to prioritize
  • Filter by muscle group and equipment
Impact on Plan:
  • Avoided exercises are never included
  • Favorites appear more frequently
  • Alternatives are provided for variety
8

Step 8: Food Preferences

Purpose: Creates enjoyable, sustainable meal plansCollected information:
  • Dietary restrictions (vegetarian, vegan, pescatarian, etc.)
  • Allergies and intolerances
  • Disliked foods to exclude
  • Meal frequency preference (3-6 meals/day)
  • Cooking time availability
Impact on Plan:
  • Only includes foods you can and will eat
  • Respects ethical/religious dietary choices
  • Adjusts meal timing to your schedule
9

Step 9: Review Summary

Purpose: Final verification before plan generationShows:
  • All selections from previous steps
  • Estimated plan characteristics
  • Option to edit any previous step
  • Plan generation confirmation
Action:
  • Saves wizard data to wizard_data table
  • Generates personalized plan
  • Redirects to subscription selection

Technical Implementation

The wizard uses modern React patterns for optimal performance:
// Each step is a separate component
export function StepLevel() {
  const { level, setLevel, nextStep, canProceed } = useWizardStore();

  const handleSelect = (value: TrainingLevel) => {
    setLevel(value);
  };

  return (
    <div className="space-y-6">
      <div className="text-center mb-8">
        <h2 className="text-2xl md:text-3xl font-bold text-white mb-2">
          ¿Cuál es tu nivel de entrenamiento?
        </h2>
        <p className="text-gray-400">
          Selecciona el nivel que mejor describe tu experiencia actual
        </p>
      </div>
      {/* Option cards */}
      <NavigationButtons
        onNext={nextStep}
        canProceed={canProceed()}
        isFirstStep
      />
    </div>
  );
}

Meal Planning System

Personalized nutrition plans are generated based on your body measurements, goals, and food preferences.

Components

Daily Meal Plans

Structured meals for breakfast, lunch, dinner, and snacks

Food Exchange Tables

Swap foods within categories while maintaining macros

Macro Breakdown

Protein, carbs, fats, and calorie targets

Portion Guidance

Exact measurements for each food item

Meal Plan Structure

Meal plans are organized by phase and day:
// Meal plan data structure
import { mealPlanPhase1 } from '@/features/meal-plan/data/meal-plan-phase1';

{
  phase: 1,
  name: "Fase de Adaptación",
  duration: "Semanas 1-4",
  description: "Establecer hábitos alimenticios saludables",
  macros: {
    calories: 2000,
    protein: 150,
    carbs: 200,
    fats: 65
  },
  meals: [
    {
      time: "7:00 AM",
      name: "Desayuno",
      foods: [...],
      calories: 450,
      protein: 35,
      carbs: 45,
      fats: 15
    },
    // ... more meals
  ]
}

Food Exchange System

Users can substitute foods within the same category:
// Food exchange groups
import { foodExchanges } from '@/features/meal-plan/data/food-exchanges';

{
  category: "Proteínas",
  exchanges: [
    { food: "Pechuga de pollo", amount: "100g", protein: 31, carbs: 0, fats: 3.6 },
    { food: "Pescado blanco", amount: "100g", protein: 20, carbs: 0, fats: 1.5 },
    { food: "Huevos enteros", amount: "2 unidades", protein: 13, carbs: 1, fats: 10 },
    // ... more exchanges
  ]
}
Food exchanges maintain equivalent macronutrient profiles, allowing meal variety without recalculating your entire plan.

Subscription System

Flexible multi-tier subscription model with secure payment processing.

Available Plans

$49,900 COP/monthEntry-level plan includes:
  • 7-day meal plan template
  • Home workout routine
  • Basic app access
  • Email support
  • Plan downloads (with watermark)
{
  id: "PLAN_BASICO",
  name: "Basico",
  durationMonths: 1,
  price: 49900,
  features: [
    "Plan de alimentacion 7 dias",
    "Rutina de entrenamiento casa",
    "Acceso a la app",
    "Soporte por email"
  ]
}

Payment Integration

JCV Fitness uses MercadoPago for secure payment processing:
// Create payment preference
POST /api/payment/mercadopago/create-preference

{
  "title": "Suscripción Pro - JCV Fitness",
  "unit_price": 89900,
  "quantity": 1,
  "currency_id": "COP",
  "payer": {
    "email": "[email protected]"
  },
  "external_reference": "user-uuid-PLAN_PRO"
}

Webhook Processing

Payment confirmations are processed via Cloudflare Workers:
// Webhook endpoint at mercadopago-jcv.fagal142010.workers.dev
POST /webhook/mercadopago

// Validates payment and updates subscription status
// Logs all webhooks to webhook_logs table
// Updates subscriptions table with new status
// Triggers subscription_audit_log entry
Webhook processing is asynchronous. Subscription activation may take 1-2 minutes after successful payment.

Exercise Library

100+ exercises with comprehensive details and video demonstrations.

Exercise Categories

  • Push Exercises - Chest, shoulders, triceps
  • Pull Exercises - Back, biceps, rear delts
  • Leg Exercises - Quads, hamstrings, glutes, calves
  • Core Exercises - Abs, obliques, lower back
  • Cardio - HIIT, steady state, conditioning
  • Mobility - Stretching, flexibility, warm-ups

Exercise Data Structure

interface Exercise {
  id: string;
  name: string;
  category: string;
  muscleGroups: string[];
  equipment: string[];
  difficulty: 'beginner' | 'intermediate' | 'advanced' | 'elite';
  videoUrl?: string;
  instructions: string[];
  commonMistakes: string[];
  alternatives: string[];
}

Exercise Videos

Pro and Premium subscribers get access to:
  • Proper form demonstrations
  • Common mistake corrections
  • Progression and regression videos
  • Muscle activation cues
Videos are hosted and accessible at /videos.

Authentication System

Secure authentication powered by Supabase with multiple sign-in methods.

Authentication Methods

Traditional authentication with email verification:
const { signUp } = useAuth();

await signUp(email, password, fullName);
// User receives verification email
// Must verify before accessing protected features

Authentication Context

The auth system uses React Context for global state:
// Access auth state anywhere
import { useAuth } from '@/features/auth';

const { 
  user,
  session,
  profile,
  isAuthenticated,
  isLoading,
  signIn,
  signOut 
} = useAuth();

Row-Level Security

All database access is protected by Supabase RLS policies:
-- Users can only read their own data
CREATE POLICY "Users can read own profile"
  ON profiles FOR SELECT
  USING (auth.uid() = id);

-- Users can only update their own plans
CREATE POLICY "Users can update own plans"
  ON user_plans FOR UPDATE
  USING (auth.uid() = user_id);
Row-level security ensures users can never access another user’s workout plans, meal plans, or subscription information - even if they try to manipulate API requests.

Protected Routes

Pages requiring authentication use the ProtectedRoute component:
import { ProtectedRoute } from '@/features/auth';

export default function DashboardPage() {
  return (
    <ProtectedRoute>
      {/* Dashboard content only shown to authenticated users */}
    </ProtectedRoute>
  );
}

PDF Generation

Download personalized plans with user-specific watermarks to prevent unauthorized sharing.

Available Downloads

  • Workout Plans - Complete training program with all exercises
  • Meal Plans - Nutrition program with recipes and portions
  • Exercise Library - Reference guide for all exercises
  • Food Exchange Tables - Meal substitution guide

PDF Features

Personalized Watermarks

Each PDF includes the user’s name to prevent sharing

Professional Formatting

Clean, printer-friendly layout

Offline Access

View plans without internet connection

Download Tracking

Track downloads in plan_downloads table

Download Process

// Generate PDF with watermark
POST /api/plan/generate-pdf

{
  "userId": "user-uuid",
  "planType": "workout",
  "includeExerciseLibrary": true,
  "watermark": true
}

// Response includes download URL
{
  "url": "https://storage.example.com/plans/user-uuid-workout.pdf",
  "expiresAt": "2026-03-08T00:00:00Z"
}

Download Limits

  • Básico: 5 downloads per month
  • Pro: 15 downloads per month
  • Premium: Unlimited downloads
Downloads are tracked in the plan_downloads table:
interface PlanDownload {
  id: string;
  user_id: string;
  plan_type: 'workout' | 'meal' | 'both';
  downloaded_at: string;
  ip_address?: string;
}

User Dashboard

Centralized hub for managing your fitness journey at /dashboard.

Dashboard Components

Shows current fitness plan information:
  • Plan creation date
  • Days since plan started
  • Progress percentage
  • Quick links to workout and meal plans
import { PlanStatusCard } from '@/features/plans/components/PlanStatusCard';
Displays subscription details:
  • Current plan tier (Básico/Pro/Premium)
  • Next renewal date
  • Payment method on file
  • Upgrade/downgrade buttons
  • Cancel subscription option
import { SubscriptionCard } from '@/features/dashboard';
Fast access to common tasks:
  • Create new workout plan
  • Regenerate meal plan
  • Download PDF
  • View exercise videos
  • Browse food exchanges
import { QuickActions } from '@/features/dashboard';
Account information and settings:
  • Name and email
  • Account creation date
  • Profile photo upload
  • Edit profile button
import { UserProfile } from '@/features/dashboard';
Educational content library:
  • Platform walkthrough videos
  • Exercise technique guides
  • Meal prep tutorials
  • FAQ videos
import { VideoTutorials } from '@/features/dashboard';

Additional Features

Freemium Model

New users get access to 5-week trial plans before subscribing:
  • Complete the wizard without payment
  • View sample workout and meal plans
  • Limited feature access
  • Upgrade anytime to unlock full features

WhatsApp Support

Direct support channel at +57 314 382 6430:
  • Quick response times
  • Personalized guidance
  • Technical support
  • Coaching questions (Premium only)

Progress Tracking

Track your fitness journey over time:
  • Weight and body measurement logging
  • Workout performance tracking
  • Before/after photo comparisons
  • Progress charts and graphs

Community Features (Premium)

Premium subscribers get VIP community access:
  • Private Discord/Telegram group
  • Weekly Q&A sessions
  • Recipe sharing
  • Motivation and accountability

Technical Specifications

Frontend Stack

{
  "framework": "Next.js 16",
  "ui-library": "React 19",
  "language": "TypeScript",
  "styling": "Tailwind CSS 4",
  "state-management": "Zustand 5",
  "deployment": "Cloudflare Pages"
}

Backend Services

{
  "authentication": "Supabase Auth",
  "database": "Supabase (PostgreSQL)",
  "storage": "Supabase Storage",
  "payments": "MercadoPago",
  "webhooks": "Cloudflare Workers",
  "email": "Supabase Email"
}

Database Tables

  • profiles - User profile information
  • subscriptions - Active subscription records
  • wizard_data - Saved wizard responses
  • user_plans - Generated fitness plans
  • plan_downloads - Download tracking
  • webhook_logs - Payment webhook history
  • subscription_audit_log - Subscription change history

Next Steps

Create Your Plan

Follow the quickstart guide to create your first personalized plan

Technical Documentation

Deep dive into system architecture and implementation

API Reference

Complete API documentation for developers

User Guides

Step-by-step guides for all platform features

Build docs developers (and LLMs) love