> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/sandbox/platform/architecture/sandbox-ui/low-level-design/modules/client-apps.md).

# Client Apps

Impact Changes Details On Client Apps

## Overview

The DIGIT UI framework requires updates to support handling multiple tenants and integrate seamlessly with Sandbox environments. This involves modifications to the global configuration, core UI components, and various modules to ensure smooth functionality.

## Impact Areas

### **1. Global Configuration**

**Current State:**

* The global configuration is designed to handle single-tenant information from the base application.

**Required Changes:**

1. **Update Configuration:** Modify the global configuration to support multiple tenants.
2. **Configuration Structure:** Redesign the configuration structure to include tenant-specific settings.
3. **Dynamic Loading:** Implement logic to dynamically load tenant configurations based on the tenant information received from the base application.

**Impact:**

* Ensures the application can handle requests from multiple tenants simultaneously.
* Improves scalability and flexibility of the Digit UI framework.

### **2. Core UI Components**

**Current State:**

* Core UI components are designed to fetch and display data for a single tenant.
* Access control logic is based on single-tenant information.

**Required Changes:**

1. **Fetch Logic:** Update the core UI components to fetch data based on the tenant context.
2. **Tenant Context:** Introduce a mechanism to pass tenant context to UI components.
3. **Access Control:** Revise the access control logic to consider multiple tenants.
4. **Role-Based Access:** Ensure role-based access control supports multiple tenants by updating the roles and permissions structure.
5. **User Service:** Integrate with the new User Service.

**Impact:**

* Enhances the core UI components to be tenant-aware.
* Ensures accurate data fetching and access control across multiple tenants.
* Maintains security and proper access management in a multi-tenant environment.

### **3. All Modules (Urban, Works, Sanitation)**

**Current State:** Modules need to fetch the module tenant configuration and operate accordingly, either at the tenant or subtenant level. The same applies to boundary hierarchies, as the system will contain multiple boundary hierarchy definitions and datasets. Thus, the module should determine which hierarchy and level it should function within.

**Required Changes:**

1. **Tenant Awareness:** Make all modules tenant-aware by updating their internal logic to handle multiple tenants.
2. **Module Initialization:** Ensure modules initialize correctly with tenant-specific data.
3. **Data Handling:** Adapt data handling processes within modules to support multiple tenants.

**Impact**:

* Enables modules to function correctly in a multi-tenant setup.
* Ensures data integrity and consistency across different tenant contexts.

## Client Web Apps

<figure><img src="https://383170073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLTNzsJMDGVoewNjC1V95%2Fuploads%2F0vFeqLJswizcxP6C9Erd%2FUI%20Tech%20Designs%20-%20Digit%20UI%20Framework%20(Old).jpg?alt=media&amp;token=bb168d3b-443a-4ff1-a92a-9b7a80412891" alt=""><figcaption><p>Digit UI Client Web Apps</p></figcaption></figure>

## Client Mobile Apps

<figure><img src="https://383170073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLTNzsJMDGVoewNjC1V95%2Fuploads%2FRNxPYzpt46YrwDvQaslB%2FUI%20Tech%20Designs%20-%20HCM%20App%20(1).jpg?alt=media&amp;token=88178133-8d35-40c0-8506-6eec02f8d54b" alt=""><figcaption><p>Client Mobile App</p></figcaption></figure>

## **Enabling Different Modules In Sandbox**&#x20;

### **PGR:**

* Complaints Modules following Master Data to be created, to enable it.

<figure><img src="https://383170073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLTNzsJMDGVoewNjC1V95%2Fuploads%2FVOZMQW59FJcmbXNnrs0j%2FUI%20Tech%20Designs%20-%20PGR.jpg?alt=media&amp;token=66d685a4-f201-491f-8814-cfdb7d9a557e" alt=""><figcaption></figcaption></figure>

**HRMS:**

* HRMS Modules following Master Data to be created, to enable it.

<figure><img src="https://383170073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLTNzsJMDGVoewNjC1V95%2Fuploads%2FJgb0JsrVDxxARVmVQO4K%2FUI%20Tech%20Designs%20-%20HRMS.jpg?alt=media&amp;token=3f63482a-5991-4620-a070-20ac3d7218a8" alt=""><figcaption></figcaption></figure>

**HCM:**

* Health Modules following Master Data to be created, to enable it.

<figure><img src="https://383170073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLTNzsJMDGVoewNjC1V95%2Fuploads%2FQibQ6PSV8MEN8q92VGRP%2FUI%20Tech%20Designs%20-%20HCM.jpg?alt=media&amp;token=accf587b-ce61-4028-8727-27788c766b5b" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/sandbox/platform/architecture/sandbox-ui/low-level-design/modules/client-apps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
