Command Palette

Search for a command to run...

1

SmartFlex — AI Fitness Trainer

AI-powered fitness training app that generates personalized workout and diet plans in real-time through voice interaction.

SmartFlex — AI Fitness Trainer

Features

  • Authentication via Clerk — Secure and scalable auth system
  • Vapi AI Agent — Real-time voice interaction with an AI fitness coach
  • Diet & Workout Plans — Custom plans generated by Gemini AI
  • Fitness Duration Estimator — Predicts how many days you need based on your goals
  • Plan History — View and revisit your generated fitness plans
  • Convex as Database — Fast, reactive, serverless backend

Tech Stack

TechPurpose
Next.jsFrontend & App Framework
ClerkAuthentication & User Management
Vapi AIAI Voice Agent for Coaching
GeminiFitness & Diet Plan Generation
ConvexBackend, Data Storage & Queries

How It Works

  1. User logs in via Clerk
  2. Speaks to the Vapi AI agent
  3. Gemini generates a personalized plan
  4. Convex stores your plan for easy access later

Getting Started

Clone the Repository

git clone https://github.com/Kashan-2912/smartflex.git
cd smartflex-ai

Install Dependencies

$ pnpm add

Configure Environment Variables

Create a .env.local file in the root directory:

# Clerk (Auth)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
 
# Vapi AI
NEXT_PUBLIC_VAPI_WORKFLOW_ID=your_vapi_workflow_id
NEXT_PUBLIC_VAPI_API_KEY=your_vapi_api_key
 
# Convex
CONVEX_DEPLOYMENT=your_convex_deployment
NEXT_PUBLIC_CONVEX_URL=your_public_convex_url
 
# Gemini
GEMINI_API_KEY=your_gemini_api_key

Start the Development Server

$ pnpm dev

Folder Structure

smartflex/
├── public/  
├── convex/       
├── src/
      ├── app/
      ├── components/
      ├── constants/
      ├── lib/
      ├── providers/
      ├── middleware.ts

Powered By