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
-
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
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
git clone https://github.com/syedomer17/Next.js-AI-fitness-App.git
cd Next.js-AI-fitness-Appnpm installor
yarn installCreate 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.
npm run devYour app will be running at http://localhost:3000.
If you have questions, suggestions, or feedback, feel free to reach out!
Enjoy building your AI Fitness journey! πͺ