Skip to content

Compose Multiplatform + Kotlin Multiplatform Mobile + Clean Architecture + MVI + JetPack Compose + Swift UI + Koin + Ktor

Notifications You must be signed in to change notification settings

magneto3572/AniVerse

Repository files navigation

AniVerse

AniVerse is a Compose Multiplatform Mobile (CMP) application designed for both Android and iOS platforms. It utilizes modern development practices with Clean Architecture and Model-View-Intent (MVI). AniVerse supports platform-specific native UI components while sharing the business logic.

📸 Screenshots

Android UI iOS UI

🌟 Features

  • Cross-Platform Compatibility: Unified shared business logic for Android and iOS.
  • Shared UI : Built using jetpack compose
  • Architecture: Implements MVI for predictable and reactive state management.
  • Networking: Powered by Ktor for efficient and flexible API communication.
  • Dependency Injection: Modular and testable code with Koin.

📖 How AniVerse Leverages KMP

AniVerse maximizes the potential of Kotlin Multiplatform Mobile by sharing core business logic while maintaining platform-specific UI experiences.

Shared Code (Business Logic)

The shared module contains all reusable code:

  • Data Layer: Manages data fetching via Ktor, mapping, and DTOs.
  • Domain Layer: Includes use cases, repository abstractions, and business logic.
  • Presentation Layer: Includes intent, viewmodels, and UiState.

Shared UI

  • Android & iOS: Both platforms use Jetpack Compose to implement the UI, ensuring a consistent look and feel across devices while adhering to platform-specific guidelines.

🛠️ Prerequisites

Before setting up the project, ensure you have the following:

  1. Kotlin 1.9+ with the KMM plugin installed.
  2. Android Studio Giraffe or later for Android development.
  3. Xcode 14.0+ for iOS development.
  4. Gradle 8.0+ for project builds.

📂 Project Structure

AniVerse/
├── androidApp/                            # Android application module
│   └── ...
├── iosApp/                                # iOS application module
│   └── ...
├── shared/                                # Shared KMM module
│   ├── commonMain/                        # Shared business logic for both platforms
│   │   └── kotlin/
│   │       └── com/
│   │           └── generativeai/aniverse/
│   │               ├── data/              # Data layer
│   │               │   ├── di/            # Dependency injection for data layer
│   │               │   ├── dto/           # Data Transfer Objects
│   │               │   ├── mappers/       # Data mapping between layers
│   │               │   ├── remote/        # API communication
│   │               │   └── repositoryImpl/# Repository implementations
│   │               ├── domain/            # Domain layer
│   │               │   ├── constants/     # Constant values
│   │               │   ├── di/            # Dependency injection for domain layer
│   │               │   ├── model/         # Domain models
│   │               │   ├── repository/    # Repository interfaces
│   │               │   ├── usecases/      # Business use cases
│   │               │   └── utils/         # Utility functions
│   │               └── presentation/      # Presentation layer
│   │                   ├── di/            # Dependency injection for presentation
│   │                   ├── intent/        # User intents
│   │                   ├── stateHandler/  # State handlers for MVI
│   │                   ├── uiState/       # UI State models
│   │                   └── viewModel/     # ViewModels for state management
│   └── ...

🚀 Getting Started

Clone the Repository

To get started, clone the AniVerse repository:

git clone https://github.com/magneto3572/AniVerse.git

Running on Android

  1. Open the project in Android Studio.
  2. Build the project using the Build menu or with Gradle.
  3. Run the app on an emulator or a physical Android device.

Running on iOS

  1. Open the iosApp folder in Xcode.
  2. Configure the target scheme and select a simulator or a physical iOS device.
  3. Build and run the app.

Screen_recording_20241203_213134.mp4
Simulator.Screen.Recording.-.iPhone.15.-.2024-12-03.at.21.31.14.1.1.mp4

📧 Contact

For queries, suggestions, or feedback, feel free to reach out at: