Giter Club home page Giter Club logo

phood's Introduction

Phood - Discover Recipes

API Kotlin Clean Architecture MVVM

๐Ÿ• Phood: Is a modern Android app with Hilt, Coroutines, Flow, RestApi, Jetpack (Room, ViewModel), and Material Design based on Clean architecture and MVVM architecture. And also apply Modularization.


App Story

The application contains many branches, each branch contains a specific feature. For every branch, I made a Pull Request to explain the new feature that was added. I have not currently merged any branch with the develop branch and left all the PRs open as is, to facilitate review of the code through the reviewer.

About

This version of the application has a lot of features, plz go to the Releases to know what's new.

260891701-77cd21e7-d315-46fb-9508-ed3c569df4db.mp4

Project Architecture

This project follows the Clean Architecture structure and MVVM. The domain layer contains UseCases that encapsulate a single, specific task that is part of the application's business logic. The data layer implements the repository interface defined in the domain layer, providing a single source of truth for data. The UI layer uses all the components and classes related to the Android framework to get the data from the ViewModel layer and display it on the UI.

Structure (App Modules)

This project uses modularizing by feature. Every feature has it is one (data - domain - UI)

  + App <- The main module, handles hilt providers 
  + recipes/
      + data <- implements the repository interface defined in the domain layer
        - local 
        - remote
        - repositories
      + domain <- contains UseCases that encapsulate the business logic.
        - entities 
        - repository
        - usecases
      + UI <- uses MVVM with ViewModels exposing StateFlow that the UI consumes.
          - view
          - viewmodel
  + identity <- Have the same things as recipes module

Data and Dependenciy Flow:

This illustration from the clean architecture book shows the dependencies between the layers in an example app and the way data flows between them. (our app uses the same thing).

Tech stack & Open-source libraries

  • Minimum SDK level 21
  • Kotlin based, Coroutines + Flow for asynchronous.
  • Jetpack
    • Lifecycle: Observe Android lifecycles and handle UI states upon the lifecycle changes.
    • ViewModel: Manages UI-related data holder and lifecycle awareness. Allows data to survive configuration changes such as screen rotations.
    • StateFlow: For reactive style programming (from VM to UI).
    • DataBinding: Binds UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
    • Room: Constructs Database by providing an abstraction layer over SQLite to allow fluent database access.
    • Hilt: for dependency injection.
    • Navigation - Used to navigate between fragments
    • Material-Components - Material design components like ripple animation, cardView.
  • Architecture
    • Clean Architecture (Data - Domain - UI)
    • MVVM Architecture (View - DataBinding - ViewModel - Model)
    • Repository Pattern
  • Retrofit2 & OkHttp3: Construct the REST APIs and paging network data.
  • Media3: New home for media libraries that enables Android apps to display rich audio and visual experiences.
  • Coil: An image loading library for Android backed by Kotlin Coroutines.
  • Junit5: Serves as a foundation for launching testing frameworks on the JVM.
  • Kotlin-DSL - Used to handle gradle dependencies and config versions
  • ksp: Kotlin Symbol Processing API.

TODO

  • Recipes Screen
  • Recipe Details Screen
  • Recipes Favourites Screen
  • Search for Recipes Screen
  • Offline Caching
  • Migrate to KMM

License

Designed and developed by 2023 Moataz Mohamed

Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

phood's People

Contributors

moatazbadawy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.