All Projects → jasonrudolph → one-rep-max

jasonrudolph / one-rep-max

Licence: EPL-1.0 license
To some extent: A ClojureScript app for tracking workout data. But mostly: Some guy on the internet trying his hand at ClojureScript.

Programming Languages

clojure
4091 projects
shell
77523 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to one-rep-max

flutter
Flutter fitness/workout app for wger
Stars: ✭ 106 (+202.86%)
Mutual labels:  fitness, workout
Script My Workout
🏃 Programmable workouts from the comfort of your terminal 🏃
Stars: ✭ 19 (-45.71%)
Mutual labels:  fitness, workout
traindown-dart
Dart (and Flutter) library for the Traindown Markup Language. This is the reference implementation for now. It is first to receive features and fixes.
Stars: ✭ 16 (-54.29%)
Mutual labels:  exercise, fitness
rn-fitness-tracker
React Native module to interact with Google Fit and Apple HealthKit.
Stars: ✭ 58 (+65.71%)
Mutual labels:  fitness, workout
feeel
A cross-platform Flutter home workout app that respects your privacy. THIS IS A GITLAB MIRROR, file issues and contribute there.
Stars: ✭ 27 (-22.86%)
Mutual labels:  exercise, workout
SmartSpin2k
Transform your spin bike into a Smart Trainer!
Stars: ✭ 88 (+151.43%)
Mutual labels:  exercise, fitness
traindown
Public site
Stars: ✭ 35 (+0%)
Mutual labels:  exercise, fitness
White Jotter
白卷是一款使用 Vue+Spring Boot 开发的前后端分离项目,附带全套开发教程。(A simple CMS developed by Spring Boot and Vue.js with development tutorials)
Stars: ✭ 1,838 (+5151.43%)
Mutual labels:  single-page-app
React Admin
🎉 A magical react admin
Stars: ✭ 149 (+325.71%)
Mutual labels:  single-page-app
Influxdb Ui
🐎 A simple UI for InfluxDB
Stars: ✭ 117 (+234.29%)
Mutual labels:  single-page-app
Sr mini
A single file Rails app that will have you running a StimulusReflex and CableReady demo in just 2 steps.
Stars: ✭ 98 (+180%)
Mutual labels:  single-page-app
Universal Router
A simple middleware-style router for isomorphic JavaScript web apps
Stars: ✭ 1,598 (+4465.71%)
Mutual labels:  single-page-app
Zam
⚡️ A component based library that encourages single-page applications.
Stars: ✭ 156 (+345.71%)
Mutual labels:  single-page-app
Php Sf Flex Webpack Encore Vuejs
A simple app skeleton to try to make every components work together : symfony 4 (latest stable at the date, but work with sf 3.3+ if you just change the versions in composer.json), symfony/flex, webpack-encore, vuejs 2.5.x, boostrap 4 sass
Stars: ✭ 118 (+237.14%)
Mutual labels:  single-page-app
React Mini Social Network
A reactive mini-social-network created with React!! 😍🍻
Stars: ✭ 203 (+480%)
Mutual labels:  single-page-app
Wordpress Rest Admin
A frontend for admin area of WordPress, using WP REST API and React. It works with Self-Hosted WordPress
Stars: ✭ 108 (+208.57%)
Mutual labels:  single-page-app
skylark
An unified framework for building modern html5 applications across web and desktop.
Stars: ✭ 26 (-25.71%)
Mutual labels:  single-page-app
Json Schema Editor
JSON Schema Editor is an intuitive editor for JSON schema. It provides a tree view to present the structure of schema, and a property inspector to edit the properties of schema element. Develop with Vue.js 2 and Firebase.
Stars: ✭ 194 (+454.29%)
Mutual labels:  single-page-app
Knockout Spa
A mini but full-fledged SPA framework and boilerplate to build SPAs fast and scalable
Stars: ✭ 145 (+314.29%)
Mutual labels:  single-page-app
Zetawar
Zetawar is a turn based tactical strategy game implemented in 100% ClojureScript.
Stars: ✭ 144 (+311.43%)
Mutual labels:  single-page-app

One Rep Max

To some extent, One Rep Max is a mobile web app for tracking workout data. But mostly, it's a playground/opportunity for me to learn and explore ClojureScript.

Take it for a spin

One Rep Max logs your workouts, so you can quickly and easily see the performance from your last workout, and push yourself to reach new personal records. It's a mobile web app: you take it with you to the gym and log your sets as you go.

