Giter Site home page Giter Site logo

countriespad's Introduction

Screenshots

         

Countries Pad 🌍

Countries Pad display a list of countries obtained from Rest Countries API. You can view the selected country on a map. Additionally you can filter countries by area, population or by name.

Get it on Google Play

Architecture

Countries Pad is implemented using Android Clean Architecture with these highlights:

  • Uses Model-View-ViewModel (MVVM) pattern with Clean Architecture (data, domain and presentation)
  • It has 2 Screen destinations which use Compose Destination to manage navigation

Overview Screen 1

This screen is based on a LazyVerticalGrid to display country flags in pgn formart.

There is a feature to search countryby name, cioc (or cca3) code.

App Screenshot App Screenshot

Details Screen

This screen displays the country's Coat of Arms as well as the Country's Flag. It also displays a map showing the country's location on the globe.

App Screenshot App Screenshot

Tech Stack

Countries Pad is implemented using Android Clean Architecture, Retrofit2, Dagger Hilt, ViewModel, Coroutines, Room, Navigation Components and some other libraries from the Android Jetpack.

Technologies used:

  • Android KTX - helps to write more concise, idiomatic Kotlin code.
  • Jetpack Compose - modern toolkit for building native Android UI
  • Material Design 3 - an adaptable system of guidelines, components, and tools that support the best practices of user interface design.
  • Compose Destinations - used to handle all navigations and arguments passing while hiding the complex, non-type-safe and boilerplate code
  • ViewModel to store and manage UI-related data in a lifecycle conscious way.
  • Dagger Hilt - used for Dependency Injection.
  • Coil - an image loading library for Android backed by Kotlin Coroutines
  • Retrofit a REST Client for Android which makes it relatively easy to retrieve and upload JSON (or other structured data) via a REST based webservice.
  • Coroutines and Kotlin Flow - used to manage the local storage i.e. writing to and reading from the database. Coroutines help in managing background threads and reduces the need for callbacks.
  • Room persistence library which provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
  • Timber - a logger with a small, extensible API which provides utility on top of Android's normal Log class.
  • Lottie Animations - provides Lightweight and scalable animations files
  • Maps Compose library - for displaying Google Maps in compose

Deployment

Countries Pad requires a minimum API level of 21. Clone the repository or download the code directly.

You don't need an API Key for Rest Countries API

API Reference

Base URL

https://restcountries.com/

Get Countries Json String

GET v3.1/all
Parameter Type Description
none none No Parameter needed

This request returns a Json String

Data Points

Data Point Type
name String
officialName String
List List
capital String
region String
subRegion String
List List
Double Pair<Double, Double>
flagUrl String
coatOfArmsUrl String
ciocCode String
area Int
population Int

Parsing Json String

Create an interface with a function to iterate through the returned JSON String extract the data points.

interface JsonStringParser<T> {

    fun parseJson(jsonString: String): List<T>
}

Contributing

Contributions to make Countries Pad better are always welcome!

If you are interested in seeing a particular feature implemented in this app, please open a new issue after which you can make a PR!

Alt

License

MIT License

Copyright (c) [2022] [Tonnie Dev]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

countriespad's People

Contributors

tonnie-dev avatar

Stargazers

Brandy avatar Chirag Thummar avatar  avatar Gideon Rotich avatar Pedro Sanders avatar

Watchers

 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.