Giter Site home page Giter Site logo

fitgrind's People

Contributors

j-nguyen avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ksushik

fitgrind's Issues

Database Scheme

Purpose

To be able to do CRUD operations on the calorie log tracker, weight log tracker and the weight scheme.

Proposed Database Format

CREATE TABLE time_log (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    date DATETIME
);

CREATE TABLE weight_log (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    time_id INTEGER REFERENCES time_log(id),
    weight FLOAT,
);

CREATE TABLE calorie_log (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    time_id INTEGER REFERENCES time_log(id),
    food TEXT NOT NULL,
    calories INTEGER NOT NULL
);

CREATE TABLE progress ( 
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    resource TEXT NOT NULL
);

CREATE TABLE image_location (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    image_id INTEGER REFERENCES progress(id),
    time_id INTEGER REFERENCES time_log(id)
);

Notes

With the way this db is structured, the time stamps are meant to record for each date. We can check if today's date has been recorded. If it's not recorded, then we create the date for today.

This is a proposal so I'm not sure if this is 100%

Update

More notes to account for:

  • We will need to check if you've recorded a date today, however if you haven't then it's not a big deal. We can check using by if 24 hours have been passed. This should work for weight log, and for recording your calories, however, your weight log wouldn't make much sense, as it should be geared towards being weekly or monthly.

  • If the weight log is to be weekly, we can still use the same database and reference the id's and such, just we have to make sure that it's been a week after we can record into calorie_log.

  • I'm assuming to find the latest date, would to be get the last inserted id, or we can manually search for the latest date.

Settings Screen

Description

Fix the setting screen, where it has us input imperial or metric values. We will need to set it based on the user.

Navigation Drawer

Purpose

To provide the user with a list of navigation pages to go through.

Links

Our Navigation links consist of: (Not Final)

  • Home
  • Weight Log Screen
  • Workout Regime Screen (Workout Schedule)
  • Progress Picture Screen
  • Adding Food Screen

Progress Picture Screen

Purpose

This issue is related to #3. It is when you hit the button for your progress. This shows a viewpager of images , ranging from week 1 to 8 showcasing your progress and how well you're doing.

Mock-up

img_20170321_203909

Requirements

There are several requirements that we need to make sure to get this running. First, to have some sort of dynamic view-pager, we'll need some research.

Needed:

  • A Dynamic ViewPager, it'll show 8 pages, but it's grabbed from the Database.
  • We only need to make it show 8 pages, where each page can be described as weekly progress. (We can use picasso here I think it'll work).
  • With lots of pictures being stored in the phone's directory, we are limited to the storage of the phone. That's why I asked weekly. Had we had a DB, I think our options would be much more open.

Description

The goal is to help the user showcase their progress to weight loss/gain. By tracking it visually with pictures, it might be easier for some users to see and might even encourage the user.

Setting Screen

Purpose

To let users dictate on what settings they want to have. For example, in the settings menu, there displays your current weight, your weight goal, along with your weight completion date (Kind of like a due date).

**Note: We may need some other settings. I can't think of any, but let me know @allan-lin **

Mock-up

img_20170323_170421

Required Formulas (Calculating and Maintaining weight)

Description

Each of these settings will apply to your settings. I think some of them might be in a persistence data. Putting them in a SQLite Database might be overkill. I do think this is a good idea to put it here rather than on the weight log screen, or something like that.

Implement Picasso

Purpose

Because we may be using several images on our workout log screen, we will need to cache our images so that our app doesn't crash during runtime.

Description

Using https://github.com/square/picasso as the library, we have the ability to cache and download images with efficiency. We will be able to run our app with a lot of images for use. Picasso alone handles caching, threading and image-handling.

Links

Switch Libraries to Support Android 2.3+

Purpose

Allow users from lower android versions to be able to use our app. The new library (RetroFit) will now support Android 2.3+, even though our app is handled from 4.4+.

Description and Notes

Because of the new update, there will be some gamebreaking changes, such as the addition of POJO classes, meaning that each JSON object be identical to the java object. This will definitely involve more cases of classes.

This issue is also critical, because the last library only supports API 23>, and that only covers about 35% of the android users which is not good enough.

Android Animations

Purpose

To give a better UI/UX experience for the user. An animation usually indicates that an event's been finished, or some sort of activity/loading data is done.

Types of animations

The types of animations we are looking for:

  • View/Transition Animations (Transitions between screens)
  • Layout Animations in regards to RecyclerView/ListViews
  • Possible View Pager Animations using either Depth/Zoom or maybe even a custom one.
  • Animation regards to event handles (Button press, image clicks, taps, etc).

Notes

This is probably going to be an ongoing issue until like week 3-4. This animation issue applies to all other issues.

Food API

Purpose

Have a huge database pool for the user to select which closest food or recipe resembles theirs. This makes it easier on them so they don't have to input their own nutritional values.

This issue is inline and related with #5.

List of APIs

Food API by Spoontactular (https://spoonacular.com/food-api)

- United States Department of Argiculture (https://ndb.nal.usda.gov/ndb/doc/index)

Big2Oven Recipe API (http://api2.bigoven.com/)

Note

This is 'optional'. It would be awesome to have this, but the priority is to get the user to be able to add their foods.

Steps to using the API


Nutrient ID values from USDA API

Nuritional Value Id
Calories/Energy 208
Sugars, Total 269
Total Fat 204
Carbohydrate 205
Saturated Fat 606
Trans Fat 605
Cholesterol 601
Sodium 307
Fiber 291
Protein 203
Vitamin A 320
Vitamin C 401
Calcium 301
Iron 303
Potassium 306

Food Search Screen

Description

A need for a recyclerview that is able to scroll down with offsets is required. There is way too many missing offsets.

Workout Regime Screen

Purpose

Showcases your workout schedule, what you do with your exercises. It'll show a listview in a card view from sunday to saturday.

Mock-up

img_20170321_173640

Note: We might be looking into Tabbed Activities, so this design is not final.

Description

You add based on what day you want, so if you have a Monday, you can click on the three dots or use the fab button to add a workout for you.

Refactor Database Helper

Description:

The current code for DB is terrible. The CRUD operations work successfully, however they need to be refactored as the code is very messy.

Adjust Weight Log Screen

Once #55 is done, we will need to adjust the weight log screen and have it input your weight in there instead.

Database Fix / Enhancement

Description and Issue

The problem with the current database existing right now is that it is being improperly implemented. Some cases include: No singleton type pattern, bad use of HashMaps, and an overall bad design for the bridge-cross way between API and DB.

The Fix

By fixing this issue, we eliminate less code, and there is potential for improving our app's performance and marginally decreasing our app's size.

Some solutions to fixing this issue.

Delete the Nutrients class and replace it with a HashMap. We know that all of the material is going to be in there.

Weight Log Screen

Description

The weight log screen will need to be re-adjusted as well. There currently needs to be a setting where we can have the user input in daily, weekly or monthly for their weight log screen. We'd like the user to decide.

Final Touches

Description

Finalize on any type of last minute touches we need on our coding based, as we have the animations issue and styling issue covered.

Home Screen / Calorie Log Screen

Purpose

Showcases the recent calories you've obtained per day, as well as recent activity and your calorie goal.

Mockup

img_20170321_173625

Features

  • Showcases a reyclerview with a card view around it.
  • The RecyclerView's data will be retrieved with SQLite CRUD operations.
  • A Fab button to add food.

Diary Calorie Log Screen

Overhaul

It is been long overdue, and the new screen needs to be adjusted for the dairy log screen. We will now need an infinite viewpager, followed by a calendar that retrieves us dates, as it makes it much easier for us.

Weight Log Screen

Purpose

Provides a screen of your recent activity/last logged weight, as well as your progress.

Changes: Your progress button which shows a viewpager of your progress is meant to be weekly, not daily.

Mockup

img_20170321_173630

Description

Similar to the home screen, there's also a recycler view which gets your last weight logs. In the future, we may add a chart to show your progress on how you're doing. The top box shows the recent activity as well as if you've reached your goal or not.

Custom Food Screen

Description

Remodify the screen so that it is no longer a long textview/textfield screen. This is not pleasing to the user, and needs to be re-modified so it looks nicer.

Redesign Project

Let's attempt to make this a public repo. To do that, we'll have to customize our app to make it look nice.

Calorie Log Adding Food Screen

Purpose

This is inline with the #2 issue. This proceeds onto adding a new food/drink to your calorie tracker.

Mock-up

img_20170321_203918

Description

The goal is to use an API that showcases nutritional facts. You can add custom ones, but a food API will list several foods for us which makes it easier on the user. Once searched up, we can the nutritional facts and then use it as a calorie tracker.

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.