How brodeurlv/fastnfitness works
1. Project shape
- This is a single-module Android application (app/) for fitness tracking.
- It is an offline, device-centric app: the core data store is local, with no obvious backend service layer in the repository.
2. Primary runtime and entry points
- MainActivity is the main shell of the app and likely hosts most of the navigation/content fragments.
- MainIntroActivity handles first-run onboarding / profile creation.
- AndroidManifest.xml plus AppViMo indicate application-level initialization and global app state.
3. Presentation layer
- The UI is built around many fragments, each representing a feature area: profile, weight, machines/exercises, programs, body measures, progress images, history, settings, about, and graphing.
- The app uses custom dialogs and input widgets for editing records, timers, date/time pickers, and value entry.
- Navigation appears to mix a drawer and tab/pager patterns, with custom adapters for drawer items, spinners, lists, and cursors.
4. Core domain model
- The data model is fitness-oriented and organized around entities such as profiles, machines/exercises, workout records, body measures, body parts, programs, program history, progress images, weights, and cardio records.
- Enums under com.easyfitness.enums define key business concepts such as units, exercise type, gender, record type, muscle group, and program status.
5. Persistence boundary
- The DAO package is the main data-access layer and is the primary boundary between UI and storage.
- DatabaseHelper and DAOBase suggest a local SQLite-backed persistence model.
- Feature-specific DAOs are split by domain: profile, machine, record, program, body measures, progress images, cardio, and utilities.
- Cursor adapters in the UI strongly indicate that many screens are populated directly from database query results.
6. Data flow through the app
- Typical flow is: fragment/view -> dialog or custom input -> DAO -> local database -> adapter/graph refresh.
- Graph-related screens consume query data through graph models and custom chart views rather than talking directly to the database.
- Many features likely share the same profile context, with the selected profile shaping units, records, and displayed progress.
7. Workout and training features
- The machines and programs packages represent the strength-training workflow: defining exercises/machines, assembling programs, viewing program history, and running a program.
- fonte and record packages appear to manage workout records and related history views.
- program DAOs and fragments separate program definition from program execution/history, which is an important architectural boundary.
8. Measurement and progress tracking
- Body measurements are a distinct subsystem under bodymeasures, with both DAO and UI layers.
- Progress photos are handled separately via progressimages, using image utilities and file/path helpers.
- Weight tracking has its own fragment, cursor adapter, and profile-weight DAO, showing that body metrics are treated as first-class data.
9. Timing, exercise session support, and media
- The app includes timing utilities such as chronometer and countdown dialogs, time pickers, and an alarm receiver.
- MusicController suggests an embedded or controlled music playback experience during workouts.
- These features are supporting infrastructure for training sessions rather than standalone modules.
10. Import/export and interoperability
- csvreader plus export-related DAOs (export/CVSManager, OpenScaleSync) indicate support for moving data in and out of the app.
- provider_paths.xml and file/image utilities suggest controlled file sharing and image handling boundaries.
- This is the main integration layer beyond the local database.
11. Reusable UI components and utilities
- views/, graph/, and utils/ contain shared building blocks used across multiple feature screens.
- Examples include custom input controls, graph widgets, unit conversion, date conversion, keyboard helpers, exception handling, and image/exif utilities.
- These packages reduce duplication and keep feature fragments thinner.
12. Visual/reporting layer
- Graphing is a dedicated subsystem with date graphs, bar graphs, mini graphs, marker views, and graph data objects.
- It sits on top of the domain/data layer and turns fitness history into visual progress reports.
- This is one of the app’s main value-producing layers, alongside record entry.
13. Build, release, and localization
- The repo includes Gradle/Android Studio build tooling, a GitHub Actions build workflow, and Fastlane metadata for Play Store distribution.
- The app is heavily localized, with many language resource folders and store listing assets.
- These do not change runtime architecture, but they matter for deployment and packaging.
14. Overall architecture summary
- The app is a layered Android client: presentation fragments and custom views on top, DAOs and SQLite in the middle, and domain entities/utilities underneath.
- Most subsystems are feature-based and loosely coupled through shared profile/database context.
- The key architectural diagram should center on local persistence, feature fragments, and shared UI/data utilities, with export/import and media handling as adjacent support systems.
Main entry points: MainActivity.java MainActivity · DAOProfile.java Core DAOs · MachineFragment.java Training · DAOBodyMeasure.java Feature DAOs
Components 18
Presentation
Activities, fragments, dialogs, adapters, and custom views that make up the Android UI.
- MainActivity · Primary app shell that hosts navigation and feature fragments.
app/src/main/java/com/easyfitness/MainActivity.java - Intro Flow · First-run profile creation and onboarding entry point.
app/src/main/java/com/easyfitness/intro/MainIntroActivity.java - Profile · Profile-centric screens and shared profile view model.
app/src/main/java/com/easyfitness/ProfileFragment.java - Training · Machines, programs, workout records, and history screens.
app/src/main/java/com/easyfitness/machines/MachineFragment.java - Body Metrics · Weight, body measures, and progress images screens.
app/src/main/java/com/easyfitness/WeightFragment.java - Graphs · Graph and chart screens for fitness history and progress.
app/src/main/java/com/easyfitness/fonte/FonteGraphFragment.java - Inputs · Custom dialogs, input widgets, and shared UI components for data entry.
app/src/main/java/com/easyfitness/views/EditableInputView.java
Persistence
Local database boundary, DAOs, and entity models backed by SQLite.
- Database · SQLite helper and DAO base infrastructure for local persistence.
app/src/main/java/com/easyfitness/DAO/DatabaseHelper.java - Core DAOs · Profile, machine, record, weight, and shared DAO entry points.
app/src/main/java/com/easyfitness/DAO/DAOProfile.java - Feature DAOs · DAOs for body measures, programs, history, progress images, cardio, and exports.
app/src/main/java/com/easyfitness/DAO/bodymeasures/DAOBodyMeasure.java - Entities · Local persistence models such as profile, machine, record, program, and measurements.
app/src/main/java/com/easyfitness/DAO/Profile.java
Domain
Shared fitness concepts, graph models, and app-wide enums/utilities.
- Enums · Shared business enums for units, exercise type, gender, record type, muscle, and status.
app/src/main/java/com/easyfitness/enums/Unit.java - Graph Core · Reusable graph data objects and chart rendering primitives.
app/src/main/java/com/easyfitness/graph/GraphData.java
Support
Import/export, media, timing, and other cross-cutting helpers.
- AppViMo · Application-level initialization and global shared state.
app/src/main/java/com/easyfitness/AppViMo.java - Utils · Date, unit, file, image, keyboard, music, and alarm helpers.
app/src/main/java/com/easyfitness/utils/UnitConverter.java - Import/Export · CSV and sync utilities for moving data in and out of the app.
app/src/main/java/com/csvreader/CsvReader.java - Workout Support · Timing and playback helpers used during workouts.
app/src/main/java/gr/antoniom/chronometer/Chronometer.java
Distribution
Build, release, and localization assets outside the runtime app.
- Release Assets · Play Store metadata, localized resources, and release packaging assets.
fastlane/metadata/android/en-US/images/phoneScreenshots
Connections 22
- MainActivity → Profile: hosts · Main shell routes to profile screens.
- MainActivity → Training: hosts · Main shell routes to workout and program areas.
- MainActivity → Body Metrics: hosts · Main shell routes to body tracking screens.
- MainActivity → Graphs: hosts · Main shell routes to chart/report screens.
- MainActivity → Inputs: uses · Primary UI reuses shared dialogs and custom input views.
- Intro Flow → Profile: creates · Onboarding creates or selects the initial profile.
- AppViMo → Database: initializes · App state sets up application-wide persistence context.
- Profile → Core DAOs: reads/writes · Profile screens load and update profile-scoped data.
- Training → Core DAOs: reads/writes · Training screens persist machines, records, and weights.
- Training → Feature DAOs: reads/writes · Programs, history, cardio, and export screens use feature-specific DAOs.
- Body Metrics → Feature DAOs: reads/writes · Body measure and progress image screens query specialized DAOs.
- Graphs → Graph Core: renders · Graph screens consume reusable chart models and primitives.
- Graphs → Core DAOs: queries · Charts are populated from local fitness history data.
- Inputs → Utils: uses · Input widgets rely on shared conversion, formatting, and file helpers.
- Core DAOs → Database: extends · Core DAOs sit on the local SQLite helper layer.
- Feature DAOs → Database: extends · Feature-specific DAOs use the same database foundation.
- Core DAOs → Entities: maps · Core DAOs persist and hydrate domain entities.
- Feature DAOs → Entities: maps · Feature DAOs persist and hydrate domain entities.
- Entities → Enums: uses · Entities encode domain rules through shared enums.
- Import/Export → Core DAOs: imports/exports · CSV and sync tools move data through DAO boundaries.
- Workout Support → Training: supports · Timers and media helpers assist workout execution screens.
- Release Assets → MainActivity: packages · Build and release assets ship the Android app.