GithubHelp home page GithubHelp logo

ericksumargo / dads Goto Github PK

View Code? Open in Web Editor NEW
245.0 8.0 21.0 15.78 MB

*BA DUM TSSS*

License: MIT License

Kotlin 100.00%
dad-jokes kotlin clean-architecture firebase apollo-graphql mvvm unidirectional-data-flow jetpack androidx leakcanary truth javapoet lottie kotlin-gradle-dsl kotlin-multiplatform sqldelight

dads's Introduction

CI codecov Fossa Status Android Weekly Google Developer Library

Just an app with lame dad jokes content to fill up your day.

MVP

This MVP version features:

  • Feed walks you through the latest dad jokes,
  • Browse back seen jokes & share your favorite ones,
  • Notification to remind you up with latest available jokes,
  • Light/ Dark theme based on preference.

Stacks

Foundation

UI

Internal

  • LiveListAdapter
    ListAdapter w/ every visible cell (ViewHolder) is reactive. Cell acts like observer of data they hold, so it will auto-refresh if their related data is updated.
  • RenderExecutor Processor
    Processor for RenderWith annotation. Diff-state engine generator for rendering view component.

Remote

Testing

  • Espresso - Android UI tests.
  • Hilt Testing - For swapping production dependencies with test doubles.
  • Truth - Assertion framework in tests by Google.

Health

  • Firebase Crashlytics - Collecting crash report for production environment.
  • LeakCanary (Debug) - Memory leak detector.
  • StrictMode (Debug) - Tool for checking if any should-be-background operation is done on main thread.

MAD Scorecard




Supports

Dads is ready to support multiplatform with the Clean Architecture concept for project structure (data-domain-presentation).

JVM, JS, or Native, He is just waiting your implementation of presentation part!

Architecture

Dads adopts MVVM with Unidirectional flow (UDF) pattern.

Moreover, view components are rendered based on their related changed states only performed by diff-state engine, so the render operation is done more efficiently.

Design Principles

Testing Principles

  • Black-box/ behavior-driven testing with UI as the sole SUT (very recommended read and talk).
  • No mocking framework! Only fake type as test double, if required.

GraphQL Engine

Jokes are requested from proprietary GraphQL service, the Dads-Engine. Check it out ๐Ÿ”ฅ

How to run

  • Since this project employs GraphQL stack, you need to download the schema first:
    • Go to hosted GraphQL Playground,
    • Open tab SCHEMA at the right side. DOWNLOAD it,
    • Put the schema.json in directory: data/remote/src/commonMain/graphql/com/bael/dads/data/remote/,
    • Or you can run this command as alternative.
      ./gradlew downloadApolloSchema --endpoint="https://dads-engine.herokuapp.com" --schema="data/remote/src/commonMain/graphql/com/bael/dads/data/remote/schema.json"
      
  • Set JWT key in keys.properties file (located in project root folder):
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHAiOiJEYWRzISIsInR5cGUiOiJVc2VyIn0.46oGvluHExsPIOS9d925RNYrk_Y9eke0Zm45ZbqjaXs
  • Have fun!

Caveat

After went through How to run section but you still get a "Service issue" state, hit TRY AGAIN? a couple of times until success. That's because I host data to the server with basic free plan - potato spec, well, it's just for research purpose anyway ๐Ÿ˜‚.

Contributing

Let's get in touch if you're interested in contributing. Explain what's the issue, submit your PR via Fork.
Also feel free to request features, or any kind of your support (join stargazers โญ๏ธ | treat me coffee ๐Ÿ˜).

Those wonder what's next, check out my planned Roadmap by GitHub project board.

Licenses

FOSSA Status

Supporter

dads's People

Contributors

ericksumargo avatar stef-ang 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  avatar  avatar  avatar  avatar

dads's Issues

Reflection in your code base

Hei Erick, it's nice project, you're implementing a lot of latest libraries and best practices. But I spotted a reflection when you accessed the MainActivity from feature_home. We have ideas to improve it, maybe we can implement either a BroadcastReceiver or Dependency Inversion. Which one do you prefer?

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.