Skip to content

Architecture

BrentpHopkins edited this page Oct 17, 2022 · 36 revisions

Libraries and Frameworks

Our project will use the following:

  • React Native
    Used to create the user interface.

  • React-navigation
    Used for navigation between pages within the app.

  • React-native-firebase
    Interface between the app and Firebase.

  • Firebase
    Data hosting and user authentication.

  • npm
    Package manager.

  • Expo
    Building and testing the application.

  • USDA FoodData Central API
    Used to retrieve nutritional data.

Work Distribution

  • Brent Hopkins: #22, #24
  • Mostafa Mohamed Ali: #17, #18, #19
  • Peyton Tucker: #20, #26
  • Caleb Corpening #21, #27
  • Brian White #23, #25

Model

Database

Schema

  • User(username, password, age, dietary_restrictions, height, weight, calorie_goal, first_name, last_name)
  • SleepEntry(UUID, date, hours)
  • FoodDiary(UUID, date, breakfast, lunch, dinner, snacks)
  • Recipe(UUID, author, title, instructions, description, ingredients, servings)
  • hasSleepEntry(User.username, SleepEntry.UUID, SleepEntry.date)
  • hasFoodDiary((User.username, FoodDiary.UUID, FoodDiary.date)
  • savedRecipe(User.username, Recipe.UUID)

Common Queries

  • getFoodDiary(username, date)
  • getSleepDiary(username, date)
  • getUserDetails(username)
  • getSavedRecipes(username)

Views

Login

Background: contains the background color and welcome text.
Buttons: contains the buttons used to sign in or create a new account

Email Login

Background: Contains the background color
Sign in menu: contains the email and password fields along with the sign in button

New User Landing Page

Background: contains the background color
New user menu: contains the create account button, text fields , and drop down menus needed for account creation

Home Screen

Home Screen

Background: contains the background color
Goal: shows the user their macro nutrient and calorie stats for the current date
Trending: contains trending recipes and their nutritional info
Sleep: contains the users sleep data for the past week
Navigation: contains the buttons used to navigate to other pages within the app

Food Diary

Background: contains the background color
Date: contains the currently selected date and the buttons to change it
Calories: contains the users calorie information for the specified date and an ellipsis used to navigate to the nutrient page
Food: contains each meal and its entries along with the buttons needed to add a new entry to each meal
Navigation: contains the buttons used to navigate to other pages within the app

Nutrients

Background: contains the background color
Header: contains the selected date along with the buttons to change it and a button to return to the food diary
Nutrients: contains nutrient information for the selected date displayed as %DV
Navigation: contains the buttons used to navigate to other pages within the app

Food Search

Background: contains the background color
Search: contains the text field and button used to search for food
results: displays the results of the last search and the buttons needed to add each result
Navigation: contains the buttons used to navigate to other pages within the app

Food Details

Background: contains the background color
Details: contains the name of the food, an image (if available), serving size, nutritional information for the food and a button to save the food to the users diary
Navigation: contains the buttons used to navigate to other pages within the app

Recipe Search

Home Screen

Background: contains the background color
Search: contains the text field and button used to search for recipes
Results: contains the recipes that were found by the search
Navigation: contains the buttons used to navigate to other pages within the app

Detailed Recipe View

Detailed Recipe View

Background: contains the background color
Details: contains information about the recipe such as name, ingredients, instructions, nutritional information, and a photo (if available)
Navigation: contains the buttons used to navigate to other pages within the app

Settings

Background: contains the background color
Header: Contains the name of the screen and a button to return to the home screen
Options: contains the buttons for each of the options within the settings menu
Navigation: contains the buttons used to navigate to other pages within the app

Edit Personal Data

Background: contains the background color
Header: contains the title of the page and a button to return to the home page
Info: contains the text fields for the users information
User Goals: contains the users selected goals used for tailoring the app to their needs
Activity Level: contains buttons used to specify the users activity level which is used in calculating calorie goals
Save: contains the button to confirm and save the users changes

Dietary Restrictions

Background: contains the background color
Header: contains the title of the page and a button to return to the home screen
Restrictions: contains a list of dietary restrictions and the buttons to add or remove them from the users account
Save: contains the button to confirm and save the users changes

Sleep

Sleep Diary

Background: contains the background color
Sleep History: contains a dynamic chart that the displays the last seven days of the current user’s sleep data. Has a “Show History” button that allows the user to change the date range of the sleep chart.
Trends: Displays trends that are calculated based on the data collected on the current user’s sleep patterns. In the event there are more trends that are not displayed, the user can tap the “View more…” button to view additional trends.
Sleep Tracking: Contains a button to start tracking sleep, which will change to a “stop” button when the tracking is active. The user can then tap the “stop” button to stop tracking and log that sleep session. Also contains an “Edit history” button to allow the user to modify their past sleep history entries. Navigation: contains the buttons used to navigate to other pages within the app

Recipe Book

Recipe Book

Background: Contains the background color
Filters: Contains toggleable buttons the user can use to refine the results in the results component
Results: Displays all recipes the user has saved, unless filters have been applied in the Filters component
Navigation: contains the buttons used to navigate to other pages within the app

Release

Our code base will be built and distributed as a .apk file