Compliance Engine

One jobsite. Any country.
The right paperwork.

The backend engine that resolves a jobsite's country into the exact permit and zoning paperwork that jurisdiction requires — then hands the form back using the same server-driven UI schema every other engine already speaks, so no new rendering code was needed to display it.

Strategy Pattern
Jurisdiction Forms
Shared UI Schema
Where It Runs
app.totalapp.app/analytic-engines/compliance-engine
Compliance Engine
TotalApp
Strategy PatternJurisdiction FormsShared UI SchemaWhere It Runs
One jobsite. Any country. The right paperwork.Compliance Engine
Strategy Pattern
Strategy Pattern
Jurisdiction Forms
Shared UI Schema
Where It Runs
Jurisdiction Forms
TR: Ada/Parsel/Pafta, Müteahhit SGK Sicil No…
US: Parcel ID, Contractor License No, OSHA…
Regex validation carried directly on each field…
Shared UI Schema
Jurisdiction Forms
TR: Ada/Parsel/Pafta, Müteahhit SGK…
US: Parcel ID, Contractor License No…
Shared UI Schema
Reuses…
Zero new frontend rendering code for…
Where It Runs
Powers Permit Applications, Zoning…
Each screen carries its own…
Where It Runs
Powers Permit Applications, Zoning Rules, and…
Each screen carries its own jurisdiction picker…
Pre-filled from the jobsite via…
Compliance Engine

One country code in. One correct…

TR: Ada/Parsel/Pafta…✓
US: Parcel ID…✓
Regex validation carried…✓
Try Compliance…
The backend engine that resolves a jobsite's country…
Compliance Engine
Strategy Pattern
Jurisdiction Forms
Shared UI Schema
Where It Runs
Compliance Engine AI
The backend engine that resolves a jobsite's country into the exact permit and zoning paperwork that jurisdiction…
Try Compliance Engine
One country code in. One correct…Jurisdiction Forms
Strategy Pattern

One country code in.
One correct form out

Construction paperwork isn't the same everywhere. Compliance Engine centralizes jurisdiction logic behind a single Strategy Pattern — a PermitStrategy interface with one concrete class per country, so adding a new jurisdiction means writing one class, not touching every screen that needs paperwork.

  • ✓
    One PermitStrategy class per jurisdiction — TR, US, and more
  • ✓
    A DefaultPermitStrategy fallback that never throws
  • ✓
    resolveComplianceStrategy(countryCode) picks the right class
  • ✓
    New countries plug in without touching existing screens
Open Permits & Zoning
compliance-enginestrategy.ts
1function resolveComplianceStrategy(countryCode) {
2 switch (countryCode) {
3 case "TR": return TRPermitStrategy
4 case "US": return USPermitStrategy
5 case "DE": return DEPermitStrategy
6 default: return DefaultPermitStrategy
7 }
8}
TR
Ada/Parsel, SGK, TAKS
US
Parcel ID, OSHA
DE
Grundbuch, Bauantrag
One code in, one form outNever throws — always a schema.
Jurisdiction Forms

The fields a Turkish site
and a US site actually need

A Turkish jobsite files Ada, Parsel and Pafta cadastral references, an SGK Sicil No, and TAKS/KAKS floor-area ratios. A US jobsite instead files a Parcel ID, a Contractor License Number, and an OSHA Certification Number. Each strategy returns exactly the field set its jurisdiction requires.

  • ✓
    TR: Ada/Parsel/Pafta, Müteahhit SGK Sicil No, TAKS/KAKS
  • ✓
    US: Parcel ID, Contractor License No, OSHA Certification
  • ✓
    Regex validation carried directly on each field, no extra code
  • ✓
    jobsiteId captured for the audit trail on every call
Generate a Permit Form
TRPermitStrategybuilding_permit
Ada / Parsel / Pafta
1234 / 56 / 7B
Floor area ratio (TAKS / KAKS)
0.35 / 1.40
Contractor SGK registration no.
1 2345 67 89 0123456
US · USPermitStrategy
Parcel ID
Contractor License
OSHA Cert
Validation
^\d{1} \d{4} ...
regex enforced by shared renderer
The fields each site needsPer-country schema.
Shared UI Schema

No new renderer.
No new schema format

The engine's output isn't raw HTML or a hardcoded form — it's a UiComponent tree, the exact schema shape the UI Rendering Engine already defines. The same <DynamicScreenRenderer> that paints Matrix Agent's approval screens paints a Compliance Engine permit form too.

  • ✓
    Reuses UiComponent/UiComponentKind/UiVariant directly
  • ✓
    Zero new frontend rendering code for this engine's output
  • ✓
    A jurisdiction form and an approval screen render through one path
  • ✓
    Every generation logged via the Event & Analytics Engine
See It Render
Reuse chain
1
getPermitFormSchema(permitType)
UiComponent tree
2
DynamicScreenRenderer
Reused
3
SharedInputRenderer
Reused
4
validateFieldValue(regex, input)
Validated
5
compliance-engine.schema.cache
Cached
New renderer
0
no new schema format
Everything reusedLogged and cached.
Where It Runs

Three screens today,
any add-on tomorrow

A "Generate Form" button on Permit Applications, Zoning & Land Use Rules, and Legal Contracts & Liens calls this engine with the jobsite's resolved jurisdiction and renders the result inline — without either screen containing a single line of country-specific form code.

  • ✓
    Powers Permit Applications, Zoning Rules, and Legal Contracts & Liens
  • ✓
    Each screen carries its own jurisdiction picker, overridable per record
  • ✓
    Pre-filled from the jobsite via useJobsiteJurisdiction()
  • ✓
    Any future add-on with country-specific paperwork can reuse it
Explore Construction
Screens on the engine5
Permit ApplicationsLIVE
Zoning Land Use RulesLIVE
Legal Contracts & LiensLIVE
Site InspectionsLIVE
Safety CertificationsLIVE
Next add-on
Any add-on plugs in tomorrow.
Three screens todayAny add-on tomorrow.
All Capabilities

Everything in the box

Compliance Engine ships a jurisdiction-resolution strategy layer, ready to power any add-on with country-specific paperwork.

Strategy Pattern Core

One PermitStrategy interface, one concrete class per jurisdiction, and a DefaultPermitStrategy fallback that never throws.

Jurisdiction-Correct Fields

TR strategies return Ada/Parsel/SGK/TAKS/KAKS; US strategies return Parcel ID/Contractor License/OSHA — no shared hardcoded form.

Reused UI Schema

Output is a UiComponent tree — the same shape the UI Rendering Engine defines — so no new renderer was written.

Three Screens, One Call

Permit Applications, Zoning & Land Use Rules, and Legal Contracts & Liens all call the same fetchComplianceSchema().

Regex Field Validation

Fields like Contractor License Number carry a regex prop directly, enforced by the shared input renderer automatically.

Tracked Every Call

Every schema generation logs a success/failure event via the Event & Analytics Engine — same usage history as every other engine.