PERSONAL WELLNESS ASSISTANCE

JavaFX desktop wellness tracker with Harris-Benedict-based daily targets, gamified quiz and badge rewards, and a SOLID-structured OOP design — later migrated from local MySQL to Huawei Cloud RDS for the Huawei Developer Competition APAC 2023.

FULL-STACK
Platform Desktop — JavaFX with FXML and CSS
Database MySQL 8 — migrated to Huawei Cloud RDS with Elastic IP binding
Targets Harris-Benedict equation for personalized calorie, exercise, and sleep goals
Design MVC + SOLID — separated DB handler, calculator, and validator classes
Context SP ET0706 OOP mini-project → Huawei Developer Competition APAC 2023 ("Wellness Avatar")

1.0 PROBLEM

Individuals struggle to track and manage wellness information — exercise, nutrition, sleep — across scattered tools, and generic health advice online is hard to act on. The application provides a centralized desktop platform where a user inputs their health attributes and receives personalized, science-based daily targets, then logs actual intake against them over time.

2.0 ARCHITECTURE

The app is a JavaFX desktop application structured on the MVC pattern with an explicit SOLID decomposition: DatabaseHandler owns all database operations, HECCalculator encapsulates the health mathematics, UserValidator centralizes signup input validation, and an abstract LabelController base class (extended by LabelGetter / LabelSetter) standardizes label management across the many FXML scenes.

Daily targets are computed with the Harris-Benedict equation: BMR is derived from gender, age, weight, and height, then scaled by one of five activity-level multipliers (1.2–1.9) to produce recommended daily caloric intake, exercise duration, and sleep hours. The user then logs actual values on a daily tracker; a shortcoming notice shows the gap between actual and optimal, and a past-week view visualizes the last seven days of entries.

Engagement is gamified: a “What type of exerciser are you?” quiz assigns the user an avatar on first login, and meeting all three daily targets earns a badge on a trophy shelf.

Quiz result screen revealing the user's exerciser avatar with a personalized story based on their quiz choices
Figure 1. "What type of exerciser are you?" quiz — avatar reveal
Past week progress page showing calories intake, exercise duration, and hours of sleep logged per day over the last seven days
Figure 2. Past-week record — seven days of logged calories, exercise, and sleep
Trophy shelf page showing a badge earned for meeting all three daily targets, with empty shelf slots to fill
Figure 3. Trophy shelf — badge earned for meeting all three daily targets
UML class diagram showing controllers, HECCalculator, Session, Main, and the SampleController implementing the UserSignupHandler interface
Figure 4. Class structure — controllers, calculator, and signup interface

3.0 HUAWEI CLOUD DEPLOYMENT

After the SP module concluded, the project was extended and entered into the Huawei Developer Competition APAC 2023 as team StanleySP, under the project name “Wellness Avatar”. The local MySQL database was migrated to Huawei Cloud Relational Database Service (RDS), with a Huawei Cloud Elastic IP bound to the database endpoint so the desktop client reads and writes user profiles, daily inputs, and badge counts against the cloud instance instead of a local server.

The competition phase also included a small verification round — market interviews across age groups and a beta test spanning fitness enthusiasts to wellness-tracking newcomers — whose feedback drove refinements to terminology, navigation, and instructions.

Huawei Cloud console showing the running RDS MySQL instance in the Singapore region
Figure 5. Huawei Cloud RDS — MySQL instance (Singapore region)
Huawei Cloud network console showing the Elastic IP bound to the RDS instance with dynamic BGP bandwidth
Figure 6. Huawei Cloud Elastic IP — bound to the RDS instance

4.0 ERRATA & REVISIONS

The UI is built almost entirely from FXML Labels rather than components like TableView — a deliberate “design first, code second” trade-off to reproduce the Figma concept exactly, since TableView’s styling capability was too limited. The label-heavy approach is what motivated the LabelController abstraction; without it, scaling interactions across that many scenes would not have been maintainable.

If building this today, I would hash passwords instead of storing them directly in the user_details table, use prepared statements throughout the database layer, and replace the per-day label grid in the past-week view with a custom styled component. The calculation layer was the part I held to the highest standard at the time — the Harris-Benedict outputs were tested repeatedly, on the principle that a wrong “optimal” figure shown to a user is worse than a crash.