Skip to content

Repository files navigation

CodeFlexAI Logo

🏋️ CodeFlexAI

AI-Powered Personalized Workout & Diet Plan Generator

Have a voice conversation with our AI assistant to create your personalized fitness program tailored to your goals, preferences, and fitness level.

FeaturesTech StackGetting StartedEnvironment VariablesDeployment

Next.js React TypeScript TailwindCSS

Clerk Convex Vapi


✨ Features

  • 🎙️ Voice-Powered AI Assistant - Have natural conversations with AI to generate your fitness plan
  • 🏋️ Personalized Workout Plans - Custom exercise routines based on your goals and fitness level
  • 🥗 Diet Recommendations - Calorie-targeted meal plans tailored to your needs
  • 👤 User Authentication - Secure login with Clerk authentication
  • 💾 Plan History - Save and view your previous fitness programs
  • 🎨 Modern Cyber-Terminal UI - Beautiful dark theme with futuristic styling
  • 📱 Fully Responsive - Works seamlessly on desktop and mobile devices

🛠️ Tech Stack

Category Technology
Frontend Next.js 16, React 19, TypeScript, Tailwind CSS
Backend Next.js API Routes, Convex
Authentication Clerk
Database Convex
Voice AI Vapi
Styling Tailwind CSS, shadcn/ui

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn or pnpm
  • Clerk account
  • Convex account
  • Vapi account

Installation

  1. Clone the repository

    git clone https://github.com/pritamscodee/codeflexai.git
    cd codeflexai
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env.local file in the root directory (see Environment Variables)

  4. Run the development server

    npm run dev
  5. Open your browser

    Navigate to http://localhost:3000


🔐 Environment Variables

Create a .env.local file with the following variables:

# Convex
CONVEX_DEPLOYMENT=your_convex_deployment
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
NEXT_PUBLIC_CONVEX_SITE_URL=https://your-deployment.convex.site

# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_key
CLERK_SECRET_KEY=sk_test_your_key

# Vapi Voice AI
NEXT_PUBLIC_VAPI_WORKFLOW_ID=your_workflow_id
NEXT_PUBLIC_VAPI_API_KEY=your_api_key

# Clerk JWT (for Convex auth)
CLERK_JWT_ISSUER_DOMAIN=https://your-app.clerk.accounts.dev

Getting Your Keys

Service Where to Get
Convex convex.dev - Create a project and run npx convex dev
Clerk clerk.com - Create an application
Vapi vapi.ai - Create a workflow

📦 Deployment

Deploy to Vercel

Deploy with Vercel

  1. Push your code to GitHub
  2. Import the repository in Vercel
  3. Add all environment variables in Vercel dashboard
  4. Deploy!

Deploy Convex to Production

npx convex deploy

📸 Screenshots

Homepage Generate Program

📁 Project Structure

codeflexai/
├── app/                    # Next.js App Router
│   ├── auth/              # Authentication pages
│   ├── generate-program/  # Voice AI page
│   ├── profile/           # User profile page
│   └── page.tsx           # Homepage
├── components/            # React components
│   └── ui/               # shadcn/ui components
├── convex/               # Convex backend
│   ├── plans.ts          # Workout plans queries/mutations
│   ├── users.ts          # User sync functions
│   └── schema.ts         # Database schema
├── lib/                  # Utility functions
│   └── vapi.ts          # Vapi client
├── provider/            # React providers
└── public/              # Static assets

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is open source and available under the MIT License.


👨‍💻 Author


If you found this project helpful, please consider giving it a ⭐️!

About

a fitness ai agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages