Mobile App Project Structure

Mobile App Project Structure
Figure 1. Mobile App Project Structure
  • component: This is where all the common jetpack compose UI components used within the mobile app are placed. These are the uncommon UI components only used within the mobile app itself. Any repeated UI elements place it in the library for all apps to reuse.

  • core.sharedprefrence: Stores all the relevant files for shared preferences used for data persistance like saving the login state and auth token. This holds app specific preferences.

  • data: Stores all the relevant files for room for data persistance in local database.

  • di: This is where all the source code for dependency injection go.

  • model: This is where all the data models for networking and UI are kept.

  • navigation: This is where all the source code for the navigation within the mobile app goes.

  • repository: This is where all repository classes go which is part of the MVVM design pattern.

  • screens: This is where all the differnt screens in the mobile app go. Each screen has a designated folder with a file for the screen UI and another file for the screen’s corresponding view model which is an android component and part of the MVVM design pattern.

  • utils: Files with common functions and code to be used throughout the app.