Skip to content

parkuskus/Proxivity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxivity

Proxivity Logo

1. General Description

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.

2. Feature

  • 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

3. Installation

Prerequisites:

  • Java JDK 17 or later (set JAVA_HOME accordingly)
  • Maven (on your PATH)

Build and run (development):

mvn clean compile javafx:run

Run 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 by proxivity.utils.Database at application startup.

4. Contributors

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

5. Directory Structure

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.

6. Implemented Modules

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).
  • User Profile: stores and updates personal profile data (name, age, weight, height, gender).
    • Packages/components: proxivity.controllers (ProfileController), proxivity.dao (ProfileDAO), proxivity.models (UserProfile).
  • Food & Calories: food library, calorie tracking, and quick calorie entries.
    • Packages/components: proxivity.controllers (CaloriesController), proxivity.dao (CaloriesDAO, FoodDAO / foods table), proxivity.models (CalorieEntry, FoodEntry).
  • Physical Activities: activity library and calories-burned calculations.
    • Packages/components: proxivity.controllers (ActivitiesController), proxivity.dao (ActivitiesDAO), proxivity.models (ActivityEntry).
  • Dashboard & Reports: daily summary, 7-day trend, and PDF report export.
    • Packages/components: proxivity.controllers (DashboardController, ReportsController), proxivity.dao (DashboardDAO), proxivity.services (ReportService), util PDFExporter.
  • Calorie Targets: manage user calorie targets (create/update/delete) and UI notifications.
    • Packages/components: proxivity.controllers (TargetController), proxivity.dao (TargetDAO), proxivity.models (CalorieTarget).
  • Schedule / To-Do: schedule items with priority and completion status.
    • Packages/components: proxivity.controllers (TodoController), proxivity.dao (ScheduleDAO / schedule_items).
  • Utilities & Infrastructure: DB connection, sidebar helper, PDF exporter, event bus, etc.
    • Packages/components: proxivity.utils (Database, SidebarHelper, PDFExporter, UIEventBus, PasswordUtils).

UI files are stored as FXML under src/main/resources/fxml/ and styles under src/main/resources/css/.

7. Implemented Database Tables

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.
  • profiles

    • Columns: idProfil (PK), user_id (FK → users.id), name, age, weight, height, gender.
    • Notes: personal information for users.
  • foods

    • Columns: id (PK), name, calories_per_serving.
    • Notes: food library used for choice-based entries.
  • activities

    • Columns: id (PK), name, met_value.
    • Notes: activity library with MET values for calorie calculation.
  • 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.
  • calorie_targets

    • Columns: id (PK), user_id (FK), target_kcal, start_date, end_date.
    • Notes: calorie targets per user for a given period.
  • 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.
  • calorie_entries

    • Columns: id (PK), user_id (FK), food_name, calories, entry_date, created_at.
    • Notes: quick manual calorie entries without selecting from foods.

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 KEY references to users(id) with ON DELETE CASCADE, so related data is removed when an account is deleted.

8. How to Contribute

  1. Fork this repository
  2. Create a new branch:
    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:
    git commit -m "This is my feature"
  4. Push the changes to your branch:
    git push origin feature/your-feature-name
  5. Open a new pull request. If the feature meet the criteria, your feature will be considered to be included in the project!

9. License

This project is licensed under the MIT License.

About

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.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors