A PWA (Progressive Web Application) fitness app that logs location and duration of workouts. Built with React and Rails.
Please ensure Rails 5 and Ruby 2.2.2++ is installed on your machine.
- $ git clone https://github.com/winfredselwyn/fitgit.git
- $ cd fitgit
- $ bundle install
- $ cd client
- $ client\ npm install
- $ npm start
- $ cd ..
- $ env PORT=4000 rails s (the Rails server will be on localhost:4000)
- $ rails db:seed
- $ rails s
- $ navigate to localhost:3000
-
after initial load, disable the rails server ( CTRL + C at the terminal ) to test PWA capabilities. The application has 2 screens :
-
'Main' screen with all workouts. Syncs with offline workout after refresh.
-
'New Workouts' screen. If a workout is started with 'START WORKOUT' and 'END WORKOUT' while offline, the data is saved and sent to the server when online.
To build the JS client, please run:
- $ cd client
- $ npm build
- $ cd build
- $ python -m http.server
That's all folks!
MIT