wdiasjunior / OpenBarbellApp

The OpenBarbell app is more than just a companion to your device, it's your new training journal

Home Page:http://squatsandscience.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

INSTALLATION

RUNNING IT

  • react-native run-ios
  • react-native run-android

DEBUGGING TIPS

CODEBASE PRACTICES

  • Follow the feature folder structure. Features include components, containers, and action creators.
  • As a real of thumb, use Sagas for async operations. Try to keep Thunks when you need data from the store.
  • Unit tests have not been added yet, but tests should go in a separate Tests folder.
  • Generally, aim for fewer actions to reduce the number of dispatches and rerenders for performance purposes. One action can be set up such that multiple reducers will react to it.
  • Actions should all have an Action Creator. Reason being, it makes it clear where all of them are in the app and it simplifies analytics.
  • Action naming convention wise, use present and dismiss for popups, save for saving permanently to the store, and update for changes to the store that won't persist
  • Use selectors rather than manually access sub properties of the state. For example, instead of doing state.auth.accessToken, use the AuthSelector's getAccessToken. Each of these selectors should start from the root state. In other words, always pass in the root state to the selector, not state.sets
  • It may be possible to use selector caching via the reselect library to speed up the History screen, which is very slow right now.

IMPORTANT NOTES

A development version of the keystore and Google Sign In keys have been included in the repository to make getting started easier. The app is also pointed at the development version of the server, which in turn uses a development database.

Be careful when using react-native link. It duplicates imports for the React Native Google Sign In and React Native Device Info Libraries which will cause builds to fail. The solution is to REMOVE the additional Google Sign In and Device Info changes to the Android project after running link. If you have to use react-native link, use it only on the new packages that you just installed.

Use Carthage for all iOS Swift only native libraries such as SwiftyJSON and Charts. Use Cocoapods for all other iOS libraries. If Carthage packages have issues, try running carthage update --platform iOS --no-use-binaries

APP ARCHITECTURE

See https://github.com/squatsandsciencelabs/OpenBarbell-V3/wiki/App-Architecture

DATA FORMAT

See https://github.com/squatsandsciencelabs/OpenBarbell-V3/wiki/OpenBarbell-Data-Storage-Format

About

The OpenBarbell app is more than just a companion to your device, it's your new training journal

http://squatsandscience.com/

License:MIT License


Languages

Language:JavaScript 98.7%Language:Ruby 0.5%Language:Objective-C 0.4%Language:Java 0.3%Language:Starlark 0.2%Language:Swift 0.0%Language:C 0.0%