Skip to content

Architecture

Nikolas Melendez edited this page Oct 16, 2022 · 18 revisions

MrFit

MrFit will be a native Android app built in Kotlin and use the Gradle package manager, using a mix of Android Studio's Layout Editor and Jetpack Compose for UI design. This app will be using Firebase Cloud for storing cloud data, Firebase User Authentication for managing user accounts, and Firebase Firestore to enable user searches.

We are using the emulator built-in to Android Studio for development and prototyping, which will also allow us to test functionality on a number of different android devices. When ready for testing, an .apk will be built with Android Studio and released here on Github for testers.

Esam: Will work on the database backend.

Nicole: Will work on the social media, notifications, and design portion of the mobile app.

Lauren: Will work on workouts and templates to manage them.

Nik: Will work on user login, authentication, and profiles.

MVC Model

/* TODO: Add methods to classes, and View-Controller */

image

The User model will contain all the information related to a user's profile. The userID will be generated automatically and acquired from Firebase's FirebaseUser object, which will also manage the user's username, email, and password. The user will be able to set all attributes from their name to their visibility, which will use an integer to check if the profile should be Public, Private, Friends Only, etc. From here it will be linked to the Goal model by containing a list of user Goals. It will be linked to the Post model by associating a userID to each post, and containing a list of social media Posts that user has made. It will be linked to the Workout Template model by associating a userID to each Workout Template, and containing a list of Workout Templates made by the user.

The Workout Template model serves the purpose of grouping together Workout models as a routine, and is linked by containing a list of Workouts. It is linked back to the user that created it by the userID. It will also contain a link to a music playlist chosen by the user.

The Workout model is linked to an Exercise by the exerciseID. It also contains a name, such as "30 Minute Walk", and how many reps or how long the associated Exercise should be performed, and how many sets of said Exercise and reps if appropriate.

The Exercise model is linked back to the Workout model by its exercise ID, and contains a list of tags to allow it to be searchable in the database.

It is currently planned for MrFit to maintain user state in database with FirebaseAuth. UI state will be managed and saved in-memory.

Database Backend

As we will be using Cloud Firestore, example collections and documents will be given for the intended database schema.

User collection and example document image

Post collection and example document image

Exercise collection and example document image

Tags collection and example document image

Common queries we expect are for the names of another User, an Exercise object, or for Tags. In order for users to be able to search for Exercises by their associated Tags, we will need a join table with Exercises and Tags.

Views

/* TODO */

  1. The Views of your app: name, describe. Embed the images from your Design Milestone. Typically, one page in the app is composed of multiple View elements.

Welcome Screen https://github.com/SCCapstone/Symphony/wiki/Welcome-Screen