Skip to content

isalyne34/MealWeek

Repository files navigation

MealWeek

MealWeek is an Android application for weekly meal planning. It allows you to discover new recipes, plan your meals for each day of the week, and receive reminder notifications.


Overview

MealWeek helps you organize your weekly meals in just a few clicks:

  • Browse various recipes from the TheMealDB API
  • Plan your lunches and dinners for each day
  • Export your planning to your calendar
  • Receive notifications to remind you of your meals

The application is developed in Kotlin with Jetpack Compose for a modern and smooth interface.


Features

Recipe Discovery

  • Random recipe carousel on the home screen
  • Search recipes by name and by first letter
  • Detailed recipe display (ingredients, instructions, source)

Meal Planning

  • Add meals for each day of the week (Monday → Sunday)
  • Choose meal type: Lunch or Dinner
  • Conflict management: option to replace an already planned meal
  • Individual or bulk deletion of planned meals

Calendar Export

  • Export planned meals to the phone's Calendar app
  • Events created automatically:
    • Lunch: 12:00 PM - 1:00 PM
    • Dinner: 8:00 PM - 9:00 PM

Notifications

  • Automatic reminder at 12:00 PM for lunch
  • Automatic reminder at 7:00 PM for dinner
  • Notifications display the planned dish name
  • No notification if no meal is planned

Advertisements

  • Google AdMob banner ads integration

Technologies Used

Technology Usage
Kotlin Main language
Jetpack Compose Modern declarative UI
Material 3 Design system
Room Local database
Retrofit REST API calls
Coil Image loading
WorkManager Scheduled notifications
Navigation Compose Screen navigation
KSP Annotation processing
Google AdMob Ad monetization

Running the Project Locally

Prerequisites

  • Android Studio Ladybug (2024.2.1) or later
  • JDK 11 or higher
  • Android SDK with API level 24 minimum (Android 7.0)
  • An Android emulator or physical device

Installation

  1. Clone the repository

    git clone <repository-url>
    cd MealWeek
  2. Open in Android Studio

    • Launch Android Studio
    • Select File > Open
    • Navigate to the MealWeek folder and open it
  3. Sync Gradle dependencies

    • Android Studio should automatically prompt to sync
    • Otherwise, click File > Sync Project with Gradle Files
  4. Configure an emulator (optional)

    • Go to Tools > Device Manager
    • Create a new virtual device
  5. Run the application

    • Select the target device in the toolbar
    • Click the Run button

Required Permissions

The application requests the following permissions:

  • POST_NOTIFICATIONS: To send meal reminders
  • READ_CALENDAR / WRITE_CALENDAR: For calendar export (via Intent)

Testing Notifications

To test notifications without waiting until 12 PM or 7 PM:

  1. Open the file app/src/main/java/com/example/mealweek/workers/MealNotificationWorker.kt

  2. Modify the hours in the functions:

    fun scheduleLunchNotification(context: Context) {
        scheduleMealNotification(context, "Lunch", 12, 0) // Change 12, 0 to desired time
    }
    
    fun scheduleDinnerNotification(context: Context) {
        scheduleMealNotification(context, "Dinner", 19, 0) // Change 19, 0 to desired time
    }
  3. Relaunch the application


Project Structure

app/src/main/java/com/example/mealweek/
├── data/
│   ├── dao/              # Data Access Objects (Room)
│   ├── entity/           # Database entities
│   ├── mapper/           # Entity mappers
│   ├── remote/           # Data sources (API)
│   ├── MealDatabase.kt   # Room configuration
│   └── *Repository.kt    # Repositories
├── ui/
│   ├── components/       # Reusable UI components
│   ├── screens/          # Application screens
│   ├── theme/            # Material 3 theme
│   └── utils/            # Utilities (CalendarExporter)
├── workers/
│   └── MealNotificationWorker.kt  # Notification workers
└── MainActivity.kt       # Entry point

API Used

The application uses the free TheMealDB API to fetch recipes.


Screenshots

---

Project created as part of the DevMobile course in DO5.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors