The ultimate grind system for warriors, Train Smarter with AI — Get Your Personalized Fitness & Diet Plan for Free.
KenroX/
├── server/ # Node.js + Express backend
└── client/ # Vite + React frontendgit clone https://github.com/Hammad005/KenroX.gitcd server
npm installPORT= # Port number (e.g., 5000)
CLIENT_URL= # Your frontend URL (e.g., http://localhost:5173)
GOOGLE_GEMINI_API_KEY= # Gemini AI API key
MONGO_URI= # Your MongoDB connection string
CLOUDINARY_CLOUD_NAME= # Cloudinary cloud name
CLOUDINARY_API_KEY= # Cloudinary API key
CLOUDINARY_API_SECRET= # Cloudinary API secret
GOOGLE_CLIENT_ID= # Google Client Id (for google authentication)
GOOGLE_CLIENT_SECRET= # Google CLient Secret (for google authentication)
GOOGLE_CALLBACK_URL= # http://localhost:(PORT)/api/auth/google/callback (Make sure add the same url that you gave on google cloud platform)
JWT_SECRET= # Secret key for JWT authentication✅Craeting A New User:
- URL:
/api/auth/signup - Method:
POST - Body:
fullname, email, password - Credentials:
True - Auth required:
No
🔓Login Existing User:
- URL:
/api/auth/login - Method:
POST - Body:
email, password - Credentials:
True - Auth required:
No
🚪Logout User:
- URL:
/api/auth/logout - Method:
POST - Body:
Null - Credentials:
True - Auth required:
(Optional)
✏️Update Existing User:
- URL:
/api/auth/updateProfile - Method:
PUT - Body:
fullname(Optional), profile(Optional - Credentials:
True - Auth required:
Yes
👤Get Logged-In User Profile:
- URL:
/api/auth/me - Method:
GET - Body:
Null - Credentials:
True - Auth required:
Yes
📝Generate Plan:
- URL:
/api/plan/generate - Method:
POST - Body:
age, height, weight, injuries, workout_days, fitness_goal, fitness_level - Credentials:
True - Auth required:
Yes
📄Get Logged-In User's Plans:
- URL:
/api/plan/getPlan - Method:
GET - Body:
Null - Credentials:
True - Auth required:
Yes
📤Activate Specific Plan:
- URL:
/api/plan/active/:id(It Requires Id Of plan That You Want To Activate) - Method:
PUT - Body:
Null - Credentials:
True - Auth required:
Yes
🗑️Delete Specific Plan:
- URL:
/api/plan/deletePlan/:id(It Requires Id Of plan That You Want To Delete) - Method:
DELETE - Body:
Null - Credentials:
True - Auth required:
Yes
# For development
npm run dev
# For production
npm startcd client
npm installVITE_API_URL= # Your backend API base URL (e.g., http://localhost:5000)
VITE_GOOGLE_CLIENT_ID= # Google Client Id (for google authentication)
VITE_GOOGLE_CLIENT_SECRET= # Google CLient Secret (for google authentication)
VITE_GOOGLE_CALLBACK_URL= # http://localhost:(PORT)/api/auth/google/callback (Make sure add the same url that you gave on google cloud platform)# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- Frontend: React, Vite, TailwindCSS, Shadcn
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- APIs Used: Gemini AI, Cloudinary
- Ensure that
.envfiles are properly configured in both the client and server folders. - All external APIs and services (MongoDB, Gemini, Cloudinary) must be active and authorized.
- The application will not function correctly without valid API credentials.
