Skip to content

Architecture

vuvnguyen95 edited this page Oct 23, 2023 · 17 revisions

Frameworks, Libraries, APIs, Services

This will be an Android app written in Javascript using the react native framework. The libraries that will be used are: react, react-native, react-native-calendars (for customizing calendar components), react-navigation (for application navigation), and react-native-async-storage libraries (for maintaining state and data). Firebase will be used as a cloud database and authentication for user accounts. We will be using the npm package manager for the application. The app will be released by generating an APK that can be downloaded and tested. The virtual machine that will be used is the emulator from Android Studio that can also be launched via the Expo Go app on a physical mobile device. The APIs that are being used are the Exercises API and Nutrition API.

Release

App will be released for testing via a downloadable APK.

Backend Information

State will be maintained in the app by the 'useState' hook and AsyncStorage in memory

Maintaining State:

Database storage is used for long-term data persistence and to maintain data across application restarts.

Database Schema

  • user_id (string): Unique identifier for the user.
  • username (string): User's username.
  • email (string): User's email address.
  • created_at (timestamp): Timestamp of when the user account was created.
  • phone (string): User’s phone number
  • height (integer): User’s height
  • weight (integer): User’s weight
  • fitness_level (string): User’s state of fitness level
  • fitness_goal (string): User’s goal to achieve

Common Queries

  • Insert data (Login/Personal Info/Meals/Workouts/Tasks/Comments)
  • Delete data
  • Edit data
  • Select days

Workload Distribution

Frontend work such as design and functionality will be done by Ali Omer, Nick Rubino, and Vu Nguyen. Backend work such as database connection, API usage, user account handling, and data storage will be done by Kayly Tran and Deep Patel.

Models

UML PDF File

Views

1. Login/Creating Account

1.1 Sign-Up

  • Enter username (R)
  • Enter name (R)
  • Enter phone number (R)
  • Enter email address (R)
  • Enter Date of Birth (MM/DD/YYYY) (R)
  • Enter password (R)
  • Confirm Password (R)

1.2 Biometrics

  • Enter height (ft/in or cm) (R)
  • Enter weight (lbs or kgs) (R)
  • Select fitness level (beginner, intermediate, advanced) (R)
  • Select fitness Goal (Lose Weight, Build Muscle, Cardio, Rehab/Injury, Sports, Other) (R)

1.3 Login

  • Enter username and password (R)

1.4 Forgot Password

  • Enter email and send password reset email (R)
  • Enter code sent in email (R)
  • Enter new password and confirm password (R)

2. Settings/ Profile

2.1 Profile

  • Edit name (R)
  • Edit address (R)
  • Edit phone number (R)
  • Edit email address (R)

2.2 Account

  • View transaction history (R)
  • View/Edit payment methods (R)
  • View QR code to share profile with others (A)
  • View privacy policy (R)
  • View terms of service (R)
  • Sign out (R)

2.3 Others

  • Change color scheme (R)
  • Change language (R)
  • View support email address and phone number (R)
  • View application version (R)
  • Change between light/dark mode (R)

3. Home Screen/Calendar

3.1 Home/List View

  • View current day of the week (R)
  • View progress bar (R)
  • View tasks for the day (R)
  • View number of tasks for each category of tasks (R)
  • Switch view to view calendar for the entire month (R)
  • Share tasks with others (D)

3.2 Calendar View

  • Navigate between monthly calendars (R)
  • Have indicators for days with tasks (R)
  • Days can be clicked on to create/view events (R)
  • Display quote of the day (R)
  • Have group calendars (A)
  • Ability to import calendars from other platforms (A)

3.3 Create/Edit Tasks

  • Create tasks using the '+' button from the taskbar (R)
  • Enter name of task (R)
  • Set start/end time (R)
  • Set start/end date (R)
  • Set location (R)
  • Select category of task (R)
  • Write any comments/notes (R)
  • Smart scheduling (system learns based on user's previous tasks/workouts and suggests automatically adding recurring events to user's calendar) (A)
  • Save changes (R)
  • Delete task (R)

4. Workouts

4.1 Workout List

  • View list of user-created workouts (R)
  • Add workout using '+' button on taskbar (R)
  • Click on workout card to view details (R)
  • Share workouts (D)

4.2 Saved Workouts

  • View saved workouts (R)
  • Click on workout card to view details (R)

4.3 Create/Edit Workout

  • Enter name of workout (R)
  • Create exercises (set name, number of sets and number of reps) (R)
  • Delete exercises (R)
  • Select days for workout (R)
  • Add comments/notes (R)
  • Suggest workout ideas (D)
  • Webscrape weather data for workout ideas (A)
  • Save changes (R)
  • Delete workout (R)

5. Cookbook

5.1 Browse

  • Create meals using '+' button on taskbar (R)
  • View list of user-created meals (R)
  • Search for meals using a search field (R)

5.2 Saved

  • View saved meals (R)

5.3 Create/Edit Meals

  • Enter name of meal (R)
  • Create ingredients (set weight(oz) and number of calories) (R)
  • Delete ingredients (R)
  • Display total calories (R)
  • Display protein(g), carbohydrates(g), and fats(g) (R)
  • Write cooking instructions/notes (R)
  • Share meals (D)
  • Save changes (R)
  • Delete meal (R)

6. Progress

  • View progress bar of amount of protein/fats/carbs consumed relative to goal (R)
  • View graph of macro proportions (R)
  • Share progress (D)

7. Goals

7.1 Goals List

  • View user-created goals (R)
  • Create new goals using '+' button in taskbar (R)

7.2 Create/Edit goals

  • Enter name (R)
  • Set starting weight (R)
  • Set current weight (R)
  • Set goal weight (R)
  • Set goal weight after 3 months, 6 months, and 1 year (R)
  • Goal weight will be entered in either lbs or kgs and the latter is automatically filled (R)
  • Share goals (D)
  • Tailor workouts based on end goal (D)