Android OS Languages-Kotlin PRs

PulaInterview

This app is for Pula (https://www.pula-advisors.com/) Android position. It’s a Survey App. Consumes Questions API. Showcases usecase for State and Jetpack Compose framework.

Functionalities

  • A user can login
  • A user can View Survey questions
  • A user can answer Questions
  • A user can can send his/her photo
  • The app sends a background service request every 15 minutes

Screenshots

.....

Approach

Architecture

This app has an architecture in place to allow the App to Scale, improve Quality and Robustness and Allow the App to Scale. This also makes the App to Scale

This App uses Clean Architecture to ensure:

  • Separation of concern
  • Drive UI from Data Model
  • Make functionality easily changeable or droppable
  • Make Code easier to read
  • Make use of good practices and Jetpack libraries(Architecture components)

Layers

Domain Layer

  • Sits between the UI and Data layer
  • Used in this project to encapsulate business logic
  • Enables use-cases to be reused in multiple view model
  • Defines the repository interface that drives the main functionality

Data Layer

  • Contains the implementation of business logic(Repository Implementation)
  • Gets data from the remote data source
  • Cache’s remote data to Local Room Database

Presentation/UI layer

  • This layer is the layer that displays data to the user screen
  • Contains view models that are lifecycle friendly and takes code away from our Activity/UI components
  • Defines our architecture which is MVVM (Model View View-Model)
  • Contains our states that handle logic like loading

Dependency Injection

  • Used Hilt Dagger library for dependency injection
  • Allows classes to define their dependencies without constructing them
  • Also brings all the layers of the App together
  • Helps UI layer to be driven from data layer

states

  • The app uses states in ViewModel to queue different Events
  • The states send UI events from ViewModel to UI
  • Handles loading of the app and knows when there’s an error
  • Sealed classes flow freely in States

How to Setup

Clone this repo

$ git clone [email protected]:fatahrez/PulaInterview.git

or HTTPS

$ git clone https://github.com/fatahrez/PulaInterview.git

Open the project with Android Studio and build using gradle. Feel free to run the App on your phone.

Login

Phone Number: Any phone number starting +2547…. password: 1234GYD%$

Libraries used

  • Retrofit – Android Network Client, Used to consume API from Pixabay API
  • Room – SQLite ORM – used to save data to the phone’s database for caching
  • Hilt Dagger – Used for dependency Injection
  • Coroutines – Used to execute code asynchronously
  • Jetpack Compose – Used to write the declarative UI of the App
  • Material Design – Give the App a theme and generally improve UI of the App
  • Coil Image – Image Loading library
  • Lifecycle library – Majorly to define the ViewModels of the app
  • Compose nDestination – To navigate to different screens of the App
  • WorkManager – Background periodic tasks
  • OkHttpLogging Interceptor – Logging network requests
  • Mockk – Mocking for testing

Author Info

Twitter – @TheBandanaDev

LinkedIn – Abdulfatah

Back To The Top

GitHub

View Github