Welcome to the Workout Tracker project! This project is a full-stack application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. It allows users to track their workouts by adding different exercises and monitoring their progress over time.
- The frontend code is located in the
frontend
folder. - The backend code is located in the
backend
folder. - MongoDB Atlas is used to host the database.
- Users can add different workouts and exercises to their tracker.
- The application provides a user-friendly interface for logging workouts.
- State management is handled using React Context API and useReducer hook.
- MongoDB with Mongoose is used for database integration.
- Clone the repository:
git clone https://github.com/your-username/workout-tracker.git
-
Navigate to the backend folder:
cd gymbuddy/backend
-
Install Dependencies:
npm install
-
Set up environment variables:
Create a
.env
file and add your MongoDB connection string. also add PORT variable to the file.PORT=4000
-
Run Backend Server for devlopment:
npm run dev
- Navigate to the frontend folder:
cd ../frontend
- Install Dependencies:
npm install
- Run Frontend for devlopment:
npm start
- Sign up/Login to MongoDB Atlas: MongoDB Atlas
- Create a new cluster and configure your database settings.
- Obtain your connection string:
- Go to your cluster dashboard.
- Click on "Connect" button.
- Select "Connect your application".
- Copy the connection string provided.
- Add the connection string to your backend
.env
file:MONGODB_URI=your-connection-string
- Ensure your IP address is whitelisted in MongoDB Atlas.
- You're ready to use MongoDB Atlas for your project!