Fit-Track is an exercise log-tracking application built using the MERN (MongoDB, Express, React+Vite, Node.js) stack. This documentation will guide you through the process of contributing to this project.
- Navigate to the
frontend
directory:cd frontend
- Install the dependencies:
npm install
- Start the development server:
npm run dev
-
Navigate to the
backend
directory:cd backend
-
Install the dependencies:
npm install
-
Setup MongoDB Atlas:
- Go to MongoDB Atlas and create an account if you don't already have one.
- Create a new cluster by following the prompts. Mongo Atlas Cluster Creation Tutorial
- Once the cluster is created, go to the Database Access section and create a user with the necessary privileges.
- Go to Network Access and allow your IP address (or allow access from anywhere if testing locally).
- In the Clusters section, click Connect, then choose Connect your application. You'll see a connection string that looks like this:
mongodb+srv://<username>:<password>@cluster0.mongodb.net/?retryWrites=true&w=majority
- Replace
<username>
and<password>
with your actual MongoDB Atlas username and password. Copy the entire connection string.
-
Add MongoDB ATLAS_URI to
.env
file:- Create a
.env
file in thebackend
directory. - Add the following line to the
.env
file, replacing<your-mongodb-connection-string>
with the connection string you copied from MongoDB Atlas:ATLAS_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/fit-track?retryWrites=true&w=majority
- Create a
-
Start the server:
node server.js
or if
nodemon
is installed for live updates of backend:nodemon server.js
The frontend
directory contains the React application.
public
: Contains the public assets of the application.src
: Contains the source code of the application.components
: Reusable UI components.Home
: HomePage ComponentsExercise
: Exercise row component to display Duration, Status, dayCheckExercisesList
: To display the List of exercises done by userHeatMap
: Powered by ApexCharts.js to display the user exercise routineQuotes
: From API Ninjas and display the quotes randomly to motivate the userTotalDays
: To display number of days the user exercisedUserExperience
: To display the User Experience with gamified experienceUserRoutine
: To display the weekly routine of User like a streak
HomePage
: Displaying and rendering Home PageLogin
: Displaying a Login PageSignUp
: Displaying a SignUp and edit User Pagenavbar
: Navbar Component
App.jsx
: The main component that sets up routes.main.jsx
: The entry point of the React application.
The backend
directory contains the Node.js server and Express application.
models
: Contains the Mongoose schemas.exercise.model
: Exercise Schemauser.model
: User Schema
routes
: Contains the API routes.exercises
: Backend API Routes for exercisesuser
: Backend API Routes for users
server.js
: The entry point of the server application.
We welcome contributions! To contribute to Fit-Track, follow these steps:
- Fork the repository by clicking the "Fork" button at the top right of the repository page on GitHub.
- Clone your forked repository to your local machine:
git clone https://github.com/your-username/Fit-Track.git
- Navigate to the project directory:
cd Fit-Track
- Create a new branch for your feature or bug fix (create a branch according to the issue working on):
git switch -c your-branch-name
- Make your changes to the codebase. You can edit the files using your preferred code editor.
- Add the changes to the staging area:
git add .
- Commit the changes with a descriptive message:
git commit -m "Description of your changes"
- Push the changes to your forked repository:
git push origin your-branch-name
- Create a pull request from your forked repository to the main repository. Go to the "Pull Requests" tab on the main repository, and click "New Pull Request". Follow the instructions to create your pull request.
This is just the beginning! I look forward to making more meaningful contributions and collaborating with this amazing community. Let's build something great together and make Fit-Track the best it can be! ❤️🤝
This project is licensed under the MIT License - see the LICENSE file for details.