AnelCC / FlickrApp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to FlickrApp

Android App

Develop in android over MVVM, Kotlin, Android Clean Architecture, Coroutines, Retrofit, Gson, Hilt, Room Database, Testing, etc.

About the project

This is using this Flickr Api Libraries, I develop this application. Is a grid where you can select the imagen and see the detail.

  • Api flickr.photos.search Doc
  • Api flickr.photos.getRecent Doc

Build by branches

  1. Planing the architecture Code here
  2. Thinking in the UI Code here
  3. Working on the real data Code here
  4. Use Navigation Code here
  5. Error Always happened Code here
  6. Testing Code here
  7. Room DataBase Code here

Package Structure

com.anelcc.FlickrApp    # Root Package
.
├── core                # Core and Data are part of the data layer contains application data and business logic. 

│   │── ApiService      # For API Service,this handled the method or endpoints from network API.
│   └── Constants   
│ 
├── database             # This section contains the database instance and the repository
│   │── HistoryDao       # We are Save data in a local database using Room.
│   │── His...Repository # I Defined data using Room entities
│   └── His...Database   # This is implemented simple queries 
│ 
├── data                # For API Repositories, Model classes, and  local data and to handle network responses.
│   │── Model           # The data layer is made of repositories that each can contain zero to many data sources.
│   │── ManagerService  # The data layer is for repository and data sources. 
│   └── Repository       
│
├── di                   # Dependencies injection will help to provide the information easy and faster
│   └── NetworkModule    # The modules for the Api network and local data are declare here to ve provided. 
│
├── domain                       # The domain layer is responsible for encapsulating complex business logic, 
│   │── BuildPictureListUseCase  # or simple business logic that is reused by multiple ViewModels. 
│   │── PicturesFlickrUseCase    # Use Case is the package where the user’s work is defined, that is,
│   └── SearchPicturesUseCase    # the whole business logic of the project.
│
├── presentation           # The role of the UI layer (or presentation layer) is to display the application data on the screen. 
│   │── detail screen      # UI elements that render the data on the screen. 
│   │── home screen        # These elements using Views or Jetpack Compose functions.
│   │── utils screen       # State holders (such as ViewModel classes) that hold data, expose it to the UI, and handle logic.
│   └── View Model         # View model It exposes state to the UI and encapsulates related business logic. but it control all UI elements states.
│
├── ui.theme               # This contain the style and colors setted in the app
├── utils                  # This contain view shared by app level lile Top Bar navigation that can be used for other screens
├── FlickrApp              # This define the start point and all modules and entry points that should be installed in the component 
│                          # need to be transitive compilation dependencies of the annotated application.
└── MainActivity           # Main Activity define the first screen or the launcher view.

Preview 🎉

Project Setup

Android Studio Version

This project is using android studio Flamingo | 2022.2.1 to development. If you find incompatibility please check the official documentation: Read here Download Android Studio

Kotlin Version and gradle version

Gradle version is 8.0.0 make sure you have set up in the gradle-wrapper.properties as: distributions/gradle-8.0-bin.zip

Latest Kotlin EAP release: 1.7.20 This project is running on the version 1.7.20 make sure you have your project correct setup. id 'org.jetbrains.kotlin.android' version '1.7.20' apply false

If you need more info please check this: Read here Read here Read here

Android JDK Version

Make sure you have the correct version of the JDK setup in your gradle project. if you did know how select or download go to: Android Studio > settings > Build, Execution, Deployment › Build Tools › Grade in Grade projects: Gradle select Use Gradle from: 'gradle-wrapper.properties' file Gradle JDK: JetBrains Runtime version 17.0.6/... JDK Version Doc

Library References

  1. Android Clean Architecture Read here
  2. Android Components Navigation Read here
  3. Kotlin Read here
  4. Android Coroutines Here.
  5. Android flow Here.
  6. Retrofit Read here
  7. okhttp3 Read here
  8. Gson Read here
  9. Room Database Read here
  10. Dependency Injections Read here
  11. Jetpack Read here
  12. Hilt & Jetpack Read here
  13. Compose Read here
  14. Compose State Read here
  15. MVVM Read here
  16. View Models Read here
  17. DataModel Read here
  18. Coil Compose Read here
  19. Testing Read here
  20. Coroutines testing Read here
  21. Mocking Android dependencies Read here

About


Languages

Language:Kotlin 100.0%