Skip to content

proustibat/react-hr-tracker

Repository files navigation

React Heart Rate Tracker

Commitizen friendly Made with Bulma dependencies updates Renovate enabled Heroku CI

Quality Gate Status Maintainability Rating Code Smells Bugs Technical Debt

Track heart rate measurement with the Bluetooth Web API.

This project was bootstrapped with Create React App.

Demo

App is running at https://react-hr-tracker.herokuapp.com/

Prerequisites

Be sure Node and NPM are installed. We also use Yarn, but you could use NPM instead.

Installation

yarn

  • The installation requires to be authenticated to the Font Awesome npm registry. As you can see in .npmrc file, we set a variable environment FONTAWESOME_NPM_AUTH_TOKEN. You can set it on deploymnet server and on you dev environmeent. We recommend to use direnv.

  • In order to be available to use Web Bluetooth API on mobile in development mode, you need to browse the app with https. For example, add a .env file with HTTPS=true.

Development

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Testing

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Production

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Heroku deployment

  • Install the Heroku CLI.
  • Login to your account and create an app.
  • Use this Heroku Buildpack
  • Don't forget to add variable environment: heroku config:set FONTAWESOME_NPM_AUTH_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
  • Learn more about Heroku CI in order to deploy to run tests and deploy production and staging environments automatically when pushing and making pull request on Github.
  • Deploy manually with yarn heroku-deploy

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Other used tools: