Mobile Development Final Project | Group 5
- Table of Contents
- Introduction
- Contributors
- Features
- Screenshots
- Tech Stack & Architecture
- Getting Started
- Architecture Overview
- Acknowledgments
NutriVision is a modern Android application designed to help users make healthier and more informed food choices. By simply scanning a product's barcode with their phone's camera, users get instant access to detailed nutritional information, powered by the comprehensive Open Food Facts database.
This app is perfect for anyone conscious about their daily nutritional intake, from athletes and individuals with specific dietary needs (like diabetes) to the general public pursuing a healthier lifestyle.
| No. | Name | NIM | GitHub |
|---|---|---|---|
| 1 | Riyaldi Hasan Setiawan | L0122141 | GitHub |
| 2 | Rifqi Makarim | L0123122 | GitHub |
| 3 | Rasendria Acyuta Aji Candra | L0123116 | GitHub |
- Barcode Scanner: Instantly scan food product barcodes using the device's camera to fetch product data.
- Detailed Product Information: View comprehensive data including product name, image, brand, ingredients, and a full nutritional breakdown (energy, sugar, fat, protein, salt, etc.).
- Scan History: Keeps a list of previously scanned products, allowing users to quickly access information without needing to scan again.
- Light & Dark Mode: Seamlessly switches between light and dark themes based on the system settings to ensure user comfort.
- BMI Calculator: An integrated tool to calculate Body Mass Index (BMI) and receive personalized nutrition tips based on the result.
- User Authentication & Cloud Sync:
- Sign Up: Create a personal account using Firebase Authentication.
- Login: Access your account to load and manage your user data.
- Profile Management: User data (like BMI details and profile picture URL) is stored securely in Firebase Firestore and Cloudinary.
| Splash Screen | Login | Sign Up |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
| Home | Scan | Detail Scan |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Profile | Edit Profile | BMI |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| BMI Result | Scan History | |
|---|---|---|
![]() |
![]() |
|
![]() |
![]() |
This project is built with a modern Android development tech stack, following the principles of Clean Architecture and the MVVM (Model-View-ViewModel) pattern.
- UI: Jetpack Compose
- Asynchronous: Kotlin Coroutines
- Dependency Injection: Hilt
- Networking: Retrofit 2
- Local Storage: Room
- Image Loading: Coil
- Navigation: Jetpack Compose Navigation
- Backend Services:
- Firebase Authentication for user sign-up and login.
- Firebase Firestore for storing user profile data.
- Cloudinary for hosting user-uploaded profile images.
To get a local copy up and running, follow these simple steps.
- Android Studio (latest version recommended)
- A Google Account for Firebase
- A Cloudinary Account
-
Clone the repository
git clone https://github.com/riyhs/NutriVision.git
-
Set up Firebase
- Go to the Firebase Console.
- Click Add Project and follow the on-screen instructions to create a new project.
- Inside your new project, click Add app and select the Android icon (▶).
- Enter the application's package name:
com.nutrivision.app. - Download the
google-services.jsonfile. - Place the downloaded
google-services.jsonfile in theapp/directory of the project. - In the Firebase Console, navigate to the Authentication section and enable the Email/Password sign-in method.
- Navigate to the Firestore Database section and create a new database. Start in test mode for easy setup (you can change the security rules later).
-
Set up Cloudinary
- Log in to your Cloudinary account.
- From your Dashboard, find your Cloud Name, API Key, and API Secret.
- Create a file named
local.propertiesin the root directory of the project (the same level asbuild.gradle.kts). - Add your Cloudinary credentials to the
local.propertiesfile:CLOUDINARY_CLOUD_NAME="your_cloud_name" CLOUDINARY_API_KEY="your_api_key" CLOUDINARY_API_SECRET="your_api_secret"
-
Open and Run in Android Studio
- Open the cloned project in Android Studio.
- Let Android Studio sync the Gradle files.
- Run the app on an emulator or a physical device.
The application's architecture is divided into three main layers:
This is the core of the application. It contains the business logic, data models (Product, User), and repository interfaces (ScanRepository, AuthRepository). This layer is independent of any framework specifics.
This layer is responsible for providing data to the domain layer. It contains implementations of the repository interfaces and manages remote (Retrofit ApiService, Firebase), cloud (Cloudinary), and local (Room DAO) data sources.
This layer is responsible for displaying the application's UI. It's built with Jetpack Compose and uses ViewModels (ScanViewModel, AuthViewModel) to manage UI state and interact with the domain layer.
- This project heavily relies on the data provided by the Open Food Facts API. A huge thank you to their community for maintaining this open database.




















