Giter Site home page Giter Site logo

droidconke2020app's Introduction

droidconKE2020

droidcon2020 Conference App

The official DroidconKE 2020 conference App.
droidconKE2020 built for Android

Table of contents

1 About the App
2 General Preview
3 Technical
4 Work in Progress
5 Contributing
6 License
7 Versions
8 Contributors

πŸ‘‡ πŸ‘‡ πŸ‘‡ πŸ‘‡ πŸ‘‡

About the App

Android app for the 3rd Android Developer conference- droidcon to be held in Nairobi from August 6-8th 2020.

This project is the Android app for the conference. The app supports devices running Android 5.0+, and is optimized for phones and tablets of all shapes and sizes. The source reflects the app as at droidconKE 2020!

Features

=======

droidconKE 2020 Android App

Android app for the third Android Developer conference-droidcon in Nairobi 2020

This project is the Android app for the conference. The app supports devices running Android 5.0+, and is optimized for phones and tablets of all shapes and sizes.

Source

The source code in this repository reflects the app as of droidconKE 2020.

Features

App will have the following features:

  • Sessions
  • Feed
  • About
  • Home
  • Speakers
  • Auth
  • Feedback

To learn how it was built, we put this series together:

(NOT YET OUT) - Coming soon! Building the droidconKE 2020 App

Like, share claps... πŸ˜‰

General Preview

Screenshots

Coming soon!

Demo

a You can give it a spin here on appetize

b.Compile the project on android studio and run it.

c. download it from the playstore:

Download it on Google Play

Technical

Running the project

1. Required to run project: check "dependencies" below

  • Use Android studio 3.4 and later. It will be less messy.

2. Clone this repository:

`git clone https://github.com/droidconKE/droidconKE2020App.git`

3. open Project in Android Studio

4. Build Project

5. In case of an error when building project, update your gradle version, Build Tools download

6. Add the following credentials to your local.properties

clientId=GOOGLE CLIENT ID
clientSecret=GOOGLE CLIENT SECRET
apiKey=SERVER API KEY

Note: Reache out to @wangerekaharun or @michaelbukachi to obtain credentials

=======

Development Environment

The app is written fully in Kotlin and uses the Gradle build system.

To build the app, use the gradlew build command or use "Import Project" in Android Studio. A canary or stable version >= 3.4 of Android Studio is required and may be downloaded here.

Architecture

Proposed Architecture:

We will be using libraries, modules and dynamic feature modules too.

Architecture Introduction

We took a modularisation approach to develop the application. There are immense benefits that come about with modularising an application; faster builds due to gradle caching and parallelism, benefit of dynamic features which can be delivered on demand therefore reducing initial apk size, clear separation of concerns and ease of maintaining and adding new features. An application can be modularised either by feature or by layer, we decided to take a hybrid approach that combines both approaches.

Data Module

The data module provides support for data persistence and offline caching. It consists of room database, entities and daos. We opted for a single database source of truth as opposed to having multiple databases for each feature. At the point of developing this application, Room did not support multi-database queries and thus having a single database will save us time trying to combine data from multiple databases. In addition to this, a single database helps us avoid duplication of data and tests. The data module exposes itself to the repository layer via a datasource interface to prevent the repository from knowing the implementation details of the data layer thus observing the dependency rule. This will also enhance the flexibility of the application as we can easily switch from Room to SQLite or Realm if need be. This module consists of a mapper to convert entities to data classes that can be passed around.

Network Module

The network module provides support for making network requests to external APIs. This module basically consists of retrofit interfaces, response data classes and mappers to convert the response classes. The network module is exposed to the repository layer via a remote datasource.

Repository module

The repository module depends on the data module and the network module. The role of this module is to sync data from different sources and present it as a single source. Ideally, the repository module observes the repository pattern recommended by Google.

Features

The application contains three features i.e. schedule, feed & about and one dynamic feature i.e tickets. The features depend on the repository module and the core module. The dynamic feature depends on the app module.

App

The app module handles navigation between the features. It also consists of key UI activities or fragments. e.g. Login.

Base Core

Consists of classes and logic that is to be shared across the application. It contains utility classes and functions as well. The base core is a library.

App Architecture

Modules To Be There:

With the above in mind, here are the actual modules in the droidconKE2020 app following the guidelines laid above

  1. app

  2. core (library)

  3. data (library)

  4. features - directory for grouping all the feature modules together. It has the following dynamic feature modules:

    • about - has the details of the event, team members and their details that is when each team member card is clicked
    • auth - has the sign-up, sign-in, forgot password and reset password logic
    • feed - has a #droidconKE newsfeed
    • feedback - has session and event feedback logic
    • home - shows sponsors, promoted stuff, organizers and changes according to time ie before and during the event
    • sessions - shows each days sessions(day one, day two, day three) session details, and also has filter sessions logic and show a user's favorited sessions
    • speaker - shows speaker details
  5. repository(library)

  6. network(library)

