If you like exercising but don’t want to pay the $3 a month that top-tier workout apps charge then this is the project for you. The plan is to design a free OPEN SOURCE mobile app that you can download from a browser (PWA) and run locally on your phone (NO backend for this project). The goal is to implement as many high-quality workout app features as we can. Ideally we will be able to grab data from your other workout apps, allowing you to import your workout history into the OSC app.
Trying to just get the project running on your local machine? You are in the right spot!
git clone https://github.com/ufosc/OSC_Workout_App.git
cd OSC_Workout_App
npm install
npm startLooking to set things up for making contributions, review the Prequisites section to ensure you have all necessary items installed, then continue down to the Start Guide for full details.
NPM is a widely used package manager for JavaScript and will ensure that all needed packages are installed and ready to go prior to running the project. We will be using it to manage the front-end dependencies for this projects, to install:
- Visit the installer page.
- Choose the installer version for your operating system.
Git is an open-source version control software supporting online repositories like GitHub, BitBucket, GitLab, and others. To install:
- Visit the Git download page.
- Choose the "standalone installer" for your operating system.
Hint: If you are on windows, we recommend you use the GitBash CLI that comes with the install. Otherwise, if you are on a Unix based system (Linux, MacOS), then use the normal terminal.
Now all prerequisites have been installed, you are ready to run the OSC Workout Application!
Go to the top of this page and select the gray Fork button at the top right of the repository page. This will create a copy of the current repository that is owned under your GitHub profile, you will be able to submit pull requests (PR) from this repository to the parent repository (OSC_Workout_App).
From the file location on your local machine where you want to store the project, run the following command:
git clone <git url>The git URL will be the URL found on your forked repository home page in Github by clicking the green Code button then HTTPS (should be default selected) at the top of your forked repository page.
This will install all the needed NPM packages to be able to run the project.
Note: This only needs to be run the first time the project is launched and any time the repository package.json file is updated.
cd OSC_Workout_App
npm installTo launch, simply run the following command:
npm startThe Youtube Data API is used to fetch short videos directly from Youtube. Without an API key, the app will cycle through the same few videos. To generate a key:
- Ensure that you have an existing Google account. If not, then take the time to create one.
- Visit the Google Cloud Console
- Create a Project: Click on "Select a Project" at the top of the page -> "New Project"
- Once a project has been created, go to the top left corner of the screen and open the drop down menu. Scroll down to "Products" -> "APIs and Services" -> "Enabled APIs & services"
- At the top of the page, select "Enable APIs and Services" and search for "Youtube Data API v3"
- Click on the API and select "Enable"
- Once enabled, you will be redirected to the API/Service detail screen. At the top right corner, click on "Create credentials" and follow the steps to generate an API key.
- Once the key has been generated, go to "Credentials" and locate the newly created key. Select it and click on "Show Key". The following product is your new API key. Optionally, you can apply restrictions as preferred in this section. It is recommended to restrict the API key to Youtube Data API v3.
API Keys are important credentials that should not be shared freely, especially when it comes to an open-source repository.
- Run the following commands to create a new file named .env:
This is the file that will be referenced in the code, do not access the API key directly. Remember to replace YOUR_KEY_GOES_HERE with your own API key from step 8 in the previous section.
cd OSC_Workout_App echo REACT_APP_YOUTUBE_API_KEY=YOUR_KEY_GOES_HERE > .env
- The .gitignore should already be setup to ignore the .env file, but double check to be safe. Remember, never commit this to a repository.
- Within the OSC_Workout_App directory, navigate to src -> Components -> Brainrot
- Uncomment line 9 and either delete or comment out line 10.
Congratulations, you have now setup an API key.
For current website deployment you can follow the below link to check it out deployed Site