원클릭으로
judo-frontend-docs
// Frontend development guide for JUDO React applications. Covers hooks, theming, i18n, and Pandino DI customization patterns.
// Frontend development guide for JUDO React applications. Covers hooks, theming, i18n, and Pandino DI customization patterns.
ESM-to-UI mapping reference for JUDO React frontends. Covers widget mappings, table and navigation element mappings, and the ESM→UI transformation model.
ESM metamodel reference for JUDO. Covers namespace, type, structure, operation, accesspoint, UI, UI-behaviour, and UI-visual-styleguide packages with element-level attribute and constraint definitions.
Model documentation for JUDO applications. Covers ESM metamodel, cardinality, CRUD flags, and advanced modeling patterns.
Backend development guide for JUDO applications. Covers custom operations, interceptors, validators, data access, and error handling.
Deployment and build documentation for JUDO applications. Covers judo.sh commands, Docker setup, Karaf configuration, and production deployment.
E2E testing guide for JUDO React frontends using Playwright. Covers test patterns, helpers, and browser automation.
| name | judo-frontend-docs |
| description | Frontend development guide for JUDO React applications. Covers hooks, theming, i18n, and Pandino DI customization patterns. |
| disable-model-invocation | false |
| user-invocable | false |
| agent | general-purpose |
The React frontend in northwind is generated from the ESM and UI models using JUDO generators. Customization is achieved through a hook system rather than direct code modification.
Note: Throughout this documentation:
northwind refers to the application name from judo.properties (app_name property)[actor_fqn] represents the modeled actor's fully qualified name (without the model name prefix)
[model_name]::[namespace]::[ActorName] → [namespace]__[actor_name] (lowercased, :: replaced with _)MyApp (lowercased: myapp), Actor FQN myapp::service::Admin → actor path becomes service__adminnorthwind__[actor_fqn]
__) separates app name from actor path_) replace namespace separators (::) within the actor pathapplication/frontend-react/northwind__[actor_fqn]/ (e.g., myapp__service__admin/).generator-ignore..default Files: The generator creates .default template files for hooks and other customizable components. You copy and rename these files to implement your customizations.Generated (Do Not Edit Directly):
src/generated/ - All React components, pages, servicessrc/App.tsx - Main application componentsrc/routes.tsx - Route definitionsCustom Code (Edit Here):
src/custom/ - Hooks and customizationssrc/theme/ - Theme and styling customizationssrc/custom/application-customizer.tsx - Hook registrationHow Generation Works:
.generated-files__[actor_fqn] (located in the frontend module root).generator-ignore will be regenerated on ./judo.sh build or mvn clean installWhen You Must Edit Generated Files:
Sometimes there's no hook available for customization, and you must edit generated code directly. This is NOT the preferred way, but when necessary:
src/generated/).generator-ignore to protect it from regeneration
echo "src/generated/pages/MyCustomPage.tsx" >> .generator-ignore
.generator-ignore near related overrides (it's used like .gitignore)Handling Checksum Errors:
If you get checksum errors due to code formatting changes (e.g., after git checkout, Prettier/Biomé auto-format, or dev mode changes):
# Ignore checksum errors and force regeneration (frontend module)
cd application/frontend-react/northwind__[actor_fqn]
mvn clean install -Dignore-checksums
# Or from root with judo.sh
./judo.sh build -i
Checksum File Locations:
.generated-files__[actor_fqn] - In frontend module root directoryBest Practice: Always prefer using hooks over editing generated files. Only edit generated code when absolutely no hook exists for your use case.
application/frontend-react/northwind__[actor_fqn]/
├── model/ # UI model generation
│ ├── pom.xml # UI model generator config
│ └── target/generated-resources/
│ └── model/northwind-ui.model
├── src/
│ ├── generated/ # ⚠️ GENERATED - DO NOT EDIT
│ │ ├── components/
│ │ ├── pages/
│ │ ├── services/
│ │ └── models/
│ ├── custom/ # ✏️ CUSTOMIZATIONS HERE
│ │ ├── application-customizer.tsx # Hook registration
│ │ ├── hooks/
│ │ ├── components/
│ │ └── *.default files # Templates for hooks
│ ├── theme/ # ✏️ THEME CUSTOMIZATION
│ │ └── palette.ts
│ └── App.tsx # Generated entry point
├── public/
│ ├── i18n/ # Internationalization
│ │ ├── default/
│ │ ├── en-US/
│ │ └── hu-HU/
│ └── manifest.json
├── .generator-ignore # Exclude files from generation
├── package.json
├── vite.config.ts
└── pom.xml # Frontend build config
ESM Model (northwind.model) ⚠️ Edit with Judo Designer only
↓
[UI Model Generation] (application/frontend-react/model/pom.xml)
↓
UI Model (northwind-ui.model)
↓
[React Code Generation] (application/frontend-react/northwind__[actor_fqn]/pom.xml)
↓
Generated React Code (src/generated/)
↓
[PNPM Build] (vite)
↓
Frontend JAR
↓
[Auto-Deploy to Karaf] (when server running)
Important: The ESM model file cannot be edited directly. Use the Judo Designer modeling tool for all model changes. See ../model/README.md for details.
UI Model Generation (application/frontend-react/model/pom.xml):
<plugin>
<groupId>hu.blackbelt.judo.tatami</groupId>
<artifactId>judo-tatami-psm2ui-maven-plugin</artifactId>
<!-- Transforms PSM → UI Model -->
</plugin>
React Code Generation (application/frontend-react/northwind__[actor_fqn]/pom.xml):
<plugin>
<groupId>hu.blackbelt.judo</groupId>
<artifactId>judo-ui-react-maven-plugin</artifactId>
<!-- Generates React code from UI Model -->
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<!-- Runs pnpm install and build -->
</plugin>
The .generator-ignore file works exactly like .gitignore but for the code generator.
Location: application/frontend-react/northwind__[actor_fqn]/.generator-ignore
Syntax:
# Comments start with #
# Exact file
src/custom/application-customizer.tsx
# Wildcards
src/custom/**/*.tsx
# Directories
src/custom/
# Patterns
*.custom.tsx
**/custom-*.tsx
Common Patterns:
# Ignore all customizations
src/custom/
# Ignore specific customizer
src/custom/application-customizer.tsx
# Ignore theme
src/theme/
# Ignore specific hooks
src/custom/hooks/usePrincipal.tsx
src/custom/hooks/useCustomAuth.tsx
Workflow:
.generator-ignoreVerification:
# Check if file is ignored
grep "src/custom/application-customizer.tsx" .generator-ignore
# List all ignored files
cat .generator-ignore
Every generated file contains a header that provides important metadata about how it was generated:
//////////////////////////////////////////////////////////////////////////////
// G E N E R A T E D S O U R C E
// --------------------------------
// Factory expression: <actor>
// Path expression: 'src/App.tsx'
// Template name: actor/src/App.tsx
// Template file: actor/src/App.tsx.hbs
Template file: The Handlebars template (.hbs) used for generation
judo-ui-react-template or judo-ui-typescript-rest-template Maven artifactsactor/src/App.tsx.hbsTemplate name: The logical name of the template
generator-overrides/ directoryPath expression: A SpringEL expression that determines the output file path
'src/App.tsx' means file will be at src/App.tsxFactory expression: A SpringEL expression defining the data context
<actor> means this file is generated for each Actor in the modelThe JUDO platform uses two main template projects for code generation:
Purpose: Generates TypeScript REST API client
Generated Content:
Template Technology: Handlebars (.hbs files)
Typical Generated Files:
src/generated/models/*.ts - Type definitionssrc/generated/services/*.ts - API service implementationssrc/generated/data-axios/*.ts - Axios-based HTTP clientsPurpose: Generates React frontend UI components
Generated Content:
Template Technology: Handlebars (.hbs files)
Typical Generated Files:
src/generated/pages/*.tsx - Page componentssrc/generated/components/*.tsx - Reusable componentssrc/generated/dialogs/*.tsx - Dialog componentssrc/App.tsx - Main application entrysrc/routes.tsx - Route configurationWhen to Override:
How to Override:
Identify template name from generated file header
Template name: actor/src/App.tsx
Create override directory structure
mkdir -p generator-overrides/actor/src
Create custom template with same name
# generator-overrides/actor/src/App.tsx.hbs
# Your custom Handlebars template here
Regenerate
mvn clean install
Result: Your custom template is used instead of default
Important Notes:
Templates have access to model elements:
Common Variables:
{{actor}} - Current actor definition{{package}} - Package name{{entities}} - List of entities{{relations}} - Relationships{{operations}} - Available operationsHandlebars Helpers:
{{#each entities}} - Iterate collections{{#if required}} - Conditional rendering{{camelCase name}} - Name transformations{{pascalCase name}} - CapitalizationExample Template Snippet:
export interface {{pascalCase entity.name}} {
{{#each entity.attributes}}
{{camelCase name}}{{#unless required}}?{{/unless}}: {{toTypeScript type}};
{{/each}}
}
Authoring vs customizing. This skill covers customizing the generated React frontend (hooks, theming, i18n, overrides). The UI layout itself — Form / Table / View scaffolds on each TransferObjectType, the menu on each ActorType — is authored in the ESM model. For that, see the model skill's UI Authoring Guide (see judo-model-docs skill).
→ Add file to .generator-ignore
# Option 1: Add the file to .generator-ignore (keep your changes)
echo "src/generated/pages/MyPage.tsx" >> .generator-ignore
mvn clean install
# Option 2: Discard your changes (let it regenerate)
git checkout src/generated/pages/MyPage.tsx
mvn clean install
# Option 3: Formatting-only changes - ignore checksums
mvn clean install -Dignore-checksums
# or
./judo.sh build -i
→ Check registration in application-customizer.tsx
→ Verify export name matches expected interface
→ Run pnpm install to update type definitions
→ Check for breaking changes in generated types
application/frontend-react/model/target/generated-resources/model/northwind-ui.modelapplication/frontend-react/northwind__[actor_fqn]/src/generated/application/frontend-react/northwind__[actor_fqn]/src/custom/application/frontend-react/northwind__[actor_fqn]/target/*.jarapplication/frontend-react/northwind__[actor_fqn]/vite.config.ts