Coder Social home page Coder Social logo

davidmarinangeli / sweet-bank Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 5.0 30.28 MB

Sweet Bank is an Android app in Kotlin that I developed to play around with some principles of the mobile development. I used some of the most common Android libraries such as Coroutines, ViewModel, LiveData, Dagger, Retrofit and so on. It uses StarlingBank APIs.

License: Apache License 2.0

Kotlin 100.00%
android jetpack starlingbank-apis mvvm-android dagger2-android motionlayout coroutines-android

sweet-bank's Introduction

Sweet Bank ๐Ÿฌ

Sweet Bank is an Android app in Kotlin that I developed to play around with some principles of the mobile development such as scope separation, design patterns ( such as MVVM ) and much more.

I used Starling Bank APIs to fetch and send data to the Sandbox: this really helped me to focus on what really matters. Their APIs are very well documented and there is a lot to explore in their developer dashboard. Try it!

Watch out, if you want to run the project, you will find out that the NetworkUtils.kt file is missing: it would contain the BASE_URL and the token, which is necessary to do all the APIs calls.

Version 2.0.0 released

I decided to change the UI ( yeah, again ) and I got big help from my brother with all the new concepts and elements of the home screen. Motion Layout is now even more present here and the blobs move up along with the sheet.

The "Payee" part has been hidden ( temporary ) and the "profile picture" upload has been added instead ( with a picture rotation fix function ).

I changed the implementation of the styles by adding โ˜€๏ธ๐ŸŒ‘ Dark Theme , using the Theme.MaterialComponents.DayNight.NoActionBar, and the typography system, using the TextAppearance.MdcTypographyStyles.

I started using Koin instead of Dagger2, just because I wanted to try that: it's nice, for a project this small!

Software Architecture Pattern ๐Ÿ›

I used the MVVM pattern to make the code more readable, scalable and easily testable. To do this I divided the project into view slices and three layers:

  1. UI
  2. Repository - that could handle both local (SharedPrefs etcโ€ฆ) and network requests
  3. Network - that fetches the data from StarlingBank APIs

As you can see from the above picture ( you can click it if you want to zoom the structure ) the app is divided into several modules that communicate altogether.

Modules

As for now, there are some modules that fulfill a specific view or purpose:

  1. app - the main one.
  2. network - handles the network global setup and, thanks to Dagger, provides the dependencies that are used in the whole project.
  3. dashboard - handles the whole stack for the Dashboard Fragment and part of the Main Activity. You can find there its entities, the APIs, the LocalMapper, the UI and so on.
  4. payees - the module that handles the whole stack for the Payees Fragment in the home: in the future will handle also the Payee creation.
  5. resources - take care and share all the common resources ( fonts, drawables, colors and so on )

I decided to split the project in more modules because of 1. shorter Build Time 2. Separation of the Scopes 3. Cleaner code and better architecture

UI ๐ŸŽจ

I made a quick low-fidelity prototype of the app's menus with all the things I wanted to show. You can see the Dashboard Fragment and the Payees one from the pictures down below. Shoutout to my friend Claudio that gave me some help to improve the design!!

From the Payee List the user can navigate to the Payee detail that shows its general data, the accounts and so on. The view is composed of a CollapsingToolbarLayout , two RecyclerViews and other views, all wrapped in a NestedScrollView.

Libraries

I used some libraries such as:

  1. Android Jetpack ( ViewModels, LiveData )
  2. ViewPager2
  3. Dagger2 ( now Koin )
  4. Retrofit
  5. Kotlin Coroutines
  6. Moshi
  7. Google Android Material
  8. JUnit4 / Coroutine-test
  9. Mockk
  10. Shimmer Animation for Android ( Facebook )
  11. MotionLayout
  12. Koin

sweet-bank's People

Contributors

davidmarinangeli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.