Koin Integration & Guides

Dependency injection is integrated into the project based on the project's architecture. Each modules gradle file has koin dependencies.

Data module

The data module define a databaseModule in Module.kt file. The module defines a room database like:

`single {
    Room.databaseBuilder(
            androidApplication(),
            DroidConDB::class.java,
            "droidCon.db")
        .build()
}`

Then define entity in its on directory. Each entity defines a Data Access Object interfaces and data sources. For example, the user directory includes; user model file, UserDao interface and a LocalUserDataSource file. To define dependencies follow these steps;

Define a data access object like this;

`@Dao
interface UserDao {
    @Query("SELECT * FROM user")
    fun getUser(): User
}`

Then define a koin dependency like this:

`factory { get<DroidConDB>().userDao() }`

and a data source dependencies like this:

`factory { LocalUserDataSource(get()) }`

Network Module

The network module also defines individual entities which shall contain response and request bodies (DTOs), if they are necessary, api service interface and a data source.

To inject dependencies for data sources, do this:

`factory { get<Retrofit>().create(UserAPIService::class.java) }`

for api service interface dependency injection definition add this:

`factory { RemoteUserDataSource(get()) }`

to define data source dependencies.

Repository Module

The repository is dependent on the network and data module. To define a repository dependency, do this:

`factory { UserRepository(get(), get()) }`

The first parameter is the UserLocalDataSource from the data module and the second is the UserRemoteDataSource from the network module.

Features

Each feature depend on the repository module. ViewModel dependencies require repository dependencies. for viewmodel injection, follow this steps;

create a class, for example LoginViewModel,

`class AuthViewModel(private val repository: UserRepository): ViewModel() {
    fun login(username: String, password: String) {
        repository.login(username, password) }  
}`

Then in the features di directory, add a viewmodel injection like this:

`viewModel { AuthViewModel(get()) }`

then inject the viewmodel into a fragment/activity

`class AuthFragment: Fragment() {
    **val authFragment: AuthFragment by viewModel()**
    
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        return super.onCreateView(inflater, container, savedInstanceState)
    }    
}`

Gradle

The App uses Kotlin DSL for its gradle due to the obvious advantages Kotlin affords as compared to Groovy. The Dependencies.kt file under buildSrc is where we store all our App Dependencies and contains the following objects;

  1. Versions; The versions object contains all the Application’s version code and version name as well as all the variable library version codes.
  2. BuildPlugins; This object contains all the plugins required for the build process.
  3. Libraries; This object contains all the required imported application libraries.
  4. APIs This object contains all the required APIs
  5. AndroidSDK This object contains the minSDK, targetSDK and compileSDK version codes
  6. TestLibraries This object contains all the required Libraries for testing.
  7. BuildModules This object is split into Libraries and Features. The Libraries contain the APP module and the other core Modules which are to be reused in different Dynamic features while the Features contain specific functionality of different aspects of the app.

To add a Dependency go to the Dependencies.kt file add it in the required object. Then go to the target build.gradle.kts file and add the code. E.g.; Implementation(ObjectName.Example)

Navigation

The app uses Single Activity Architecture. And follows Navigation Principles from Jetpack. And since features are all dynamic modules, we have taken advantage of the introduction of the support of dynamic features in the navigation component in the latest release. How this works is we use fragments in the feature modules and add the fragments to the main nav graph which has the support for adding destinations from dynamic feature modules. More on this is in the Navigate with dynamic feature modules tutorial. Note: Adding destinations might not work in AS version below 3.6 Release Candidate 3(RC3) and destination fragment name might be in red but no worries, app runs well as expected.

Dependencies

  1. Jetpack - Jetpack Libraries to use
    • LiveData
    • AndroidX
    • Android KTX
    • Navigation
    • Room
    • ViewModel
    • Lifecycle
  2. Coroutines - For Concurrency and Asynchronous tasks
  3. Retrofit - For network requests
  4. Koin - For Dependency Injection
  5. Crashlytics
  6. Coil - For Image Loading and Caching
  7. Firebase Perf - For analyzing app perfomance
  8. Testing Dependencies -
    • JUnit
    • AndroidX Test
    • Espresso
    • Mockk
    • Roboelectric
    • Kakao
  9. Lint Checks - Consider adding a library for lint checks

Feature Modules:

Each module have its own domain, data and presentation or how do we approach this

Permissions

TBA

References/Resources

  1. Android ShowCase
  2. Kotlin Sample App
  3. DroidKaigi Conference App 2020
  4. Clean Architecture post on ProAndroid Dev
  5. ReadME Master templates
  6. contributors-img

Work in progress

🚧 ⛏ πŸ”§οΈ 🚧

- Ktlint [https://ktlint.github.io/]

On Feature Modules: Does each module have its own domain, data and presentation or how do we approach this

[ 🚧 Work in progress πŸ‘·β€β™€οΈβ›πŸ‘·πŸ”§οΈ 🚧 ]

  • Finalize on the final App architecture.
  • Setup app modules
  • Work on Modules Specifics
  • Dependencies Setup - Gradle kts

You can improve on this and add further features:

Contributing

We would love to have your help in making droidconKE 2020 App better. The project is still very incomplete, but if there's an issue you'd like to see addressed sooner rather than later, let us know.

Before you contribute though read the contributing guide here: CONTRIBUTING GUIDE

For any concerns kindly:

Coding Convention

  • For any view id, ie. Buttons, Edit Texts etc., we will use camelCase ie. btnLogin, etName.

  • Classes name end with the name of the component e.g. MainActivity and MainViewModel

  • For layout xml files the name of the component comes first i.e. fragment_login

  • The parent layout container id is given a prefix layout_ e.g. layout_login

  • Value files should always be in plural ie. strings/colors/styles etc.

  • String values should be named as txt_login or err_failed and should not be in block and colors values should be in small ie. colorBlue

  • Recycler view layouts should start with the prefix item eg. item_sessions

and xml attributes ie. background should be named as btn_login_bg.xml

  • Menu items should be named as activity_main it is repetitive to add the term menu since they are contained in the menu directory

  • Ideally, in the xml, the first attribute after the tag is id, then width, then height and then anything else android: followed by app and lastly tools:

License

Assets

Credits:

license

Open Source Love

Versions

Version 1.0 TBR (To Be Released)

Contributors

Auto-populated from: contributors-img

:bowtie: ✌️ 🍹

References/Resources

  1. https://github.com/igorwojda/android-showcase
  2. https://github.com/VMadalin/kotlin-sample-app
  3. https://github.com/DroidKaigi/conference-app-2020
  4. https://proandroiddev.com/multiple-ways-of-defining-clean-architecture-layers-bbb70afa5d4a

droidconke2020app's People

Contributors

anniekobia avatar ben-mathu avatar chepsi avatar ed-george avatar edwardmuturi avatar jabeznzomo99 avatar jama5262 avatar michaelbukachi avatar muth0mi avatar odaridavid avatar philomenambura avatar tamzi avatar wangerekaharun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

droidconke2020app's Issues

Dynamic Toolbar Design

Add toolbar. The toolbar changes from screen to screen. The following are the designs for the toolbar.

  • Home(Before Event)
    Screenshot from 2020-03-23 10-30-04

  • Home(During Event)
    Screenshot from 2020-03-23 10-30-36

  • Feed
    Screenshot from 2020-03-23 10-33-00

  • Feedback
    Screenshot from 2020-03-23 10-35-12

Improve Filter Session Design

Improving the Filter Design to closely match the Design.Here are the are a couple of issues to look at.

  • Background of the bottom sheet
  • Filter chips to be reflect what is on the design currently
  • Bottom sheet to cover whole screen

Testing Guidlines

Come up with Testing Guidelines for the various tests to be done by anyone working on an issue and how to write and do the tests. This is to help those who are new to test and would love to contribute to the development of the app. The guidelines are supposed to be outlined in the ReadME

Migrate to Gradle KTS

After Module setup and app flow is complete, Migrate from using groovy to using Kotlin DSL Gradle Plugin.

Auth Module Design

Implementing the design for auth module. This modules has the following screens/pages

  • Sign up
  • Sign in
  • Forgot Password
  • New Password

Managing dynamic feature bundle versions

From the Android docs ,the base module is responsible for managing app versioning.This version code will be assigned to all apks generated from the bundle.
For any app update a new bundle will be generated using the version code in the base module.

This can be omitted from the dynamic feature build scripts.

versionCode = Versions.code
versionName = Versions.name

For more details check on Managing App Updates

Add Social Media Share Bottom Sheet

Add bottom sheet to be displayed once the share icon is clicked on Feed Fragment which is in the feed module. The Design should be similar to the below screenshot.

Screenshot from 2020-03-23 10-20-21

Setup SessionsViewModel in sessions module

This viewmodel is responsible for handling all logic for sessions listing page.This includes:

  • All session data for the listing
  • Handling of filters
  • Handling of navigation events or any other events

Wire up koin in all modules

We need to setup koin in all modules and link them. Documentation needs to be added on how to go about setting up new dependencies.

Migrate to a material theme

This addresses the application theme moving from appcompat attributes to material theme attributes as well as defining the apps primary and secondary colors

Setup state in SplashScreenActivity

Ideally, due to the nature and timeframe of the splash screen animation, it should only be shown the first time a user launches the app. We to use the preferences class from #56 to store/retrieve state. To determine whether the animation is shown. In situations where an animation is not shown, a splash screen image should be shown instead (or a shorter timeframe for the animation can be used).

Feedback Module Design

Implementing the design for the feedback module. This has the following screens/pages :

  • Event Feedback

  • Session Feedback

Setup HomeViewModel in home module

This ViewModel should handle all the logic for the home page. Use of livedata + data binding should be used to make binding to the UI easier. The logic in this ViewModel includes:

  • Displaying/Hiding promos when available
  • Showing CFP card for a given duration.
  • Handling all click and navigation events
  • Loading of data for any recyclerview
  • Logic for handling night mode

Setup SpeakerViewModel in speaker module

This viewmodel is responsible for loading and displaying a speaker's details. It is also responsible for handling all events associated with the speaker's view.

documentation

Do we need better documentation with everything for the app?

Setup App Modules

Setup the respective app modules following the specifications on the Architecture Introduction.

For Feature Modules, we have the following features :

  • Home
  • Feed
  • Sessions
  • About
  • Speaker Details
  • Session Details
  • User Sessions
  • Team Member Details
  • Auth - with Sign Up,Sign In and Forgot Password
  • Feedback - event and session feedback

Setup AuthViewModel in auth module

This ViewModel needs to handle all logic for authentication. We will be using google auth so the appropriate logic and callbacks should be in this class. Unit tests should be added to make sure logic works appropriately.

Shared preferences in core module

We need to setup a PreferencesImpl class in the core module. This class will be responsible for handling all the logic for settings/getting data from SharedPreferences. The class should implement a Preferences interface. Alls methods should be declared in the interface since PreferencesImpl is just an implementation detail. Methods should be as description as possible. For instance, if we need method for storing and retrieving a username, the methods should be called setUsername and getUsername respectively.

Home Module Design

Implementing the design for home module. This module has the following features :

  • User can see count down (pre-event)

  • User can see offers and promos

  • User can see CFP (pre-event)

  • User can see keynote speakers (pre-event)

  • User can click link to apply as a speaker (pre-event)

  • User can see sponsors

  • User can link to sign-up as a sponsor

  • User can see droidcon ke logo at the top left corner

  • User speakers of current active sessions (During the event)

  • User can see navigation for viewing today's session (During the event)

  • User can can click logo at the top right corner and see sign in page or the sign out option

  • User can speakers (during event)

  • User can speakers list (first three should be the speakers for the current active sessions)

  • User can see the feedback action and be able to click on it.

  • User should be able to navigate to the all sessions screen

  • User should be be able to navigate to the all speakers screen

  • User should be able to switch to night mode

App flow Setup

Linking the different modules together and implementing the app flow.

Common Communication Channel

Should we have a common communication platform for updates and general questions? I was wondering if we could use slack, or create a group on telegram.

This would keep everyone on here updated on what's going on.

Consistent Styling

Concerning color resources, I noticed duplication in the feature modules and overriding of the colorPrimary ,colorPrimary,and colorAccent which have the default colors on project creation.
My suggestion would be moving this resources to the app module and adopting material theme attributes for the primary and secondary colors and use them consistently throughout the app.
What do you think of this?

UI tests fix

We are setting up UI tests on #78 but they keep failing possible due to use of dynamic feature modules with fragments. We need to setup a sample UI test for any of the any of the modules so that interested contributors can get a general idea of how to go about it. PRs should be made against the same branch

Dark Theme

Let's add a dark theme variation to the app

Architecture Definition

Come up with the architecture for the app. The 2020 apps see's a big shift where we will be using our own backend and not firebase.

Architecture Highlights:

  • Modularizing the app

  • Libraries to be used

  • Dependecy Injection

  • Testing

The write up will be in the README

@michaelbukachi Suggestions are welcome. This is the very first step for development

Dynamically Load Sponsors In HomeFragment

This issue looks to do the following:

  1. Replace the static imageviews for the sponsors card with a grid layout
  2. Ensure the main sponsor element takes up more space than the others
  3. Load the sponsors dynamically from data supplied by the repository

Sessions Module Design

Implementing session design. The session module has the following screen:

  • Schedule - with day one,two and three sessions list
  • Session Details

Feed module design

Implementing feed module design. Which shows promo and droidconKE announcements

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.