This app is a simple project. The app have two screens, as follows:
-
Screen contain a list of posts. Tapping on a cell in the list, should take you to the second screen.
-
Screen is the detail screen for the selected post. Details to be shown about each post are:
- Post title
- Post body
- User name
- Number of comments
Below is a description of the different packages and classes in the app code:
Contains all API classes related to network app data.
ApiService-GETandPOSTcalls
Contain all Dto classes responsible to fetch data from the network.
CommentsDtoApi response for the Comment objectPostsDtoApi response for the Post objectUsersDtoApi response for the Users object
Contain all classes related with Dependency Injection (Koin)
AppComponentList ofModulefor DIRepositoryModuleList ofRepository-- Connector betweenDtoandDaoclassesServiceModuleList ofService-- Retrofit instance andDtoclassesStorageModuleList ofStoragelocation -- Room instance andDaoclassesViewModelModuleList ofViewModelRepositoryModule
Contain all Repository classes responsible to get the data from Service
Convert Dao or Dto into Entity classes
CommentsRepository- Related toCommentendpointPostsRepository- Related toPostendpointUsersRepository- Related toUserendpoint
AppDatabase- Class for the database (Room)
Contain all Dao classes responsible to fetch data from the database.
CommentsDao- DatabaseQueryforCommentobjectPostsDao- DatabaseQueryforPostobjectUsersDao- DatabaseQueryforUserobject
Contain all Entity classes
CommentsEntity- Database object forCommentPostsEntity- Database object forPostsUsersEntity- Database object forUser
Contain all classes related to the Views
MainActivity- First screen of the projectSecondActivity- Second screen of the project
Contain all ViewModel classes
MainActivityViewModelSecondActivityViewModel