Lybitos is a React Native application consuming Strava RESTFul web service.
Application features:
- Compute athlete performance level
- Select athlete races (get details, path, checkpoints, live track, ...)
- Get athlete details
- Select athlete clubs (get details, parse club activities, get rankings, ...)
- node
^6.9.1
- npm
^3.10.8
After confirming that your development environment meets the specified requirements, you can follow these steps to get the project up and running:
git clone https://github.com/totorototo/strava.git
cd strava
yarn install # Install project dependencies
- go to http://labs.strava.com/developers/
- create an application
- set application settings
- go to https://www.strava.com/settings/api
- retrieve application ID and secret
- create a new .env file at the root of this project
- paste the following code inside your .env file and make sure to replace [XXX] and [YYY] with your info.
CLIENT_ID=[XXX]
CLIENT_SECRET =[YYY]
- in order to make authentication flow to work, you will have to add the follwoing properties to .env file. Those will be used in Login component to set callback url used during authentication.
URL_SHEME_PREFIX=[yourApplicationName]
URL_SHEME_HOST=localhost
- go to https://developers.google.com/maps/documentation/javascript/get-api-key?hl=Fr
- to get a key, follow the instruction
- edit .env file
- paste the following code inside your .env file and make sure to replace [ZZZ] with your info.
GOOGLE_MAPS_API_KEY=[ZZZ]
- go to https://firebase.google.com
- click “Go to Console” in the top right
- create a new project
- Click the “Add firebase to your web app” link on the home screen and note the config object, we will need this later for the front end setup
- edit .env file
- paste the following code inside your .env file and make sure to replace [AAA], [BBB], [CCC], [DDD], [EEE], [FFF] with your info.
FIREBASE_APIKEY=[AAA]
FIREBASE_AUTHDOMAIN=[BBB]
FIREBASE_DATABASEURL=https=[CCC]
FIREBASE_PROJECTID=[DDD]
FIREBASE_STORAGEBUCKET=[EEE]
FIREBASE_MESSAGINGSENDERID=[FFF]
react-native start # Compile and launch packager
react-native run-ios # Start ios application
or
react-native run-android # Start android application
If you need to remotely debug this application, just follow this step:
yarn run remotedev # launch remote redux devtools
If you need to debug the React application, just fol:
yarn run devtools # launch react-devtools
- Strava API: https://strava.github.io/api/
- Strava Labs: http://labs.strava.com/
- Strava API Google group: https://groups.google.com/forum/#!forum/strava-api