Ratio is a Kotlin Multiplatform Project with shared UI in Compose that targets both iOS and Android devices.
It's an app that users can use to find out their recommended PFC and calories intake based on several fatcors such as age, weight, activity level, height, intended goal and gender. It take's into account all these factors to generate their recommended daily PFC, calorie and water intake. Users can log their create meals, which comprises of various food items that make up that meal. Tired of having to measure your food before logging?, Ratio allows you to log food for meals just by specifying the size in any context; 'A can of coke', '3 small hard boiled eggs', '3 medium sized cupcakes', while also still being able to specify the size (in grams) if you're feeling picky; '230g of whole wheat bread' and so on. Users can as well find great recipes their nutritional information as well as share links to your friends or find out more information about them. 'Reports' allows users to log their weights and get a comprehensive graph of their weight journey as well. Users can also modify their PFC and Calories manually as they see fit.
demo-android.mp4
demo-ios.mp4
- commainMain:
- contains all the shared code between the platforms
- android:
- contains the android app
- iosMain:
- contains the ios app
- Kotlin Multiplatform
- Compose Multiplatform
- DataStore
- Koin
- ViewModel
- Room
- Coil
- Koala Plot
- Kotlinx.datetime
- Kotlinx.serialization
- Ktor
- SQLite KMP
To run this application you would need;
Notice You would need a Mac with macOS installed to write and run iOS-specific code on simulated or real devices. This is an Apple requirement.
- Stable internet connection
- Machine running macOS
- Android Studio & Xcode installed
- The Kotlin Multiplatform plugin
- Clone this repo:
git clone https://github.com/AdrianIkeaba/Ratio_Tracker
- Open the folder in Android Studio, and wait for all dependencies to be installed.
- Create a new emulator if you haven't already Create an emulator.
- In your configurations list select
composeApp. - Select your preferred virtual device and click Run
- To run on a physical Android device, enable
Wireless debuggingorUSB debugging. More info here
- In the list of configurations select iosApp and Run, if it doesn't exist, select Edit Configurations:
- Navigate to iOS Application | iosApp.
- In the Execution target list, select your target device and click OK:
- The
iosApprun configuration is now available. Click Run next to your virtual device:
- Click on Open existing project
- Navigate to the cloned project location, open the folder and select the sub-folder iosApp
- If you don't have an iOS simulator, Set up one
- Click on the ▶ button in the top left corner to build and run the the iOS target app.
