# Local Setup

## **Overview**

A **React App** built on top of **DIGIT UI Core** — India’s largest governance platform. The CMS UI lets citizens raise complaints and employees manage them. It uses the **Workbench module** to manage **Master Data (MDMS V2)** and **Localisation data**.

***

### **📂 Project Structure (Simplified)**

```
graphqlCopyEditCitizen-Complaint-Resolution-System/
└── frontend/
    └── micro-ui/
        └── web/
            └── micro-ui-internals/
                ├── example/
                ├── node_modules/
                ├── packages/
                │   ├── css/        # Tailwind CSS config & styles
                │   ├── modules/
                │   │   ├── pgr/    # Public Grievance Redressal module (PGR forms/UI)
```

***

## **🛠 Tech Stack**

* **React** (UI framework)
* **React Hook Form** (form handling)
* **React Query** (API data fetching)
* **Tailwind CSS** (styling)
* **Webpack** (bundler)

***

## **🔗 External Dependencies**

<table><thead><tr><th width="364.4140625">Package</th><th>Source Repo</th><th>Branch</th></tr></thead><tbody><tr><td><code>@egovernments/digit-ui-libraries</code></td><td>digit-ui-libraries</td><td>develop</td></tr><tr><td><code>@egovernments/digit-ui-module-core</code></td><td>digit-frontend</td><td>develop</td></tr><tr><td><code>@egovernments/digit-ui-react-components</code></td><td>digit-frontend</td><td>develop</td></tr><tr><td><code>@egovernments/digit-ui-svg-components</code></td><td>digit-frontend</td><td>develop</td></tr><tr><td><code>@egovernments/digit-ui-module-utilities</code></td><td>digit-frontend</td><td>develop</td></tr><tr><td><code>@egovernments/digit-ui-components</code></td><td>digit-ui-libraries</td><td>develop</td></tr></tbody></table>

***

## **🚀 Run Locally – Step-by-Step**

### **Pre-requisites**

* **Node.js** v14.18 (Use [nvm](https://github.com/nvm-sh/nvm) to manage versions)
* **Yarn** (preferred over npm)

Install Yarn if not available:

```bash
npm install -g yarn
```

Set Node version:

```bash
nvm install 14
nvm use 14
```

***

### **Steps**

#### **1. Clone the Repository**

```bash
git clone https://github.com/egovernments/Citizen-Complaint-Resolution-System.git
```

***

#### **2. Navigate to Project Directory**

```bash
cd frontend/micro-ui/web/micro-ui-internals
```

***

#### **3. Install Dependencies**

```bash
yarn install
```

***

#### **4. Configure Environment Variables**

Create `.env` inside:

```
micro-ui/web/micro-ui-internals/example/.env
```

**Required Variables:**

```
iniCopyEditREACT_APP_PROXY_API=<server-url>
REACT_APP_GLOBAL=<server-url>
REACT_APP_PROXY_ASSETS=<server-url>
REACT_APP_USER_TYPE=EMPLOYEE   # or CITIZEN
SKIP_PREFLIGHT_CHECK=true
```

***

#### **5. Start the Development Server**

```bash
yarn start
```

Access the app in your browser (usually `http://localhost:3000`).

***

### **📄 License**

Licensed under **MIT License** – free to use, modify, and distribute.

***


---

# Agent Instructions: 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:

```
GET https://docs.digit.org/complaints-management/complaints-resolution-v2.10/deploy/customise/frontend/local-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
