Skip to content

An AI-powered fitness platform that helps users create and manage personalized workout plans. Features secure authentication, email verification

Notifications You must be signed in to change notification settings

syedomer17/Next.js-AI-fitness-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‹οΈβ€β™‚οΈ Next.js AI Fitness App

An AI-powered Fitness Application built with Next.js, TypeScript, and Tailwind CSS. This app allows users to:

βœ… Sign up, sign in, and authenticate with Google & GitHub

βœ… Verify email via OTP

βœ… Reset forgotten passwords

βœ… Upload a profile image

βœ… Generate personalized fitness plans with the Gemini API

βœ… Manage workout data and plans

βœ… Receive workout plans via email


✨ Tech Stack

Next.js TypeScript Tailwind CSS Framer Motion Auth.js MongoDB Nodemailer Google OAuth GitHub OAuth Google Gemini API


🌟 Features

  • Authentication

    • Email/password signup and login
    • OAuth login with Google and GitHub
    • Email verification via OTP
    • Password reset via email
  • User Profile

    • Upload a profile avatar using Cloudinary
  • AI Fitness Planner

    • Generate personalized workout plans with the Google Gemini API
    • Save and manage workout data
    • Send workout plans to the user's email

πŸ“‚ Folder Structure

fitness/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   └── [...nextauth]/route.ts
β”‚   β”‚   β”œβ”€β”€ register/route.ts
β”‚   β”‚   β”œβ”€β”€ forgot-password/route.ts
β”‚   β”‚   β”œβ”€β”€ resend-otp/route.ts
β”‚   β”‚   └── user/
β”‚   β”‚       β”œβ”€β”€ avatar/route.ts
β”‚   β”‚       β”œβ”€β”€ generate-plan/route.ts
β”‚   β”‚       β”œβ”€β”€ send-plan/route.ts
β”‚   β”‚       β”œβ”€β”€ workout-data/route.ts
β”‚   β”‚       β”œβ”€β”€ workout-plan/route.ts
β”‚   β”‚       └── verify-otp/route.ts
β”‚   β”œβ”€β”€ forgot-password/page.tsx
β”‚   β”œβ”€β”€ signup/page.tsx
β”‚   β”œβ”€β”€ login/page.tsx
β”‚   β”œβ”€β”€ workout-planner/page.tsx
β”‚   β”œβ”€β”€ verify-otp/page.tsx
β”‚   └── workout-plan/page.tsx
β”‚
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ cloudinary.ts
β”‚   β”œβ”€β”€ mongodb.ts
β”‚   └── send-email.ts
β”‚
β”œβ”€β”€ models/
β”‚   └── User.ts
β”‚
β”œβ”€β”€ types/
β”‚   └── next-auth.d.ts
β”‚
β”œβ”€β”€ public/
β”‚   └── (static assets, icons, images)
β”‚
β”œβ”€β”€ styles/
β”‚   └── (global styles, Tailwind config)
β”‚
β”œβ”€β”€ .env
β”œβ”€β”€ .gitignore
β”œβ”€β”€ next.config.js
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ postcss.config.js
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ› οΈ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/syedomer17/Next.js-AI-fitness-App.git
cd Next.js-AI-fitness-App

2️⃣ Install Dependencies

npm install

or

yarn install

3️⃣ Configure Environment Variables

Create a .env file in the root directory:

MONGODB_URI=

EMAIL_USER=
EMAIL_PASS=

NEXTAUTH_SECRET=
RESET_SECRET=

NEXTAUTH_URL=http://localhost:3000

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

GOOGLE_GEMINI_API_KEY=

CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

βœ… Note: Never commit .env files to public repositories.


4️⃣ Run the Development Server

npm run dev

Your app will be running at http://localhost:3000.


πŸ“§ Contact

If you have questions, suggestions, or feedback, feel free to reach out!


Enjoy building your AI Fitness journey! πŸ’ͺ


About

An AI-powered fitness platform that helps users create and manage personalized workout plans. Features secure authentication, email verification

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages