Skip to content

CS300-DailyApple/DailyApple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

177 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DailyApple

A nutrition and health tracking Android app built with Java for the CS300 course. DailyApple helps users log daily meals, track calorie and water intake, monitor body statistics over time, and receive personalized food suggestions — all backed by Firebase.

Features

For Users

  • Meal Logging — Add foods and dishes to daily meals with detailed nutritional information.
  • Calorie Tracking — Monitor daily calorie intake with history and bar chart visualizations.
  • Water Intake Tracking — Log water consumption throughout the day with history and charts.
  • Body Statistics — Record and update body measurements (weight, height, etc.) over time.
  • Food Suggestions — Get personalized food recommendations based on your profile.
  • Nutritional Breakdown — View detailed nutrition data (macros, compounds) for each food item.
  • Dish Contributions — Contribute your own dishes and recipes to the community food database.
  • Summary Statistics — View overall nutritional summaries and progress charts.
  • Notifications — Scheduled reminders to log meals and stay on track.

For Admins

  • Food Database Management — Create, edit, and manage the food catalog with full nutritional details.
  • User Management — View and manage registered user accounts.
  • Contributed Dish Review — Oversee community-contributed dishes.

Tech Stack

Layer Technology
Language Java
Platform Android (min SDK 33, target SDK 33, compile SDK 34)
Backend / Database Firebase (Auth, Firestore, Analytics)
Charts MPAndroidChart, EazeGraph
Navigation AndroidX Navigation (Fragments)
UI Material Design Components, ConstraintLayout
Build System Gradle (Kotlin DSL)
Testing JUnit 4, Mockito, Robolectric, Espresso

Project Structure

.
├── docs/                          # Project documentation
├── pa/                            # Course project assignments (pa1–pa4)
└── src/                           # Android application source
    ├── build.gradle.kts           # Root Gradle config
    ├── settings.gradle.kts
    ├── gradle/
    └── app/
        ├── build.gradle.kts       # App-level dependencies & config
        └── src/
            ├── main/
            │   ├── AndroidManifest.xml
            │   ├── java/com/example/cs300_dailyapple/
            │   │   ├── MainActivity.java
            │   │   ├── Fragments/     # UI screens (see below)
            │   │   ├── Models/        # Data models
            │   │   └── Services/      # Backend & utility services
            │   └── res/               # Layouts, drawables, values, etc.
            └── androidTest/           # Instrumentation tests

Key Packages

Fragments/ — All UI screens implemented as Android Fragments:

Area Screens
Auth Login, Create Account, Reset Password, Change Password
Home User Home, Admin Home
Meals Meal Logging, Add Dish, Edit Food, Custom Food in Meal
Food Food List, Food Detail, Suggested Food
Tracking Calorie Record, Water Drinking, Water History, Charts
Body Body Information, Update Body Statistics
Admin Food List Management, Food CRUD, User List, User Detail
Community Dish Contribution, Dish Settings

Models/ — Domain data classes:

Model Description
User User profile and account info
PersonalInformation User personal details
BodyInformation Body measurements and stats
Food Individual food item
FoodCompound Food with compound ingredients
Nutrition Nutritional data for a food item
NutritionOverall Aggregated nutritional summary
DailyMeal A logged meal for a given day
SuggestedFood Food recommendation entry
WaterInformation Water intake data
WaterHistoryItem Historical water log entry
GlobalApplication App-wide state and configuration

Services/ — Backend and system services:

Service Description
AuthService Firebase Authentication (login, register, password reset)
DataService Firestore CRUD operations for all data models
NotificationScheduler Schedules meal/water reminders
NotificationReceiver Handles triggered notification broadcasts

Getting Started

Prerequisites

  • Android Studio (Hedgehog or newer recommended)
  • Android SDK 34
  • A Firebase project with Auth and Firestore enabled
  • A google-services.json file placed in src/app/

Installation

# Clone the repository
git clone https://github.com/CS300-DailyApple/DailyApple.git
cd DailyApple/src

# Open in Android Studio, or build from the command line:
./gradlew assembleDebug

Running

  1. Open the src/ directory in Android Studio
  2. Add your google-services.json to src/app/
  3. Sync Gradle
  4. Run on an emulator or physical device (API 33+)

Running Tests

# Unit tests
./gradlew test

# Instrumentation tests (requires a connected device or emulator)
./gradlew connectedAndroidTest

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m "Add my feature")
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

This project does not currently specify a license. Please contact the repository maintainers for usage terms.

About

A nutrition and health tracking Android app built with Java and Firebase. Log daily meals, track calories and water intake, monitor body stats with charts, and get personalized food suggestions - with a separate admin panel for managing the food database and users.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages