Online timer for Tabata training (the high-intensity interval training (HIIT) workout)
Set up your own tabata workout, including
- Number of exercises in total
- Number of sets per exercise
- Preparation time per exercise
- Work time for each set
- Rest time for each set
Name your own set so that you don't need to memorize exercises every time doing your workout routine
Save your preference as preset to the cloud
Sign up or sign in through regular process or with Google/Facebook account (OAuth 2.0)
Responsive web design (RWD)
Follow the instructions below to set up the environment and run this project on your local machine
- Node v15.11.0
- MongoDB
- Download ZIP or clone this repo
> git clone https://github.com/rubychi/tabata-timer.git
- Start a MongoDB server running on port 27017
Start commend depends on the OS, on macOS:
> brew services start mongodb-community
> npm install lerna nodemon -g
- Install all the dependencies
> lerna bootstrap
- Create your own config.json to securely store credentials inside \packages\server\config
{
"test": {
"PORT": 3000,
"MONGODB_URI": "mongodb://localhost:27017/TabataTimerTest",
"JWT_SECRET": [Your Secret Key],
"GOOGLE_CLIENT_ID": [Your Google Client ID],
"GOOGLE_CLIENT_SECRET": [Your Google Client Secret],
"GOOGLE_CALLBACK_URL": "http://localhost:3000/auth/google/return",
"FACEBOOK_CLIENT_ID": [Your Facebook Client ID],
"FACEBOOK_CLIENT_SECRET": [Your Facebook Client Secret],
"FACEBOOK_CALLBACK_URL": "http://localhost:3000/auth/facebook/return"
},
"development": {
"PORT": 3000,
"MONGODB_URI": "mongodb://localhost:27017/TabataTimer",
"JWT_SECRET": [Your Secret Key],
"GOOGLE_CLIENT_ID": [Your Google Client ID],
"GOOGLE_CLIENT_SECRET": [Your Google Client Secret],
"GOOGLE_CALLBACK_URL": "http://localhost:3000/auth/google/return",
"FACEBOOK_CLIENT_ID": [Your Facebook Client ID],
"FACEBOOK_CLIENT_SECRET": [Your Facebook Client Secret],
"FACEBOOK_CALLBACK_URL": "http://localhost:3000/auth/facebook/return"
}
}
Replace
authPopup.htmlurl to http://localhost:8080 to use OAuth 2.0 in the development envtabata-timer/packages/server/authPopup.html
Lines 12 to 14 in 13e8c69
Back to the root directory and type the below command to start the server and the service
> lerna run dev
- See it up and running on http://localhost:8080
- Build a production version of the application
> lerna run build
- Deploy to Heroku
> heroku create
> git push heroku master
> heroku addons:create mongolab:sandbox
- Set up config vars
> heroku config:set
MONGODB_URI=[Your MongoDB URI]
JWT_SECRET=[Your JWT Secret]
GOOGLE_CLIENT_ID=[Your Google Client ID]
GOOGLE_CLIENT_SECRET=[Your Google Client Secret]
GOOGLE_CALLBACK_URL=[Your Google Callback URL]
FACEBOOK_CLIENT_ID=[Your Facebook Client ID]
FACEBOOK_CLIENT_SECRET=[Your Facebook Client Secret]
FACEBOOK_CALLBACK_URL=[Your Facebook Callback URL]
- Open the app in the browser
> heroku open
- babel
- react
- react-sound
- react-bootstrap
- react-css-modules
- redux
- axios
- normalize.css
- postcss
- sass
- express
- mongodb
- mongoose
- passport
- jwt-simple
- compression
- helmet
- lodash
- webpack
- Airbnb
