drpn-ai/darpan Moqui component. It is mounted inside a Moqui framework checkout at <moqui-framework>/runtime/component/darpan.
Engine model
This split keeps browser workflows thin. The UI asks for a run; the backend validates access, prepares data, compares records, applies rules, and writes output.
Current shape
- Moqui component descriptor:
component.xml - Public service surface:
facade.*Moqui JSON-RPC services through/rpc/json - Operator surface:
admin.*services, restricted to super admins and called by the Darpan admin app. They are not part of the public API. - GraphQL: the images include a GraphQL component (
moqui-gql). It is not a supported public API yet. - Service contracts: XML service definitions under
service/** - Data model: Moqui entity definitions under
entity/** - Processing helpers: Groovy code under
src/main/groovy/** - Reconciliation engine: Spark-backed compare services with RuleSet and legacy mapping paths
- Rule engine: Drools/KIE services for compiling and executing reconciliation rules
- Output handling: generated-output descriptors plus tenant-scoped files
- One-time upgrade work: a migration registry and supervisor (see Data migrations)
What the backend owns
- User, company, tenant, and permission checks before reads or writes.
- Durable records for schemas, saved runs, RuleSets, compare scopes, connections, and output descriptors.
- Source staging from uploads, text payloads, or configured systems.
- Spark-backed base diff computation.
- Drools-backed RuleSet execution.
- JSON-RPC responses shaped for the UI.
UI contract
The UI treats facade services as the contract. Browser code does not recreate reconciliation rules, tenant filtering, output paths, or service-side validation. This section traces product workflows into backend services, entities, processing helpers, and validation commands.Component layout
Moqui component structure, dependencies, and implementation directories.
Service layer
Facade services, core services, and backend service orchestration.
Reconciliation engine
A run from source staging through Spark, RuleSets, and generated output.
Rules and schemas
RuleSet, Rule, compare-scope entities, and JSON schema model.
Data access and tenancy
Active tenant scope, permission membership, and generated-output isolation.
Data migrations
Registry, prerequisites, ledger, and supervisor for one-time data migrations.
Operations and validation
Test pools, Gradle commands, runtime baseline, and backend review checklist.