Skip to content

Kafabih/List-User-App

Repository files navigation

User List Application

This is an Android application built with Kotlin Multiplatform and Compose Multiplatform that allows users to view, search, sort, and filter a list of users. It also supports adding new users and works offline.

Features

  • View User List: Paginated list of users with smooth scrolling.
  • Search: Search for specific users by name.
  • Sort: Sort users by name.
  • Filter: Filter users by city.
  • Add User: Add new users to the list.
  • Offline Support: Local persistence using Room Database.
  • Pagination: Efficient loading of data using Paging 3 and RemoteMediator.

Technology Stack

  • UI: Compose Multiplatform (Jetpack Compose).
  • Architecture: Clean Architecture with MVVM.
  • Dependency Injection: Hilt (Android side).
  • Networking: Ktor Client.
  • Local Persistence: Room Database (KMP).
  • Pagination: Paging 3.
  • Image Loading: Coil 3.
  • Concurrency: Kotlin Coroutines & Flow.
  • Serialization: Kotlinx Serialization.

Design Choices

  • Clean Architecture: Separation of concerns into Domain, Data, and UI layers ensures the app is maintainable and testable.
  • MVVM: State management using ViewModels and Flows provides a reactive UI.
  • Room + RemoteMediator: This combination ensures a "Single Source of Truth" strategy, where the UI always observes the local database, and the RemoteMediator handles syncing with the network. This provides seamless offline support and smooth pagination.
  • Material 3: The UI follows Material Design 3 guidelines for a modern and accessible look.
  • Adaptive Layout: Designed to work well on different screen sizes.

How to Use

  1. Build and Run: Use Android Studio to run the composeApp on an Android device or emulator.
  2. Search: Use the search bar at the top to find users by name.
  3. Sort/Filter: Tap the filter icon to change sorting or filter by city.
  4. Add User: Tap the Floating Action Button (+) to add a new user.
  5. Offline: Disable your internet connection; the app will still show previously loaded users from the local database.

API Endpoint

The application uses a RESTful API for CRUD operations. (Note: Replace the placeholder BASE_URL in UserApiService.kt with the actual Accurate API endpoint).


Build Instructions

  • Android: ./gradlew :composeApp:assembleDebug
  • iOS: Open iosApp in Xcode (still ondevelopment).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors