PayBill Manager (work-in-progress 👷🔧️👷♀️⛏)
Your personal finance manager. 💰
Paybill manger is an Android app meant to help you manage your bill using Jenga API
It attempts to use the latest cutting edge libraries and tools. As a summary:
- Entirely written in Kotlin
- Uses RxJava 2
- Uses Android Jetpack
- Uses Navigation Architecture Components
- Uses all of the Architecture Components: Room, LiveData and Lifecycle-components
- Uses dagger-android for dependency injection
- Implements clean architecture
- Uses Material Design Tools and Material Design components
The app is written entirely in Kotlin and uses the Gradle build system. You require Android Studio 3.2 Canary 14 or higher. This is because lower versions don't support Navigation Components yet.
Once you have them, open
gradle.properties file and paste your API key in
JENGA_PASSWORD variables respectively.
Jenga Api Signature (Generate Pem files)
A SHA-256 signature to proof that this request is coming from the merchant. We concatinate the request object then sign with Private Key and Base64 encode it. We will use
PKCS#8 with an
RSA key in
PEM format as per Jenga documentation.
Generate a new RSA keypair using openssl Run the follwing commands in your terminal
$ openssl genrsa -out privatekey.pem 2048 -nodes
Once you are successful with the above command a file (privatekey.pem) will be created on your present directory, proceed to export the public key from the keypair generated. The command below shows how to do it.
Export your public key
$ openssl rsa -in privatekey.pem -outform PEM -pubout -out publickey.pem
If the above command is successful, a new file (publickey.pem) will be created on your current directory. Copy the contents of this file and add it on our jengaHQ portal. Make sure to copy only the contents of the keyblock and paste as is.
Important: We will need to convert the RSA key into a PKCS#8 encoded key in PEM format. We only need this on the client side.
$ openssl pkcs8 -topk8 -in privatekey.pem -nocrypt -outform PEM -out pkcs8_privatekey.pem
On top of this, We use a clean architecture approach to abstract functionality to respective modules. This has been explained below. 🤓
As mentioned before, this project uses clean architecture to abstract all functionality. We've done this by isolation functionality in respective modules.
UI (mobile): This layer is responsible for the UI of the app. This layer contains Android framework application implementation. At the moment we are only supporting Phones but we may add tablet support later on and we'll create a separate module for this. We'll implement the Navigation Component that will handle app navigation.
Presentation: The Presentation layer allows us to abstract the presentation logic from the framework specific implementation of our user interface. We'll be using MVVM and android architecture components library to handle presentation of our app.
Domain: This houses business rules/use case classes. This provides the core functionality of the project, think of it as rules of the projects. eg, Add Bill, Update Bill, Make payment. e.t.c
Data: The Data layer allows us to abstract the sources of the data that our application uses. It implements the domain later to help us satisfy the required functionality. It will help us determine where we should fetch data from, Cache or remote.
Remote: The Remote layer allows us to abstract the sources of the remote data that our application uses. We'll use Retrofit to handle networking functionality.
Cache: The Cache layer allows us to abstract the local source of data that our application uses. We'll use Room to handle local storage.
Foundation - Components for core system capabilities, Kotlin extensions and support for multidex and automated testing.
Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
- Lifecycles - Create a UI that automatically responds to lifecycle events.
- LiveData - Build data objects that notify views when the underlying database changes.
- Navigation - Handle everything needed for in-app navigation.
- Room - Access your app's SQLite database with in-app objects and compile-time checks.
- ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
- Retrofit - for network calls
- Dagger - for injection
- Timber - for logging
- Okhttp - for networking with Retrofit
- Okhttp Logging Interceptor - for logging network traffic
- RxAndroid for writing reactive components
- Android Material Stepper
- Android SpinKit
- Collapsible Calendar View
- LeakCanary - for memory leak detection
- Setup Travis CI
- Add Kotlin Support
- Create payment module
- Add CodeCov
- Setup CodeQuality Checks
- Setup Crashlytics
- Setup LeakCanary
- Invoke STK Push
- Work On UI
- Switch to Coroutines (Maybe) 🤔
- Use WorkManager for reminders
- Get CodeCoverage above 50%
- Release Beta Version
If you've found an error in this sample, please file an issue.
Patches are encouraged, and may be submitted by forking this project and submitting a pull request. Since this project is still in its very early stages, if your change is substantial, please raise an issue first to discuss it.
Would you like to contribute code?
- Fork Paybill Manager.
- Create a new branch (using GitHub) or the command
git checkout -b branch-name dev).
- Start a pull request. Reference existing issues when possible.
- Android Clean Architecture Sample app that is part of a series of blog posts about how to architect an android application using Uncle Bob's clean architecture approach.
- Android Architecture Blueprints Demonstrate possible ways to help with testing, maintaining and extending of an Android app using different architectural concepts and tools.
Copyright 2019 Thomas Kioko Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.