michaelsnook / 8-glasses

A simple app to track how many glasses of water I drink each day.
Other
0 stars 1 forks source link

Eight Glasses

A simple app to track how many glasses of water I drink each day, and a project to learn Python for the web.

It should be pretty easy to install on your own machine, if you like. Make a PostgresSQL database with createdb eightglasses; clone the repository; set up a virtual environment and activate it; run pip install -r requirements.txt; then launch with python runserver.py. There's also a Procfile for Heroku, so if you have it, you can use foreman start to run the application via Gunicorn.

You can check out the most recent deployed public app at http://eightglasses.herokuapp.com/. The daily and weekly queries don't work yet, which are pretty core to the functionality desired, so it remains incomplete until that's done.

Aside from that, the to-do list looks something like this:

In general, this has been a really fun application to write. I started with the tutorial for Flask, an open source micro-framework for Python. The html, css, and modals rely on Foundation, (which uses normalize.css and modernizr.js), and colors from clrs.cc.

So far the most frustrating thing was trying to make the application work on Heroku. I had to become a lot more comfortable with the workings of my operating system and my development environment, which is perhaps why I found it to be such a valuable exercise.

That said, it was important to learn the whole range of pieces needed to set up a prototype app. When I wrote the first version a year ago, I had never used Flask, Foundation, SQLAlchemy, or Heroku before, but now I use them and tools like them rather frequently for work and play. I'm looking forward to wrapping up the original set of features so I can call it a day, or decide to plan some more work on it. (I'm thinking about integrating with some of the fitness APIs.)