Giter Site home page Giter Site logo

rishabh115 / sendotp Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 695 KB

A minimal Nexmo-based OTP sending Android app built using (MVVM + Dagger2 + Retrofit) clean architecture. Written in Kotlin.

Kotlin 100.00%
kotlin android mvvm room retrofit2 nexmo-sms nexmo-api nexmo android-mvvm stetho dagger2 clean-architecture

sendotp's Introduction

SendOTP

SendOTP is an application that uses Nexmo under the hoods to send OTP, currently generated randomly, to any contacts. It uses MVVM architecture as recommended by Google. Kotlin has been used as the primary language for writing the project.

Screenshots

Getting Started

Follow these instructions to build and run the project

  1. Clone this repository.
  2. Download the appropriate JDK for your system. We are currently on JDK 8.
  3. Install Android Studio.
  4. Import the project. Open Android Studio, click Open an existing Android Studio project and select the project. Gradle will build the project.
  5. Get your API_KEY and API_SECRET by creating an account on Nexmo developer portal.
  6. Use those values in Constants.kt file.
  7. Build the project.
  8. Run the app. Click Run > Run 'app'. After the project builds you'll be prompted to build or launch an emulator.

Following are the important points I kept in mind while developing the project:-

  1. Followed standard naming convention for Kotlin's variable and XML widget ids.
  2. Tried to maximise separation of concern by setting boundaries viz. ui, util, api, data and base subpackages.
  3. Documented the code wherever necessary.
  4. Base activity and base fragment for ensuring that any future changes can be easily blended in the app.
  5. All the constants are in Constants.kt file.
  6. Focused more on adaptable, modular, reusability and testable architecture rather than revamping the UI.
  7. UI is minimal, monochrome and easy-to-understand interface metaphor.
  8. Tried to keep third-party libraries to minimal (Retrofit, Stetho and CircleImageView).
  9. I have tried and tested via mine Nexmo credentials. Please consider replacing it with yours, if any issue occurs with my credentials(like whitelisting any contacts).
  10. Added validation for phone number.
  11. You can add your own dummy contacts in contacts.json for testing various corner cases.
  12. Minimum use of idiomatic Kotlin to improve readability.
  13. Initial development cost of MVVM architecture is high for simple projects, but it facilitates smooth growth and adaptability over time.
  14. Someone with basic knowledge of Kotlin and MVVM pattern can understand this code.
  15. As Stetho has been integrated, you can open Chrome to inspect local db.
  16. UI components are completely free of any business logic.
  17. No hardcoding in XML.
  18. UI are completely scalable across any form-factor of smart-phones.

Tested on: Nokia 8.1(Android 10 OS)

Development enviroment: Android Studio 3.5.0

sendotp's People

Contributors

rishabh-sayurbox avatar rishabh115 avatar

Stargazers

 avatar  avatar  avatar

Watchers

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