Skip to content

mena-rizkalla/CMP-Bookpedia

Repository files navigation

📚 CMP Bookpedia

Kotlin Version Compose Multiplatform

A modern, multiplatform book catalog application built with Kotlin and Compose Multiplatform, allowing users to search for books and view their details. This project demonstrates a clean architecture approach for building applications that share UI and business logic across Android and Desktop.

✨ Features

  • Cross-Platform: Runs on both Android and Desktop (JVM) with a single shared codebase.
  • Book Search: To search for books online.
  • Detailed View: Displays comprehensive details for each book, including title, author, description, and cover image.
  • Clean & Modern UI: A beautiful, responsive, and intuitive user interface built entirely with Compose Multiplatform.
  • Shared Logic: Business logic, data handling, and API calls are all written in common Kotlin code, shared across platforms.

🛠️ Tech Stack & Open-Source Libraries

  • Kotlin: The core programming language.
  • Compose Multiplatform: For building the declarative UI for both Android and Desktop.
  • Coroutines: For managing background threads and asynchronous operations.
  • Ktor Client: A multiplatform asynchronous HTTP client for making API requests.
  • Koin: A pragmatic and lightweight dependency injection framework for Kotlin.
  • [Room]: Used for local data persistence.
  • Coil: An image loading library for Android, backed by Kotlin Coroutines. (Or a similar multiplatform image loading library).

🏗️ Architecture

This project follows the principles of Clean Architecture, separating the code into three main layers:

  • :presentation: Contains the UI (Composables) and ViewModels. This layer is responsible for observing state and propagating user events.
  • :domain: Includes business logic, and repository interfaces. This layer is pure Kotlin and independent of any framework.
  • :data: Implements the repository interfaces and contains the data sources (network API calls with Ktor and local database with Room).

This separation of concerns makes the app scalable, maintainable, and easy to test.

Prerequisites

Cloning the Repository

git clone [https://github.com/mena-rizkalla/CMP-Bookpedia](https://github.com/mena-rizkalla/CMP-Bookpedia)

Running the Application

  1. Open the project in Android Studio or IntelliJ IDEA.
  2. Let Gradle sync and download all the required dependencies.
  3. To run on Android:
    • Select the composeApp run configuration.
    • Choose an emulator or connect a physical device.
    • Click the 'Run' button.
  4. To run on Desktop:
    • Select the desktopApp run configuration from the dropdown.
    • Click the 'Run' button.

Acknowledgements

This project was created by following the excellent Compose Multiplatform tutorial by Philipp Lackner. thank to him for providing high-quality educational content for the developer community.

Learn more about Kotlin Multiplatform

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published