Coder Social home page Coder Social logo

auron567 / gallerit Goto Github PK

View Code? Open in Web Editor NEW
219.0 4.0 20.0 2.17 MB

A sample Android gallery to search images posted on Reddit, built using modern Android development tools (Architecture Components, MVVM, Coroutines, Flow, Navigation, Retrofit, Room, Koin)

License: MIT License

Kotlin 100.00%
android kotlin gradle-kotlin-dsl kotlin-flow stateflow coroutines singleactivityapp repository-pattern mvvm viewmodel

gallerit's Introduction

Header

Gallerit

Kotlin AGP Gradle

Kotlin Weekly

Gallerit is a small demo application that presents a modern approach to Android development with up to date tech-stack. The goal of the project is to demonstrate best practices using modern Android development tools and presenting an architecture that is scalable, maintainable, and testable.

Project characteristics

Libraries

  • Coroutines - For managing background threads.
  • Flow - A cold asynchronous data stream that sequentially emits values.
  • StateFlow - A Flow that represents a state with a single updatable data value.
  • Jetpack
    • ViewModel - Store UI-related data that isn't destroyed on app rotations.
    • LiveData - Build data objects that notify views when the underlying database changes.
    • Lifecycle - Create a UI that automatically responds to lifecycle events.
    • Navigation - Handle everything needed for in-app navigation.
    • Room - Access your app's SQLite database with in-app objects and compile-time checks.
  • Retrofit - A type-safe HTTP client.
  • Glide - An image loading and caching library.
  • PhotoView - Implementation of ImageView that supports zooming.
  • Koin - A pragmatic lightweight dependency injection framework.
  • Timber - A logger with a small, extensible API.
  • MockK - Mocking library for Kotlin.
  • Kotest - Powerful, elegant and flexible test framework for Kotlin.
  • and more...

Architecture

Gallerit is based on MVVM architecture, fetching data from the network and integrating persisted data in the database via repository pattern.

Architecture

Reddit API

Gallerit uses the Reddit API to load images on the gallery screen.

GitHub Actions

GitHub Actions verify project correctness on every push to master branch and on every PR. All of the tasks run in parallel.

These are all of the Gradle tasks that are workflows:

  • ./gradlew test - Run unit tests
  • ./gradlew detekt - Run detekt
  • ./gradlew lint - Run Android lint
  • ./gradlew ktlintCheck - Run ktlint check
  • ./gradlew assembleDebug - Build debug APK

Getting started

There are a few ways to open this project.

Android Studio

  1. Android Studio -> File -> New -> Project from Version Control
  2. Enter https://github.com/auron567/Gallerit.git into URL field

Command line + Android Studio

  1. Run git clone https://github.com/auron567/Gallerit.git
  2. Android Studio -> File -> Open

Contribute

If you want to contribute to this application, you're always welcome! You can contribute by filing issues, bugs and PRs.

License

All the code available under the MIT License. See LICENSE.

MIT License

Copyright (c) 2020 Mario Salvatore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

gallerit's People

Contributors

alaegin avatar auron567 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gallerit's Issues

No precompiled package?

I don't know how to build apps...the concept of your app is very interesting ,, especially since it's made with kotlin..could u make a release with Already built apk?

Doesn't work at all with darkmode

I feel like you need to improve the way you theme your app. You should define two themes with almost identical settings except in places where one uses light colors for icons and text the other uses dark colors. Put the one that uses light colors in values/night/app_theme.xml and the one that uses dark colors in values/app_theme.xml. That way depending on the user's night mode settings, the colors would change automatically. I could do it myself too but the architecture of the app is kind of too much for me.

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.