This is Android version of the Smack-iOS(https://github.com/mdadil2019/Smack-iOS) app which is in development with MVP architecture
Architecture: Model View Presenter
Tools & Languages: Java, Android Studio
Libraries: Dagger 2, RxJava2, Retrofit, Butterknife, Socket.IO
API Endpoint : https://adilchat.herokuapp.com/
- Login and Logout
- Registration
- Profile View
- Channels Management (Add, Create)
- Chat in specific channels
Remote Database : MongoDB
Local Database : SQLite(RoomDB)
User Interface (ui)
Views
- LoginActivity implement LoginActivityMVP.View
- RegistrationActivity implements RegistrationActivityMVP.View
- ProfileView implements ProfileView.View
- ChannelActivity implements ChannelActivityMVP.View
- ChatActivity implements ChatActivityMVP.View
Presenter
- LoginActivityPresenter implement LoginActivityMVP.Presenter
- RegistrationActivityPresenter implements RegistrationActivityMVP.Presenter
- ProfileViewPresenter implements ProfileView.Presenter
- ChannelActivityPresenter implements ChannelActivityMVP.Presenter
- ChatActivityPresenter implements ChatActivityMVP.Presenter
Model(data)
- Local Database(db)
- User(Entity,Dao,UserDatabase)
- Channel (Entity,Dao,ChannelDatabase)
- Chat(Entity,Dao,ChatDatabase)
- Remote Database(network)
- Models
- Login Request
- Login Response
- Logout Response
- Registration Request
- Registration Response
- Channels Requests
- Channels Response
- Message Request
- API Error
- Models
- API Endpoints (final class)
- Base URL : https://adilchat.herokuapp.com/v1/
- Login URL : account/login
- Registration URL : user/add
- Channels (GET) : channel/
- Messages (GET):message/byChannel/
- API Headers
- Header
- Bearer Header
- App API Helper
- Methods for requesting endpoints with RxJava & Retrofit and returning observables if required
- Preferences
- AppPreferencesHelper implements PreferenceHelper
- Methods
- getname()
- getavatar()
- getusername()
- getloginstatus()
- Data Manager (Interface) extend AppPreferenceHelper, APIHelper
- AppDataManager implements DataManager
Note: All the methods of APIHelper, PreferencesHelper & RoomDB will be called from data manager by providing the required dependencies by Dagger
Dependency Injection (di)
- Modules
- LoginActivityModule
- RegistrationActivityModule
- ChannelActivityModule
- ChatActivityModule
- ProfileViewModule
- AppComponent (Interface)