Mobile first, mobile only — The UI is designed exclusively for use on a mobile device. (Since I don't currently have a need for anything other than a mobile interface, no other interface currently exists.) It's tested on Safari running on an iPhone on iOS 5. It probably works on numerous other browsers and platforms, but they're not officially supported.

You can take it for a spin at onerepmax.jasonrudolph.com, or you can follow the instructions below to build and deploy your own copy of the app.

Screenshots

One Rep Max Screenshot #1 - Welcome One Rep Max Screenshot #2 - Initializing One Rep Max Screenshot #3 - Exercise List One Rep Max Screenshot #4 - Filtering Exercise List One Rep Max Screenshot #5 - Logging a Set

Architecture

One Rep Max is a "single-page application" built on top of ClojureScript One, with MongoHQ as the backend data store.

Wikipedia describes the interaction with a single-page app as follows:

All necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load. ... [There is] no page reload by the browser during an application session. All user interaction and changes of the application state are handled in the context of a single Web document. [As a result], the user experience becomes more continuous and fluid...

Each user has his/her own MongoDB database hosted at MongoHQ. One Rep Max uses MongoHQ's REST API to fetch and persist user data. When you launch One Rep Max, it prompts you to provide your MongoHQ API key and database name. With that information, One Rep Max is able to access your database at MongoHQ and use it as the data store for your workouts.

After One Rep Max downloads to your browser, there is no further communication between your browser and the One Rep Max server; all subsequent communication flows exclusively between your browser and api.mongohq.com, all via HTTPS. Your MongoHQ API key is never sent to the One Rep Max server, nor is any other user data.

Hacking

Dependencies

One Rep Max is developed and tested with the following dependencies.

  • Java 1.6
  • Leiningen 1.7.1
  • Git

If you want to change the CSS, you'll also need Ruby and Compass.

  • Ruby 1.9.3-p194
  • Compass 0.12.2

Getting started

You will need to have Java, lein and Git installed. Execute the following commands to install and run One Rep Max:

git clone https://github.com/jasonrudolph/one-rep-max.git
cd one-rep-max
lein bootstrap
lein repl

At the REPL prompt which appears, type (go). Your browser will launch and navigate to the running application.

You will need an API key and a database for MongoHQ. Follow the instructions in the One Rep Max UI to sign up for a free account and create your database.

SCSS, not CSS

One Rep Max uses SCSS and Compass to generate the CSS used in the app.

To make changes to the CSS, install Compass and tell it to watch for changes to the SCSS files:

gem install compass -v0.12.2
compass watch

When you change any of the SCSS files (in src/sass), Compass will compile the CSS into the right spot.

Building and deploying

ClojureScript One provides a handy script for producing deployment artifacts.

./script/build

The output includes the application's JavaScript compiled in advanced mode, the host HTML page, and all of the resources in the public directory.

The build script deposits the deployment artifacts in the ./out/public directory. Inside you'll find index.html: the host page for the application. You can open index.html directly in a browser, and you're ready to rock.

Since the deployment artifacts are just static content (i.e., JavaScript, HTML, etc.), you can deploy the app just about anywhere. (Heck, you could even host it on Dropbox.) Personally, I host the app on a simple Apache server, and I use ./script/deploy to build the app, deploy it, and then tag the deployment. If you want to deploy the app to your own host, this script might serve as a starting point.

Vim users are people too

If you're a Vim user, you'll want to be able to evaluate ClojureScript forms from Vim and have them sent to the browser for execution.

  1. Install tmux
  2. Install tslime.vim and set up your keybindings as described in the tslime README
  3. Install lein-repls and install the cljsh script on your path
  4. Open a tmux session with two panes, each of which is in the root project directory
  5. In one pane ...
    1. Run lein repls
    2. In the REPL prompt which appears, type (go)
  6. In the other pane ...
    1. Open Vim
    2. Find a form that you want to evaluate and hit Control-c Control-c
    3. You'll be prompted to identify the tmux session, window, and pane where you ran lein repls. Do so, and watch the magic happen.

For more info on working with Vim and ClojureScript, check out the ClojureScript wiki. (The steps above are a subset of the steps described in the wiki, but this is all you need for evaluating ClojureScript code from within Vim.)

TODO

  • Provide visual feedback to the user (i.e., spinner or equivalent) when the app is working.
  • Validate user input. (The ClojureScript One sample app provides an example.)
  • Support navigation with the browser's "back" button. See: one.sample.history.
  • Compile compressed CSS as part of the build (using compass compile --output-style=compressed) and remove the generated stylesheet from the repo (i.e., screen.css).

Back up your data

If you use One Rep Max for real production data (i.e., you use it to track your workouts and you care about not losing your data), be sure to set up automatic backups for your data. You can use the backup services provided by MongoHQ or you can roll your own.

Credits

Open source, but not an "open source project"

"I am sharing my code. I am not launching an open source project." -- Alan Gutierrez

http://kiloblog.com/post/sharing-code-for-what-its-worth

License

Copyright 2012 Jason Rudolph (jasonrudolph.com) and Relevance (thinkrelevance.com).

Distributed under the Eclipse Public License, the same as Clojure uses. See the file COPYING.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].