Code Monkey home page Code Monkey logo

hack-weight's Introduction

Hack Weight: A weight and calorie tracking website/app

A web app designed to be accessed using mobiles for tracking weight and calorie consumption. Based on the Hacker Diet methodology.

Database

Hack Weight uses a SQLite3 database, that can be created with the following SQL:

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE users ( username string primary key, password string not null );
CREATE TABLE settings ( id integer primary key, username string not null, setting_key string not null, setting_value string not null );
CREATE TABLE weight_entry ( id integer primary key, username string not null, date string not null, weight real not null );
CREATE TABLE calorie_entry ( id integer primary key, username string not null, date string not null, amount integer not null, category string not null );
COMMIT;

Rationale

I've always struggled with weight, largely because I love good food and good beer, and especially pubs that provide both. I also love pizza, which no doubt doesn't help, and the city I live in literally runs a gourmet burger month every year where the challenge is to try as many different, large and rich burgers as you can. Oh, and they also run a pretty good craft beer festival. Add to that my penchant for spending 95% of my waking hours in a chair in front of a screen and...you get an average BMI of 'Obese'.

Around 10 years prior to creating this, I found the Hacker Diet (discovered while browsing Deus Ex text transcriptions from nuwen.net, the personal blog site of Stephan T. Lavavej). Giving it a go, I dropped from 105kg down to 82kg, a weight I managed to keep for five years or so until I met my Wife. She shared my preference for good food, beer and company (though she wasn't much of a beer person prior) and we both ballooned. Especially when our dog and then our daughter came alone. Stress relief through technical alcoholism is a thing people.

So I'm doing the diet again, and I thought this time I would knock together an app to support it, in my new favourite language Go. Any excuse, right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.