A world-class Kotlin Multiplatform chat application demonstrating Clean Architecture principles with Component-Based UI design.
- π― Clean Architecture with proper layer separation
- π§© Component-Based UI with 6 reusable components
- π¬ Real-time messaging with mock smart auto-responses
- β³ Animated typing indicators with smooth transitions
- π₯ User switching to simulate conversations
- π¨ Material 3 Design with custom theming
- π± Cross-platform (Android & iOS ready)
src/commonMain/kotlin/org/cmppractice/app/
βββ π― domain/ # Pure Business Logic
β βββ model/ # Domain entities
β βββ repository/ # Repository interfaces
β βββ usecase/ # Business use cases
βββ πΎ data/ # Data Access Layer
β βββ di/ # Data dependencies
β βββ model/ # Data entities (DTOs)
β βββ mapper/ # Data β Domain mapping
β βββ repository/ # Repository implementations
βββ π¨ presentation/ # UI Layer
β βββ component/ # 6 Reusable UI components
β βββ screen/ # Screen composables
β βββ viewmodel/ # State management
β βββ theme/ # Material 3 theming
β βββ di/ # UI dependencies
βββ π App.kt # Composition root
- Android Studio Hedgehog+ (2023.1.1+)
- JDK 17+
- Android SDK 35+
# Clone the repository
git clone https://github.com/yourusername/CMPPractice.git
cd CMPPractice
# Run on Android
./gradlew :composeApp:installDebug
# Or open in Android Studio and run- Send Messages: Type and send messages as User1
- Smart Responses: Watch auto-responses from User2
- Switch Users: Tap the person icon to switch perspectives
- Typing Indicator: See animated typing feedback
- Clear Chat: Use the clear button to reset
- β Maintainable: Clear separation of concerns
- β Testable: Each layer independently testable
- β Scalable: Easy to add features
- β Reusable: Components work across screens
- β Professional: Industry best practices
Detailed documentation is available in the docs/ folder:
- π Complete Architecture Guide - Full technical overview
- π§© Component Architecture - UI component breakdown
- π¬ Demo Showcase - Interactive demo guide
- ποΈ Clean Architecture Principles - Architecture fundamentals
- π Documentation Index - Complete navigation
- Language: Kotlin 2.2.0
- UI Framework: Compose Multiplatform 1.8.2
- Architecture: Clean Architecture + MVI (State & Event)
- Design System: Material 3
- State Management: Flow + StateFlow
- Dependency Injection: Manual DI with modules
- Testing: Kotlin Test + Coroutines Test
The chat application running on both iOS and Android platforms, showcasing the unified Material 3 design and responsive UI components.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Kotlin Multiplatform
- UI powered by Compose Multiplatform
- Architecture inspired by Clean Architecture
β Star this repo if you found it helpful!
