The application manages various data types including user profiles, posts, comments, exercises, workouts, likes, and social connections. It employs a hybrid approach using:
- Cloud Firestore: Primary remote NoSQL database for dynamic, structured data like user information, posts, comments, likes, follows, workouts, and hashtags. Used for real-time updates where needed.
- Firebase Authentication: Handles user authentication (signup, sign-in, session management).
- Firebase Storage: Stores user-uploaded media like profile pictures, post images, and workout cover images.
- Room Database: Local persistence library for:
- Caching large datasets fetched initially (Exercises, Body Parts, Equipment, Targets).
- Managing offline data or user-specific saves (Saved Workouts, Saved Exercises - based on flags/tables).
- Handling optimistic UI updates and synchronization for actions like Likes (
CachedLike
table).
- External API (ExerciseDB): Used by
ExerciseRepository
to fetch the initial, comprehensive list of exercises during first app launch.
Note: On instruction on how to setup the Firebase project, please refer to the Firebase Project Setup.
Note: To get a better understanding of how app and database is structured, please refer to App Structure.
This section highlights some of the core features of the Gym Masters app.