Proxivity is a JavaFX desktop application designed for personal health tracking. It enables users to record food consumption and physical activities, manage daily calorie targets, view daily and weekly summaries, and export printable reports. The user interface uses FXML views with a shared sidebar for consistent navigation.
- Food logging (both quick calorie entries and food-library based entries)
- Activity tracking with calories burned calculation
- Calorie target creation and progress visualization (daily target with progress indicator)
- Daily summary and 7-day trend charts
- Reports view with PDF export for sharing or archiving
- Shared sidebar navigation and responsive page layouts
- AI Healthbot Assistant
Prerequisites:
- Java JDK 17 or later (set
JAVA_HOMEaccordingly) - Maven (on your
PATH)
Build and run (development):
mvn clean compile javafx:runRun from IDE: import the project as a Maven project and run the MainApp class.
Database:
- The app uses an embedded SQLite database. Schema and initial seed data are defined in
db/schema.sql. The database is created/initialized byproxivity.utils.Databaseat application startup.
| No. | Name | Student ID |
|---|---|---|
| 1 | Athilla Zaidan Zidna Fann | 13524068 |
| 2 | Bryan Pratama Putra Hendra | 13524067 |
| 3 | Kurt Mikhael Purba | 13524065 |
| 4 | Muhammad Aufar Rizqi Kusuma | 13524061 |
| 5 | Philipp Hamara | 13524101 |
repo-root/
├── pom.xml # Maven build file
├── db/ # database schema and seed data
|── doc # documentation of ui in the project
├── proxivity/ # main JavaFX application module
│ ├── src/
│ │ └── main/
│ │ ├── java/ # Java sources (package `proxivity`)
│ │ │ └── proxivity/
│ │ │ ├── controllers/
│ │ │ │ ├── LoginController.java
│ │ │ │ ├── RegisterController.java
│ │ │ │ ├── DashboardController.java
│ │ │ │ ├── CaloriesController.java
│ │ │ │ ├── ActivitiesController.java
│ │ │ │ ├── ProfileController.java
│ │ │ │ ├── TargetController.java
│ │ │ │ └── ReportsController.java
│ │ │ ├── dao/
│ │ │ │ ├── UserDAO.java
│ │ │ │ ├── ProfileDAO.java
│ │ │ │ ├── ActivitiesDAO.java
│ │ │ │ ├── CaloriesDAO.java
│ │ │ │ ├── DashboardDAO.java
│ │ │ │ └── TargetDAO.java
│ │ │ ├── models/
│ │ │ │ ├── User.java
│ │ │ │ ├── UserProfile.java
│ │ │ │ ├── ActivityEntry.java
│ │ │ │ └── CalorieEntry.java
│ │ │ ├── services/
│ │ │ │ └── ReportService.java
│ │ │ └── utils/
│ │ │ ├── Database.java
│ │ │ ├── SessionManager.java
│ │ │ └── PasswordUtils.java
│ │ └── resources/ # FXML, CSS, images (fxml/, css/, img/)
├── src/ # alternative/IDE source layout
├── target/ # build output
└── README.md
This simplified structure keeps the README readable while still communicating where to find UI code, DB access, and utilities.
Summary of the main modules implemented in this project. Each module includes its purpose and the primary package/components involved.
- Authentication & User Management: handles registration, login, and user sessions.
- Packages/components:
proxivity.controllers(LoginController,RegisterController),proxivity.dao(UserDAO),proxivity.utils(SessionManager,PasswordUtils).
- Packages/components:
- User Profile: stores and updates personal profile data (name, age, weight, height, gender).
- Packages/components:
proxivity.controllers(ProfileController),proxivity.dao(ProfileDAO),proxivity.models(UserProfile).
- Packages/components:
- Food & Calories: food library, calorie tracking, and quick calorie entries.
- Packages/components:
proxivity.controllers(CaloriesController),proxivity.dao(CaloriesDAO,FoodDAO/foodstable),proxivity.models(CalorieEntry,FoodEntry).
- Packages/components:
- Physical Activities: activity library and calories-burned calculations.
- Packages/components:
proxivity.controllers(ActivitiesController),proxivity.dao(ActivitiesDAO),proxivity.models(ActivityEntry).
- Packages/components:
- Dashboard & Reports: daily summary, 7-day trend, and PDF report export.
- Packages/components:
proxivity.controllers(DashboardController,ReportsController),proxivity.dao(DashboardDAO),proxivity.services(ReportService), utilPDFExporter.
- Packages/components:
- Calorie Targets: manage user calorie targets (create/update/delete) and UI notifications.
- Packages/components:
proxivity.controllers(TargetController),proxivity.dao(TargetDAO),proxivity.models(CalorieTarget).
- Packages/components:
- Schedule / To-Do: schedule items with priority and completion status.
- Packages/components:
proxivity.controllers(TodoController),proxivity.dao(ScheduleDAO/schedule_items).
- Packages/components:
- Utilities & Infrastructure: DB connection, sidebar helper, PDF exporter, event bus, etc.
- Packages/components:
proxivity.utils(Database,SidebarHelper,PDFExporter,UIEventBus,PasswordUtils).
- Packages/components:
UI files are stored as FXML under src/main/resources/fxml/ and styles under src/main/resources/css/.
The main database tables defined in db/schema.sql, with their primary columns and short descriptions.
-
users- Columns:
id(PK),username(UNIQUE),password,fullname. - Notes: stores user accounts; passwords are stored as hashes (Argon2) after the hashing feature is enabled.
- Columns:
-
profiles- Columns:
idProfil(PK),user_id(FK → users.id),name,age,weight,height,gender. - Notes: personal information for users.
- Columns:
-
foods- Columns:
id(PK),name,calories_per_serving. - Notes: food library used for choice-based entries.
- Columns:
-
activities- Columns:
id(PK),name,met_value. - Notes: activity library with MET values for calorie calculation.
- Columns:
-
daily_logs- Columns:
id(PK),user_id(FK),date,food_id(nullable),activity_id(nullable),amount,calories. - Notes: daily records for food or activity. A CHECK constraint ensures an entry is either food or activity.
- Columns:
-
calorie_targets- Columns:
id(PK),user_id(FK),target_kcal,start_date,end_date. - Notes: calorie targets per user for a given period.
- Columns:
-
schedule_items- Columns:
id(PK),user_id(FK),title,description,start_time,end_time,priority,status. - Notes: schedule/to-do items with priority and completion status.
- Columns:
-
calorie_entries- Columns:
id(PK),user_id(FK),food_name,calories,entry_date,created_at. - Notes: quick manual calorie entries without selecting from
foods.
- Columns:
Additional notes:
- Indexes:
idx_daily_logs_user_date,idx_calorie_targets_user,idx_schedule_items_user_date,idx_calorie_entries_user_date. - Many tables use
FOREIGN KEYreferences tousers(id)withON DELETE CASCADE, so related data is removed when an account is deleted.
- Fork this repository
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m "This is my feature" - Push the changes to your branch:
git push origin feature/your-feature-name
- Open a new pull request. If the feature meet the criteria, your feature will be considered to be included in the project!
This project is licensed under the MIT License.
