A comprehensive MERN stack application designed to help users create and manage their workout plans, track exercises, and monitor progress efficiently. The app supports both mobile (React Native) and web (React.js) platforms with a shared backend.
- User Authentication: Secure login and signup functionality.
- Workout Plans: Create, update, delete, and view workout plans.
- Exercises: Add, edit, and remove exercises within workout plans.
- Progress Tracking: Monitor workout progress over time.
- Cross-Platform Compatibility: React Native for mobile and React.js for web.
- Responsive Design: Fully responsive UI for all devices.
- React.js (Web)
- React Native (Mobile)
- Tailwind CSS (Web styling)
- Styled Components (Mobile styling)
- Axios (for API calls)
- Node.js
- Express.js
- MongoDB (via Mongoose)
- JWT (for authentication)
- Bcrypt (for password hashing)
- React Navigation (for React Native routing)
src/
├── controllers/
│ ├── userController.js
│ ├── workoutPlanController.js
│ ├── exerciseController.js
│ └── progressController.js
├── models/
│ ├── User.js
│ ├── WorkoutPlan.js
│ ├── Exercise.js
│ └── Progress.js
├── routes/
│ ├── userRoutes.js
│ ├── workoutPlanRoutes.js
│ ├── exerciseRoutes.js
│ └── progressRoutes.js
├── middleware/
│ └── authMiddleware.js
├── app.js
└── server.js
src/
├── components/
│ ├── AddExercise.js
│ ├── Exercises.js
│ ├── WorkoutPlans.js
│ └── Progress.js
├── services/
│ └── api.js
├── App.js
├── index.js
└── styles.css
src/
├── components/
│ ├── AddExercise.js
│ ├── Exercises.js
│ ├── WorkoutPlans.js
│ └── Progress.js
├── navigation/
│ ├── AppNavigator.js
├── services/
│ └── api.js
├── App.js
├── index.js
└── styles.js
-
Clone the repository:
git clone https://github.com/abhishekgurjar-in/workout-planner.git cd workout-planner/backend
-
Install dependencies:
npm install
-
Set up environment variables in a
.env
file:PORT=5000 MONGO_URI=<your-mongo-db-connection-string> JWT_SECRET=<your-jwt-secret>
-
Start the server:
npm start
-
Navigate to the web frontend directory:
cd ../frontend-web
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Navigate to the mobile frontend directory:
cd ../frontend-mobile
-
Install dependencies:
npm install
-
Start the Metro bundler:
npx expo start
POST /api/auth/register
: Register a new user.POST /api/auth/login
: Authenticate and log in a user.
GET /api/workout-plans
: Get all workout plans.POST /api/workout-plans
: Create a new workout plan.PUT /api/workout-plans/:id
: Update a workout plan.DELETE /api/workout-plans/:id
: Delete a workout plan.
GET /api/exercises/:workoutPlanId
: Get exercises for a specific workout plan.POST /api/exercises
: Add a new exercise to a workout plan.DELETE /api/exercises/:id
: Delete an exercise.
GET /api/progress/:userId
: Get user progress data.POST /api/progress
: Add progress data.
- Create an Account: Sign up or log in to the application.
- Create a Workout Plan: Add a new workout plan.
- Add Exercises: Add specific exercises to your workout plan with sets and reps.
- Track Progress: Monitor your progress over time.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Commit your changes:
git commit -m "Add new feature"
- Push to the branch:
git push origin feature-branch
- Create a pull request.
For questions or feedback, contact me at:
GitHub: abhishekgurjar-in