This project is designed to help individuals with diabetes manage their nutrition intake by tracking the nutritional values of different foods. It's a SwiftUI application for iOS and watchOS that allows users to search for foods, view their nutritional information, and calculate their total carbohydrate intake.
- Fetch nutrition data from a remote API.
- Search functionality to filter through the nutrition list.
- Select and track multiple nutrition items.
- Calculate the total carbohydrate of selected items.
- Profile view to input and save user's personal and diabetes-related information.
- CalculateView to provide insulin dosage recommendations based on user input and selected nutrition items.
A model to decode the JSON response from the API, containing an array of Nutrition objects.
Represents nutrition information, including id, name, serving size, calorie, sugar, carbohydrate, image, and nutrition type.
Defines the type of nutrition, including a name, image, and id.
Manages the fetching of nutrition data from the API, searching, and calculation of total carbohydrates.
The main view that displays the list of nutritions, search bar, selected nutrition items, and navigation to the profile view.
Allows users to input their diabetes type, blood sugar level, weight, and total daily dose of insulin. This data is then used in the CalculateView to provide personalized insulin dosage recommendations.
Calculates and displays insulin dosage recommendations based on the user's profile information and selected nutrition items.
- Clone the repository.
- Open the project in Xcode.
- Make sure you have a valid developer account set up in Xcode to run on an iOS device or simulator.
- Build and run the application.
- iOS 14.0+
- Xcode 12.0+
- Swift 5
TechRose Team