Your personal finance manager
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:
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.
PaybillManager uses Jenga Account to handle payments, so you will need to create an account. Once you have one, go ahead and get your keys
Once you have them, open gradle.properties
file and paste your API key in JENGA_API_KEY
, JENGA_USERNAME
and JENGA_PASSWORD
variables respectively.
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
Finally, add pkcs8_privatekey.pem
to your assests/pem
folder.
We followed the recommendations laid out in the Guide to App Architecture when deciding on the architecture for the app. We kept logic away from Activities and Fragments and moved it to ViewModel.
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.
Third party
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.
git checkout -b branch-name dev
).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.