Skip to content

radixdlt/babylon-wallet-android

Repository files navigation

babylon-wallet-android

An Android wallet for interacting with the Radix DLT ledger.

App requirements

  • Android 8.1 minimum Android version
  • Support of handsets and no tablets.

Architecture and tech stack ⚙️

The architecture is based on the Android app architecture which follows some concepts of the Clean Architecture. So first, please read this one! :) In short for architecture:

  • Data and presentation layers are the must layers of the app.
  • Each of this layer contains its own data models and then we map from one to the other.
  • In general we add logic inside the data/domain/presentation model (e.g. FungibleResource) only if it is relevant.
  • The data layer uses the repository pattern.
  • Domain layer can have its own data models if it is needed. (e.g. to manipulate the data from the data layer, or to combine two or more different data models from the data layer to one in the domain layer.)
  • Use cases (they live in domain layer) can provide real benefits in some scenarios, please see 4 bullets here. Another example of a use case is the ShowOnboardingUseCase.
  • MVVM for the presentation layer

🏗️ The tech stack:

We try to stay with native libraries as much as possible. As less third party dependencies as possible.

🔗 Dependencies

  • we use shared libraries version catalog located in libraries.versions.toml
  • to update all dependencies in catalog please run gradle versionCatalogUpdateLibraries
  • to have control over what is updated please run gradle versionCatalogUpdateLibraries --interactive which will generate version diff file. You can inspect what will be updated, and you can remove libraries that you want to exclude from the update. To apply the diff, run gradle versionCatalogApplyUpdatesLibraries

Useful tips/resources and best practices (IMPORTANT) 💡

  • Keep It Simple
  • Write your code, leave it aside for one week, come back and read it. If you don't get what your code does in less than a minute, then probably you overengineering!
  • Comments are helpful. :)
  • Watch this video, really! It helps you understand when to (not) use abstraction, inheritance, and when to use composition + DI.
  • Read the conventions doc

Some useful Kotlin resources

License

The Android Radix Wallet binaries are licensed under the Radix Wallet Software EULA.

The Android Radix Wallet code is released under the Apache 2.0 license.

  Copyright 2023 Radix Publishing Ltd

  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.