> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drpn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Component layout

> Backend component structure, runtime dependencies, and implementation boundaries.

The Darpan backend is the [`drpn-ai/darpan`](https://github.com/drpn-ai/darpan) Moqui runtime component. The layout below is where backend investigations and service changes start. In a Moqui framework checkout it is mounted at:

```text theme={null}
<moqui-framework>/runtime/component/darpan
```

`component.xml` registers the component's entities, services, and screens:

```text theme={null}
entity/**
service/**
screen/darpan.xml
```

## Key directories

| Path                        | Purpose                                                                                           |
| --------------------------- | ------------------------------------------------------------------------------------------------- |
| `entity/**`                 | Moqui entity definitions for auth scope, schemas, mappings, RuleSets, runs, sources, and outputs. |
| `service/**`                | XML service contracts and XML service actions.                                                    |
| `service/facade/**`         | JSON-RPC-facing facade services used by the UI.                                                   |
| `screen/darpan.xml`         | Moqui screen entrypoint for the component.                                                        |
| `src/main/groovy/darpan/**` | Processing helpers for reconciliation, rules, schema work, and support utilities.                 |
| `data/**`                   | Seed and release upgrade data.                                                                    |
| `docs/**`                   | Component-local engineering notes and code maps.                                                  |
| `src/test/**`               | Unit and service tests for backend behavior.                                                      |

## Runtime stack

The component uses these runtime pieces:

* Moqui services, entities, screens, security, and JSON-RPC transport
* XML service definitions for contracts and orchestration
* Groovy helpers for dense processing
* Apache Spark SQL for file and dataset comparison
* Drools/KIE for RuleSet compilation and execution
* JSON Schema, JSONPath, and schema inference libraries
* `moqui-sftp` for SFTP-backed file access
* MySQL Connector/J for MySQL-backed deployments

## Implementation boundary

Service contracts are visible in XML. Groovy and Java helpers handle processing-heavy code such as Spark dataset preparation, rule execution, JSON normalization, and schema inference.
