---
# System prepended metadata

title: LTLabs Android Project Structure

---

# LTLabs Android Project Structure

### Overview
![](https://i.imgur.com/RSufMYx.png)




#### ***1. data (Data Layer)*** 
refer to data layer which is local datasource or remote datasource. in this case we have only remote datasource and structure should be 

![](https://i.imgur.com/pfyHQ2g.png)

* api : for retrofit call
* model : handle for DTO
* repository : work as a mediator for viewModel and datasources
    
    ![](https://i.imgur.com/8uzGzAO.png)



#### ***2. di*** 
This directory is refer to everything related to Hilt such as components and modules and also custome components.

![](https://i.imgur.com/lJIypEF.png)


#### ***3. ui (Presentation Layer)*** 
Here we put the UI components and the logic that related to user interactions or navigation in order to get data from the user.

This includes our Activitys, Fragments, and ViewModels. Never put your business logic in Activitys.

An Activity will talk to a ViewModel and a ViewModel will talk to the domain layer to perform actions. A ViewModel never talks to the data layer directly. 

![](https://i.imgur.com/Mom4DK6.png)

So inside presentation layer we divided in to 2 sub layers:
* UI Layer : The UI layer contains the activities and fragments, capturing user events and displaying data.

* ViewModel Layer : The ViewModel layer formats the data so that the UI shows them in a certain way and verifies that the user’s entries have the correct format.



#### ***4. utils*** 
contains common used classes and functions all over the app. Utils should be : 
* constant 
* helper
* extension
* encryption/decryption
* sharepreference

### Remember
- For dialog make it independance for some cases
- if you're not clear on each part can ask us, or you also can push code first and discuss later. 