Giter Site home page Giter Site logo

oianmol / slackandroidclone Goto Github PK

View Code? Open in Web Editor NEW
425.0 6.0 73.0 9.78 MB

Slack android clone with Jetpack Compose!

License: Apache License 2.0

Kotlin 99.90% Shell 0.10%
jetpack-compose jetpack jetpack-android jetpack-navigation jetpack-compose-tutorial jetpack-compose-animation

slackandroidclone's Introduction

Slack Android Clone with Compose is now in Kotlin Multiplatform!

Status: Active Development happening here https://github.com/oianmol/SlackComposeMultiplatform

This is a jetpack compose sample app written in Kotlin following clean architecture principles.

The purpose of this app to showcase:

  • Implementation of Jetpack Android Architecture components with Dagger Android and jetpack compose
  • Creation of proper components and Subcomponents using Dagger Android and their injection into Activity, Compose Views, View Models and Helper Classes
  • Performing background task with Kotlin Coroutines

Screenshots

Screenshots In Progress
drawing drawing
drawing drawing
drawing drawing
drawing drawing
drawing drawing
drawing drawing
drawing
drawing drawing

TODOs and questions to self

  • Rewrite the Colors and light/dark mode compatibility!
  • Should we have separate theme for each UI module ?
  • How to handle dynamic theme colors ?

🏗️️ Built with ❤️ using Jetpack Compose 😁

What How
🎭 User Interface (Android) Jetpack Compose
🏗 Architecture Clean
💉 DI (Android) Hilt
🌊 Async Coroutines + Flow
🌐 Networking Retrofit
📄 Parsing KotlinX

Languages, libraries and tools used

Architecture

SlackClone follows the principles of Clean Architecture with Android Architecture Components.

Architecture's layers & boundaries:

UI Layer contains UI (Activities, Composables, Fragments) that are coordinated by _ ViewModels which execute 1 or multiple UseCases._ Presentation Layer depends on Domain Layer.

Domain Layer is the most INNER part of the circle (no dependencies with other layers) and it contains Entities, Use cases & Repository Interfaces. Use cases combine data from 1 or multiple Repository Interfaces.

Data Layer contains Repository Implementations and 1 or multiple Data Sources. Repositories are responsible to coordinate data from the different Data Sources. Data Layer depends on Domain Layer.

Notes: Mapping between response models and transformed models will happen via extension functions defined in transformed model file

When writing a new ui module

  • First, Create a new android library module
  • Make sure to copy build.gradle.kts from other ui module and paste it in your ui-module
  • We need one fragment to host the composables, this fragment will be added to main nav graph.
  • the routing within compose world is handled with Compose Navigator
  • and to move out of one ui module you need to use the fragment navigator!

Conventions:

Files are suffixed with be defined Class types.

  • ViewModels are suffixed with VM. Ex: LoginVM
  • UseCases are suffixed with UseCase. Ex: LoginUseCase
  • Sources are suffixed with Source. Ex: LoginRemoteSource, LoginLocalSource
  • Repositories are suffixed with Repo. Ex: LoginRepo

Conclusion

This project can be used as a template for new apps. This project is continually evolving to integrate other libraries and techniques to keep it up to date.

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.