Skip to content

ertuakkaya/FoodAppKMP

Repository files navigation

FoodAppKMP

This project is a food ordering application developed using Kotlin Multiplatform and Compose Multiplatform, targeting both Android and iOS platforms.

Architecture

The project is based on the principles of Clean Architecture and the MVVM (Model-View-ViewModel) pattern to ensure testability, sustainability, and a clear separation of responsibilities between layers.

  • Domain Layer: Contains platform-independent business rules, models, and use cases.
  • Data Layer: Houses data sources (API, database), repository implementations, and data transfer objects (DTOs).
  • Presentation Layer: Includes ViewModels and UI components created with Jetpack Compose.

🛠️ Technology and Libraries

🚀 Features

  • List foods
  • Add and remove products from the cart
  • Update the quantity of products in the cart
  • User login and registration (planned)

⚙️ Setup and Run

Android

  1. Open the project in Android Studio.
  2. Select the composeApp configuration.
  3. Run the application on an emulator or a physical device.

iOS

  1. You need a macOS device and Xcode to run the project.
  2. In the terminal, in the project root directory, prepare the Xcode project with the following command:
    ./gradlew podInstall
  3. Open the iosApp/iosApp.xcworkspace file with Xcode.
  4. Select a simulator or a connected iOS device and run the application.

📂 Project Structure

  • composeApp: Contains the code shared between platforms (commonMain, androidMain, iosMain).
    • commonMain: Common Kotlin code for all targets.
    • androidMain: Android-specific code and resources.
    • iosMain: iOS-specific code.
  • iosApp: Contains the Xcode project and Swift code for the iOS application.

📄 API Documentation

The API endpoints used by the application are specified below.

Base URL: http://kasimadalan.pe.hu/

Get All Foods

  • Endpoint: GET /yemekler/tumYemekleriGetir.php
  • Description: Returns a list of all available foods.

Add Food to Cart

  • Endpoint: POST /yemekler/sepeteYemekEkle.php
  • Description: Adds the specified food to the cart.

Get Cart Foods

  • Endpoint: POST /yemekler/sepettekiYemekleriGetir.php
  • Description: Lists the products in the user's cart.

Remove Food from Cart

  • Endpoint: POST /yemekler/sepettenYemekSil.php
  • Description: Deletes the specified food from the cart.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors